-
Notifications
You must be signed in to change notification settings - Fork 113
/
Copy pathConnectionStringsSetting.cs
52 lines (45 loc) · 1.5 KB
/
ConnectionStringsSetting.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
using System;
using Azure.ResourceManager.AppService.Models;
namespace Calamari.Azure.AppServices
{
public class ConnectionStringSetting
{
public string Name { get; set; }
public string Value { get; set; }
public ConnectionStringType Type { get; set; }
public bool SlotSetting { get; set; }
internal void Deconstruct(out string name, out string value, out ConnectionStringType type, out bool isSlotSetting)
{
name = Name;
value = Value;
type = Type;
isSlotSetting = SlotSetting;
}
public bool Equals(AppSetting other)
{
if (ReferenceEquals(null, other)) return false;
if (ReferenceEquals(this, other)) return true;
return Name == other.Name && Value == other.Value && SlotSetting == other.SlotSetting;
}
public override bool Equals(object obj)
{
if (ReferenceEquals(null, obj)) return false;
if (ReferenceEquals(this, obj)) return true;
return obj.GetType() == this.GetType() && Equals((AppSetting)obj);
}
public override int GetHashCode()
{
return new
{
Name,
Value,
SlotSetting,
Type
}.GetHashCode();
}
public override string ToString()
{
return $"\nName: {Name}\nValue: {Value}\nType: {Type}\nIsSlotSetting: {SlotSetting}\n";
}
}
}