/// <summary> /// Creates new instance from AddOn /// </summary> /// <param name="resource">The add on details</param> /// <param name="geoRegion">The add on region</param> public WindowsAzureAddOn(Resource resource, string geoRegion, string cloudService) { Type = resource.Namespace == DataSetType ? DataType : AppServiceType; AddOn = resource.Type; Name = resource.Name; Plan = resource.Plan; SchemaVersion = resource.SchemaVersion; ETag = resource.ETag; State = resource.State; UsageMeters = resource.UsageLimits.ToList(); OutputItems = (Type == AppServiceType) ? new Dictionary<string, string>(resource.OutputItems) : new Dictionary<string, string>(); LastOperationStatus = resource.Status; Location = geoRegion; CloudService = cloudService; }
/// <summary> /// Creates new instance from AddOn /// </summary> /// <param name="resource">The add on details</param> /// <param name="geoRegion">The add on region</param> public WindowsAzureAddOn(Resource resource, string geoRegion, string cloudService) { Type = resource.Namespace == DataSetType ? DataType : AppServiceType; AddOn = resource.Type; Name = resource.Name; Plan = resource.Plan; SchemaVersion = resource.SchemaVersion; ETag = resource.ETag; State = resource.State; UsageMeters = resource.UsageLimits.ToList(); OutputItems = (Type == AppServiceType) ? new Dictionary <string, string>(resource.OutputItems) : new Dictionary <string, string>(); LastOperationStatus = resource.Status; Location = geoRegion; CloudService = cloudService; }