public void MakeLog(LoggerOperations op, string message) { if (message == null) { message = "Empty message"; } //var logger = LogManager.GetCurrentClassLogger(); switch (op) { case LoggerOperations.Debug: Logger.Debug(message); break; case LoggerOperations.Info: Logger.Info(message); break; case LoggerOperations.Warn: Logger.Warn(message); break; case LoggerOperations.Error: Logger.Error(message); break; } }
/// <summary> /// Initializes client properties. /// </summary> private void Initialize() { Policy = new PolicyOperations(this); PolicySnippets = new PolicySnippetsOperations(this); Regions = new RegionsOperations(this); Api = new ApiOperations(this); ApiRevisions = new ApiRevisionsOperations(this); ApiRelease = new ApiReleaseOperations(this); ApiOperation = new ApiOperationOperations(this); ApiOperationPolicy = new ApiOperationPolicyOperations(this); ApiProduct = new ApiProductOperations(this); ApiPolicy = new ApiPolicyOperations(this); ApiSchema = new ApiSchemaOperations(this); ApiDiagnostic = new ApiDiagnosticOperations(this); ApiDiagnosticLogger = new ApiDiagnosticLoggerOperations(this); ApiIssue = new ApiIssueOperations(this); ApiIssueComment = new ApiIssueCommentOperations(this); ApiIssueAttachment = new ApiIssueAttachmentOperations(this); AuthorizationServer = new AuthorizationServerOperations(this); Backend = new BackendOperations(this); Certificate = new CertificateOperations(this); ApiManagementOperations = new ApiManagementOperations(this); ApiManagementServiceSkus = new ApiManagementServiceSkusOperations(this); ApiManagementService = new ApiManagementServiceOperations(this); Diagnostic = new DiagnosticOperations(this); DiagnosticLogger = new DiagnosticLoggerOperations(this); EmailTemplate = new EmailTemplateOperations(this); Group = new GroupOperations(this); GroupUser = new GroupUserOperations(this); IdentityProvider = new IdentityProviderOperations(this); Logger = new LoggerOperations(this); Notification = new NotificationOperations(this); NotificationRecipientUser = new NotificationRecipientUserOperations(this); NotificationRecipientEmail = new NotificationRecipientEmailOperations(this); NetworkStatus = new NetworkStatusOperations(this); OpenIdConnectProvider = new OpenIdConnectProviderOperations(this); SignInSettings = new SignInSettingsOperations(this); SignUpSettings = new SignUpSettingsOperations(this); DelegationSettings = new DelegationSettingsOperations(this); Product = new ProductOperations(this); ProductApi = new ProductApiOperations(this); ProductGroup = new ProductGroupOperations(this); ProductSubscriptions = new ProductSubscriptionsOperations(this); ProductPolicy = new ProductPolicyOperations(this); Property = new PropertyOperations(this); QuotaByCounterKeys = new QuotaByCounterKeysOperations(this); QuotaByPeriodKeys = new QuotaByPeriodKeysOperations(this); Reports = new ReportsOperations(this); Subscription = new SubscriptionOperations(this); TagResource = new TagResourceOperations(this); Tag = new TagOperations(this); TagDescription = new TagDescriptionOperations(this); Operation = new OperationOperations(this); TenantAccess = new TenantAccessOperations(this); TenantAccessGit = new TenantAccessGitOperations(this); TenantConfiguration = new TenantConfigurationOperations(this); User = new UserOperations(this); UserGroup = new UserGroupOperations(this); UserSubscription = new UserSubscriptionOperations(this); UserIdentities = new UserIdentitiesOperations(this); ApiVersionSet = new ApiVersionSetOperations(this); ApiExport = new ApiExportOperations(this); BaseUri = new System.Uri("https://management.azure.com"); ApiVersion = "2018-01-01"; 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()); }