/// <summary> /// Convert <paramref name="internalDataset"/> to a <see cref="Dataset"/> instance. /// </summary> /// <param name="internalDataset">The <see cref="Core.Models.Dataset"/> instance to convert.</param> /// <returns>A <see cref="Dataset"/> instance equivalent to <paramref name="internalDataset"/>.</returns> public override Dataset ToWrapperType(Core.Models.Dataset internalDataset) { Ensure.IsNotNull(internalDataset, "internalDataset"); Ensure.IsNotNull(internalDataset.Properties, "internalDataset.Properties"); Type type; DatasetTypeProperties typeProperties = this.DeserializeTypeProperties( internalDataset.Properties.Type, internalDataset.Properties.TypeProperties, out type); string typeName = GetTypeName(type, internalDataset.Properties.Type); DatasetProperties properties = new DatasetProperties( typeProperties, internalDataset.Properties.Availability, internalDataset.Properties.LinkedServiceName, typeName) { Availability = internalDataset.Properties.Availability, CreateTime = internalDataset.Properties.CreateTime, Description = internalDataset.Properties.Description, ErrorMessage = internalDataset.Properties.ErrorMessage, LinkedServiceName = internalDataset.Properties.LinkedServiceName, Policy = internalDataset.Properties.Policy, ProvisioningState = internalDataset.Properties.ProvisioningState, Structure = internalDataset.Properties.Structure, External = internalDataset.Properties.External }; return(new Dataset() { Name = internalDataset.Name, Properties = properties }); }
/// <summary> /// Initializes a new instance of the Dataset class with required arguments. /// </summary> public Dataset(string name, DatasetProperties properties) : this() { Ensure.IsNotNullOrEmpty(name, "name"); Ensure.IsNotNull(properties, "properties"); this.Name = name; this.Properties = properties; }
/// <summary> /// Initializes a new instance of the Dataset class with required arguments. /// </summary> public Dataset(string name, DatasetProperties properties) : this() { Ensure.IsNotNullOrEmpty(name, "name"); Ensure.IsNotNull(properties, "properties"); this.Name = name; this.Properties = properties; }