Beispiel #1
0
 /// <summary>
 /// Initializes client properties.
 /// </summary>
 private void Initialize()
 {
     Datasets                = new DatasetsOperations(this);
     Users                   = new Users(this);
     Imports                 = new ImportsOperations(this);
     Reports                 = new ReportsOperations(this);
     Dashboards              = new DashboardsOperations(this);
     Tiles                   = new TilesOperations(this);
     Apps                    = new AppsOperations(this);
     Dataflows               = new DataflowsOperations(this);
     Gateways                = new GatewaysOperations(this);
     Groups                  = new GroupsOperations(this);
     Capacities              = new CapacitiesOperations(this);
     AvailableFeatures       = new AvailableFeaturesOperations(this);
     DataflowStorageAccounts = new DataflowStorageAccountsOperations(this);
     WorkspaceInfo           = new WorkspaceInfoOperations(this);
     Admin                   = new Admin(this);
     EmbedToken              = new EmbedTokenOperations(this);
     InformationProtection   = new InformationProtection(this);
     TemplateApps            = new TemplateApps(this);
     BaseUri                 = new System.Uri("https://api.powerbi.com");
     SerializationSettings   = new JsonSerializerSettings
     {
         Formatting            = Newtonsoft.Json.Formatting.Indented,
         DateFormatHandling    = Newtonsoft.Json.DateFormatHandling.IsoDateFormat,
         DateTimeZoneHandling  = Newtonsoft.Json.DateTimeZoneHandling.Utc,
         NullValueHandling     = Newtonsoft.Json.NullValueHandling.Ignore,
         ReferenceLoopHandling = Newtonsoft.Json.ReferenceLoopHandling.Serialize,
         ContractResolver      = new ReadOnlyJsonContractResolver(),
         Converters            = new  List <JsonConverter>
         {
             new Iso8601TimeSpanConverter()
         }
     };
     DeserializationSettings = new JsonSerializerSettings
     {
         DateFormatHandling    = Newtonsoft.Json.DateFormatHandling.IsoDateFormat,
         DateTimeZoneHandling  = Newtonsoft.Json.DateTimeZoneHandling.Utc,
         NullValueHandling     = Newtonsoft.Json.NullValueHandling.Ignore,
         ReferenceLoopHandling = Newtonsoft.Json.ReferenceLoopHandling.Serialize,
         ContractResolver      = new ReadOnlyJsonContractResolver(),
         Converters            = new List <JsonConverter>
         {
             new Iso8601TimeSpanConverter()
         }
     };
     CustomInitialize();
 }
 /// <summary>
 /// Initializes client properties.
 /// </summary>
 private void Initialize()
 {
     SignedInUser        = new SignedInUserOperations(this);
     Applications        = new ApplicationsOperations(this);
     DeletedApplications = new DeletedApplicationsOperations(this);
     Groups                           = new GroupsOperations(this);
     ServicePrincipals                = new ServicePrincipalsOperations(this);
     Users                            = new UsersOperations(this);
     Objects                          = new ObjectsOperations(this);
     Domains                          = new DomainsOperations(this);
     OAuth2PermissionGrant            = new OAuth2PermissionGrantOperations(this);
     BaseUri                          = new System.Uri("https://graph.windows.net");
     ApiVersion                       = "1.6";
     AcceptLanguage                   = "en-US";
     LongRunningOperationRetryTimeout = 30;
     GenerateClientRequestId          = true;
     SerializationSettings            = new JsonSerializerSettings
     {
         Formatting            = Newtonsoft.Json.Formatting.Indented,
         DateFormatHandling    = Newtonsoft.Json.DateFormatHandling.IsoDateFormat,
         DateTimeZoneHandling  = Newtonsoft.Json.DateTimeZoneHandling.Utc,
         NullValueHandling     = Newtonsoft.Json.NullValueHandling.Ignore,
         ReferenceLoopHandling = Newtonsoft.Json.ReferenceLoopHandling.Serialize,
         ContractResolver      = new ReadOnlyJsonContractResolver(),
         Converters            = new List <JsonConverter>
         {
             new Iso8601TimeSpanConverter()
         }
     };
     SerializationSettings.Converters.Add(new TransformationJsonConverter());
     DeserializationSettings = new JsonSerializerSettings
     {
         DateFormatHandling    = Newtonsoft.Json.DateFormatHandling.IsoDateFormat,
         DateTimeZoneHandling  = Newtonsoft.Json.DateTimeZoneHandling.Utc,
         NullValueHandling     = Newtonsoft.Json.NullValueHandling.Ignore,
         ReferenceLoopHandling = Newtonsoft.Json.ReferenceLoopHandling.Serialize,
         ContractResolver      = new ReadOnlyJsonContractResolver(),
         Converters            = new List <JsonConverter>
         {
             new Iso8601TimeSpanConverter()
         }
     };
     SerializationSettings.Converters.Add(new PolymorphicSerializeJsonConverter <DirectoryObject>("objectType"));
     DeserializationSettings.Converters.Add(new PolymorphicDeserializeJsonConverter <DirectoryObject>("objectType"));
     CustomInitialize();
     DeserializationSettings.Converters.Add(new TransformationJsonConverter());
     DeserializationSettings.Converters.Add(new CloudErrorJsonConverter());
 }
Beispiel #3
0
 /// <summary>
 /// Initializes client properties.
 /// </summary>
 private void Initialize()
 {
     Users             = new UsersOperations(this);
     Applications      = new ApplicationsOperations(this);
     ServicePrincipals = new ServicePrincipalsOperations(this);
     Groups            = new GroupsOperations(this);
     DirectoryObjects  = new DirectoryObjectsOperations(this);
     ApiVersion        = "v1.0";
     BaseUri           = new System.Uri("https://graph.microsoft.com");
     AcceptLanguage    = "en-US";
     LongRunningOperationRetryTimeout = 30;
     GenerateClientRequestId          = true;
     SerializationSettings            = new JsonSerializerSettings
     {
         Formatting            = Newtonsoft.Json.Formatting.Indented,
         DateFormatHandling    = Newtonsoft.Json.DateFormatHandling.IsoDateFormat,
         DateTimeZoneHandling  = Newtonsoft.Json.DateTimeZoneHandling.Utc,
         NullValueHandling     = Newtonsoft.Json.NullValueHandling.Ignore,
         ReferenceLoopHandling = Newtonsoft.Json.ReferenceLoopHandling.Serialize,
         ContractResolver      = new ReadOnlyJsonContractResolver(),
         Converters            = new List <JsonConverter>
         {
             new Iso8601TimeSpanConverter()
         }
     };
     SerializationSettings.Converters.Add(new TransformationJsonConverter());
     DeserializationSettings = new JsonSerializerSettings
     {
         DateFormatHandling    = Newtonsoft.Json.DateFormatHandling.IsoDateFormat,
         DateTimeZoneHandling  = Newtonsoft.Json.DateTimeZoneHandling.Utc,
         NullValueHandling     = Newtonsoft.Json.NullValueHandling.Ignore,
         ReferenceLoopHandling = Newtonsoft.Json.ReferenceLoopHandling.Serialize,
         ContractResolver      = new ReadOnlyJsonContractResolver(),
         Converters            = new List <JsonConverter>
         {
             new Iso8601TimeSpanConverter()
         }
     };
     CustomInitialize();
     DeserializationSettings.Converters.Add(new TransformationJsonConverter());
     DeserializationSettings.Converters.Add(new CloudErrorJsonConverter());
 }