private ResolvedTable GetResolvedTable(JObject jObject)
        {
            ResolvedTable resolvedTable = new ResolvedTable();

            JToken tableJToken;
            JToken linkedServiceJToken;

            if (jObject.TryGetValue(TableToken, StringComparison.OrdinalIgnoreCase, out tableJToken))
            {
                Core.Models.Table internalTable = Core.DataFactoryManagementClient.DeserializeInternalTableJson(tableJToken.ToString());
                resolvedTable.Table = tableConverter.ToWrapperType(internalTable);
            }

            if (jObject.TryGetValue(LinkedServiceToken, StringComparison.OrdinalIgnoreCase, out linkedServiceJToken))
            {
                Core.Models.LinkedService internalLinkedService = Core.DataFactoryManagementClient.DeserializeInternalLinkedServiceJson(linkedServiceJToken.ToString());
                resolvedTable.LinkedService = linkedServiceConverter.ToWrapperType(internalLinkedService);
            }

            return(resolvedTable);
        }
Ejemplo n.º 2
0
        public override object ReadJson(JsonReader reader, Type objectType, object existingValue, JsonSerializer serializer)
        {
            DataSet dataSet = new DataSet();

            JObject jObject = JObject.Load(reader);
            JToken  tableJToken;
            JToken  linkedServiceJToken;

            if (jObject.TryGetValue(TableToken, StringComparison.OrdinalIgnoreCase, out tableJToken))
            {
                Core.Models.Table internalTable = Core.DataFactoryManagementClient.DeserializeInternalTableJson(tableJToken.ToString());
                dataSet.Table = tableConverter.ToWrapperType(internalTable);
            }

            if (jObject.TryGetValue(LinkedServiceToken, StringComparison.OrdinalIgnoreCase, out linkedServiceJToken))
            {
                Core.Models.LinkedService internalLinkedService = Core.DataFactoryManagementClient.DeserializeInternalLinkedServiceJson(linkedServiceJToken.ToString());
                dataSet.LinkedService = linkedServiceConverter.ToWrapperType(internalLinkedService);
            }

            return(dataSet);
        }