public static bool AreEqualPrereq( Azure.ResourceManager.Dns.Models.Resource first, Azure.ResourceManager.Dns.Models.Resource second, bool ignoreEtag = false) { if (first == null && second == null) { return(true); } else if (first == null || second == null) { return(false); } if (first.Location != second.Location || first.Name != second.Name) { return(false); } if (first.Tags != null || second.Tags != null) { if (first.Tags == null || second.Tags == null || first.Tags.Count != second.Tags.Count) { return(false); } foreach (string key in first.Tags.Keys) { if (!second.Tags.ContainsKey(key) || first.Tags[key] != second.Tags[key]) { return(false); } } } return(true); }
public static bool AreEqualPrereq( Azure.ResourceManager.Dns.Models.Resource first, Azure.ResourceManager.Dns.Models.Resource second, bool ignoreEtag = false) { if (first == null || second == null) { return(false); } if (!String.Equals(first.Location, second.Location, StringComparison.OrdinalIgnoreCase)) { return(false); } if (first.Tags != null && second.Tags != null) { if (first.Tags.Count != second.Tags.Count) { return(false); } foreach (string key in first.Tags.Keys) { if (!second.Tags.ContainsKey(key) || first.Tags[key] != second.Tags[key]) { return(false); } } } else { return(false); } return(true); }