示例#1
0
        public bool Equals(IAzureResource other)
        {
            if (other == null)
            {
                return(false);
            }

            if (ReferenceEquals(this, other))
            {
                return(true);
            }

            if (this.GetType() != other.GetType())
            {
                return(false);
            }

            return(StringComparer.OrdinalIgnoreCase.Equals(this.Id, other.Id));
        }
        public bool Equals(IAzureResource other)
        {
            if (other == null)
            {
                return false;
            }

            if (ReferenceEquals(this, other))
            {
                return true;
            }

            if (this.GetType() != other.GetType())
            {
                return false;
            }

            return StringComparer.OrdinalIgnoreCase.Equals(this.Id, other.Id);
        }
 public AzureViewModelBase(IAzureResource azureResource)
 {
     this.azureResource = azureResource;
 }
        /// <summary>
        /// Converts the resource to DatabaseInstanceInfo
        /// </summary>
        private DatabaseInstanceInfo ConvertToModel(ServerInstanceInfo serverInstanceInfo, IAzureResource azureResource)
        {
            DatabaseInstanceInfo databaseInstance = new DatabaseInstanceInfo(serverInstanceInfo)
            {
                Name = azureResource.Name.Replace(serverInstanceInfo.Name + "/", "")
            };

            return(databaseInstance);
        }