コード例 #1
0
ファイル: AzureLogger.cs プロジェクト: xiaodelea/mattercenter
        /// <summary>
        /// Logs message to Azure table storage.
        /// </summary>
        /// <param name="exception">Exception Object</param>
        /// <param name="className">Class Name where exception occur</param>
        /// <param name="methodName">Method Name where exception occur</param>
        /// <param name="logTableName">Name of the log table.</param>
        /// <param name="lineNumber">Line Number of the log table.</param>
        /// <returns>Returns date of logging</returns>
        internal static string LogInAzure(Exception exception, string className, string methodName,
                                          string logTableName, int lineNumber, LogTables logTables, GeneralSettings generalSettings)
        {
            string connStr = generalSettings.CloudStorageConnectionString;
            CloudStorageAccount storageAccount = CloudStorageAccount.Parse(connStr);
            CloudTableClient    client         = storageAccount.CreateCloudTableClient();
            CloudTable          table          = client.GetTableReference(logTableName);

            table.CreateIfNotExists();
            AzureLogEntity tableEntityObj = new AzureLogEntity();

            tableEntityObj.PartitionKey = className;
            tableEntityObj.MethodName   = methodName;
            string date = DateTime.Now.ToUniversalTime().ToString(logTables.AzureRowKeyDateFormat, CultureInfo.InvariantCulture);

            tableEntityObj.RowKey     = string.Format(CultureInfo.InvariantCulture, "{0} - {1}", date, Guid.NewGuid().ToString());
            tableEntityObj.Stacktrace = exception.StackTrace;
            tableEntityObj.LogMessage = exception.Message;
            tableEntityObj.ErrorCode  = exception.HResult;
            tableEntityObj.LineNumber = lineNumber;
            TableOperation insertOp = TableOperation.Insert(tableEntityObj);

            table.Execute(insertOp);
            return(date);
        }
コード例 #2
0
ファイル: Search.cs プロジェクト: Microsoft/mattercenter
 /// <summary>
 /// 
 /// </summary>
 /// <param name="spoAuthorization"></param>
 /// <param name="generalSettings"></param>
 /// <param name="searchSettings"></param>
 public Search(ISPOAuthorization spoAuthorization,
     IConfigurationRoot configuration,
     ICustomLogger customLogger,
     IUsersDetails userDetails,
     ISPList spList,
     IOptions<GeneralSettings> generalSettings,
     IOptions<SharedSettings> sharedSettings,
     IOptions<LogTables> logTables,
     IOptions<SearchSettings> searchSettings,
     IOptions<CamlQueries> camlQueries,
     IOptions<ListNames> listNames,
     IOptions<ErrorSettings> errorSettings)
 {
     this.spoAuthorization = spoAuthorization;
     this.generalSettings = generalSettings.Value;
     this.searchSettings = searchSettings.Value;
     this.userDetails = userDetails;
     this.customLogger = customLogger;
     this.logTables = logTables.Value;
     this.spList = spList;
     this.camlQueries = camlQueries.Value;
     this.listNames = listNames.Value;
     this.sharedSettings = sharedSettings.Value;
     this.errorSettings = errorSettings.Value;
     this.configuration = configuration;
 }
コード例 #3
0
        /// <summary>
        ///  Logs exception in Event Viewer.
        /// </summary>
        /// <param name="eventLog"> Event description </param>
        /// <param name="type"> Type of log </param>
        internal static void LogInEventViewer(string eventLog, string type, LogTables logTables)
        {
            string sourceName = logTables.EventViewerSource;
            int eventID;
            if (!int.TryParse(logTables.EventViewerEventID, NumberStyles.Any, CultureInfo.InvariantCulture, out eventID))
            {
                eventID = ServiceConstants.DEFAULT_EVENT_ID;
            }

            // Create new event source if not exists
            if (!EventLog.SourceExists(sourceName))
            {
                EventLog.CreateEventSource(sourceName, logTables.EventViewerLogName);
            }

            switch (type)
            {
                case ServiceConstants.EVENT_WARNING:
                    EventLog.WriteEntry(sourceName, eventLog, EventLogEntryType.Warning, eventID);
                    break;
                case ServiceConstants.EVENT_ERROR:
                    EventLog.WriteEntry(sourceName, eventLog, EventLogEntryType.Error, eventID);
                    break;
                default:
                    EventLog.WriteEntry(sourceName, eventLog, EventLogEntryType.Information, eventID);
                    break;
            }
        }
コード例 #4
0
 /// <summary>
 /// Constructor where all the dependencies are injected
 /// </summary>
 /// <param name="matterRepositoy"></param>
 /// <param name="matterSettings"></param>
 /// <param name="errorSettings"></param>
 /// <param name="spoAuthorization"></param>
 /// <param name="editFunctions"></param>
 /// <param name="validationFunctions"></param>
 /// <param name="customLogger"></param>
 /// <param name="logTables"></param>
 /// <param name="mailSettings"></param>
 /// <param name="camlQueries"></param>
 /// <param name="listNames"></param>
 /// <param name="generalSettings"></param>
 /// <param name="searchSettings"></param>
 /// <param name="userRepositoy"></param>
 /// <param name="externalSharing"></param>
 /// <param name="configuration"></param>
 /// <param name="userDetails"></param>
 public MatterProvision(IMatterRepository matterRepositoy, IOptions<MatterSettings> matterSettings,
     IOptions<ErrorSettings> errorSettings,
     ISPOAuthorization spoAuthorization, IEditFunctions editFunctions, IValidationFunctions validationFunctions,
     ICustomLogger customLogger, IOptions<LogTables> logTables,
     IOptions<MailSettings> mailSettings,
     IOptions<CamlQueries> camlQueries,
     IOptions<ListNames> listNames,
     IOptions<GeneralSettings> generalSettings,
     IOptions<SearchSettings> searchSettings, IUserRepository userRepositoy, 
     IExternalSharing externalSharing, IConfigurationRoot configuration, IUsersDetails userDetails
     )
 {
     this.matterRepositoy = matterRepositoy;
     this.matterSettings = matterSettings.Value;
     this.spoAuthorization = spoAuthorization;
     this.editFunctions = editFunctions;
     this.errorSettings = errorSettings.Value;
     this.customLogger = customLogger;
     this.logTables = logTables.Value;
     this.validationFunctions = validationFunctions;
     this.mailSettings = mailSettings.Value;
     this.camlQueries = camlQueries.Value;
     this.listNames = listNames.Value;
     this.searchSettings = searchSettings.Value;
     this.userRepositoy = userRepositoy;
     this.externalSharing = externalSharing;
     this.configuration = configuration;
     this.userDetails = userDetails;
     this.generalSettings = generalSettings.Value;
 }
コード例 #5
0
        /// <summary>
        ///  Logs exception in Event Viewer.
        /// </summary>
        /// <param name="eventLog"> Event description </param>
        /// <param name="type"> Type of log </param>
        internal static void LogInEventViewer(string eventLog, string type, LogTables logTables)
        {
            string sourceName = logTables.EventViewerSource;
            int    eventID;

            if (!int.TryParse(logTables.EventViewerEventID, NumberStyles.Any, CultureInfo.InvariantCulture, out eventID))
            {
                eventID = ServiceConstants.DEFAULT_EVENT_ID;
            }

            // Create new event source if not exists
            if (!EventLog.SourceExists(sourceName))
            {
                EventLog.CreateEventSource(sourceName, logTables.EventViewerLogName);
            }

            switch (type)
            {
            case ServiceConstants.EVENT_WARNING:
                EventLog.WriteEntry(sourceName, eventLog, EventLogEntryType.Warning, eventID);
                break;

            case ServiceConstants.EVENT_ERROR:
                EventLog.WriteEntry(sourceName, eventLog, EventLogEntryType.Error, eventID);
                break;

            default:
                EventLog.WriteEntry(sourceName, eventLog, EventLogEntryType.Information, eventID);
                break;
            }
        }
コード例 #6
0
ファイル: SPPage.cs プロジェクト: Microsoft/mattercenter
 /// <summary>
 /// All the dependencies are injected 
 /// </summary>
 /// <param name="spoAuthorization"></param>
 /// <param name="generalSettings"></param>
 public SPPage(ISPOAuthorization spoAuthorization, IOptions<GeneralSettings> generalSettings, 
     IOptions<LogTables> logTables, ICustomLogger customLogger, ISPList spList, IOptions<MatterSettings> matterSettings)
 {
     this.generalSettings = generalSettings.Value;
     this.spoAuthorization = spoAuthorization;
     this.logTables = logTables.Value;
     this.customLogger = customLogger;
     this.spList = spList;
     this.matterSettings = matterSettings.Value;
 }
コード例 #7
0
 public SPContentTypes(IOptions<ContentTypesConfig> contentTypesConfig, IOptions<CamlQueries> camlQueries, ISPList spList,
     ICustomLogger customLogger, IOptions<LogTables> logTables, IOptions<TaxonomySettings> taxonomySettings, IConfigurationRoot configuration
     )
 {
     this.contentTypesConfig = contentTypesConfig.Value;
     this.taxonomySettings = taxonomySettings.Value;
     this.customLogger = customLogger;
     this.logTables = logTables.Value;
     this.camlQueries = camlQueries.Value;
     this.spList = spList;
     this.configuration = configuration;
 }
コード例 #8
0
 /// <summary>
 /// Constructor where GeneralSettings and ErrorSettings are injected
 /// </summary>
 /// <param name="generalSettings"></param>
 /// <param name="errorSettings"></param>
 public SPOAuthorization(IOptions <GeneralSettings> generalSettings,
                         IOptions <ErrorSettings> errorSettings,
                         IOptions <LogTables> logTables,
                         ICustomLogger customLogger,
                         IHttpContextAccessor httpContextAccessor)
 {
     this.generalSettings     = generalSettings.Value;
     this.errorSettings       = errorSettings.Value;
     this.customLogger        = customLogger;
     this.logTables           = logTables.Value;
     this.httpContextAccessor = httpContextAccessor;
 }
コード例 #9
0
 /// <summary>
 /// Constructor where GeneralSettings and ErrorSettings are injected
 /// </summary>
 /// <param name="generalSettings"></param>
 /// <param name="errorSettings"></param>
 public SPOAuthorization(IOptions<GeneralSettings> generalSettings, 
     IOptions<ErrorSettings> errorSettings, 
     IOptions<LogTables> logTables, 
     ICustomLogger customLogger, 
     IHttpContextAccessor httpContextAccessor)
 {            
     this.generalSettings = generalSettings.Value;
     this.errorSettings = errorSettings.Value;
     this.customLogger = customLogger;
     this.logTables = logTables.Value;
     this.httpContextAccessor = httpContextAccessor;
 }
コード例 #10
0
 /// <summary>
 /// Controlls the functionality for email related.
 /// </summary>
 /// <param name="errorSettings"></param>
 /// <param name="customLogger"></param>
 /// <param name="matterCenterServiceFunctions"></param>
 /// <param name="logTables"></param>
 /// <param name="documentProvision"></param>
 /// <param name="documentSettings"></param>
 public EmailController(IOptions<ErrorSettings> errorSettings,
     ICustomLogger customLogger,             
     IMatterCenterServiceFunctions matterCenterServiceFunctions, 
     IOptions<LogTables> logTables, IDocumentProvision documentProvision,            
     IOptions<DocumentSettings> documentSettings)
 {            
     this.errorSettings = errorSettings.Value;
     this.matterCenterServiceFunctions = matterCenterServiceFunctions;
     this.customLogger = customLogger;
     this.logTables = logTables.Value;
     this.documentProvision = documentProvision;
     this.documentSettings = documentSettings.Value;       
 }
コード例 #11
0
 public MatterProvision(IMatterRepository matterRepositoy, IOptions<MatterSettings> matterSettings, IOptions<ErrorSettings> errorSettings,
     ISPOAuthorization spoAuthorization, IEditFunctions editFunctions, ValidationFunctions validationFunctions,
     ICustomLogger customLogger, IOptions<LogTables> logTables, IOptions<MailSettings> mailSettings)
 {
     this.matterRepositoy = matterRepositoy;
     this.matterSettings = matterSettings.Value;
     this.spoAuthorization = spoAuthorization;
     this.editFunctions = editFunctions;
     this.errorSettings = errorSettings.Value;
     this.customLogger = customLogger;
     this.logTables = logTables.Value;
     this.validationFunctions = validationFunctions;
     this.mailSettings = mailSettings.Value;
 }
コード例 #12
0
        public ExternalSharing(ISPOAuthorization spoAuthorization, IOptions<ListNames> listNames, 
            IOptions<GeneralSettings> generalSettings, 
            IOptions<MatterSettings> matterSettings, 
            IOptions<LogTables> logTables, IUsersDetails userDetails, ICustomLogger customLogger)
        {
            this.spoAuthorization = spoAuthorization;
            this.listNames = listNames.Value;
            this.generalSettings = generalSettings.Value;
            this.matterSettings = matterSettings.Value;
            this.logTables = logTables.Value;
            this.userDetails = userDetails;
            this.customLogger = customLogger;

        }
コード例 #13
0
 /// <summary>
 /// constructor where are all the dependencies are injected
 /// </summary>
 /// <param name="errorSettings"></param>
 /// <param name="matterCenterServiceFunctions"></param>
 /// <param name="userRepositoy"></param>
 /// <param name="customLogger"></param>
 /// <param name="logTables"></param>
 /// <param name="generalSettings"></param>
  public UserController(IOptions<ErrorSettings> errorSettings,
      IMatterCenterServiceFunctions matterCenterServiceFunctions,
      IUserRepository userRepositoy,
      ICustomLogger customLogger, 
      IOptions<LogTables> logTables,  
      IOptions<GeneralSettings> generalSettings
      )
  {
      this.errorSettings = errorSettings.Value; 
      this.matterCenterServiceFunctions = matterCenterServiceFunctions;            
      this.customLogger = customLogger;
      this.logTables = logTables.Value;             
      this.generalSettings = generalSettings.Value;
      this.userRepositoy = userRepositoy;
  }
コード例 #14
0
 /// <summary>
 /// Constructor where all dependencies are injected
 /// </summary>
 /// <param name="errorSettings"></param>
 /// <param name="sharedSettings"></param>
 /// <param name="matterCenterServiceFunctions"></param>
 /// <param name="customLogger"></param>
 /// <param name="logTables"></param>
 /// <param name="sharedRepository"></param>
  public SharedController(IOptions<ErrorSettings> errorSettings,
      IOptions<SharedSettings> sharedSettings,            
      IMatterCenterServiceFunctions matterCenterServiceFunctions,            
      ICustomLogger customLogger, IOptions<LogTables> logTables,
      ISharedRepository sharedRepository
      )
  {
      this.errorSettings = errorSettings.Value;            
      
      this.matterCenterServiceFunctions = matterCenterServiceFunctions;
      this.sharedRepository = sharedRepository;
      this.customLogger = customLogger;
      this.logTables = logTables.Value;
      this.sharedSettings = sharedSettings.Value;
  }
コード例 #15
0
 /// <summary>
 /// Constructor where all the required dependencies are injected
 /// </summary>
 /// <param name="errorSettings"></param>
 /// <param name="taxonomySettings"></param>
 /// <param name="generalSettings"></param>
 /// <param name="spoAuthorization"></param>
 /// <param name="matterCenterServiceFunctions"></param>
 /// <param name="taxonomyRepository"></param>
 public TaxonomyController(IOptions<ErrorSettings> errorSettings, 
     IOptions<TaxonomySettings> taxonomySettings, 
     IOptions<GeneralSettings> generalSettings,
     ISPOAuthorization spoAuthorization, 
     IMatterCenterServiceFunctions matterCenterServiceFunctions,
     ITaxonomyRepository taxonomyRepository, ICustomLogger customLogger, IOptions<LogTables> logTables)
 {
     this.errorSettings = errorSettings.Value;
     this.taxonomySettings = taxonomySettings.Value;
     this.generalSettings = generalSettings.Value;
     this.spoAuthorization = spoAuthorization;
     this.matterCenterServiceFunctions = matterCenterServiceFunctions;            
     this.taxonomyRepository = taxonomyRepository;
     this.customLogger = customLogger;
     this.logTables = logTables.Value;
 }
コード例 #16
0
 /// <summary>
 /// Constructor where all the required dependencies are injected
 /// </summary>
 /// <param name="errorSettings"></param>
 /// <param name="documentSettings"></param>
 /// <param name="spoAuthorization"></param>
 /// <param name="matterCenterServiceFunctions"></param>
 /// <param name="documentRepositoy"></param>
 public DocumentController(IOptions<ErrorSettings> errorSettings,
     IOptions<DocumentSettings> documentSettings,
     ISPOAuthorization spoAuthorization,
     IMatterCenterServiceFunctions matterCenterServiceFunctions,
     IDocumentRepository documentRepositoy,
     ICustomLogger customLogger, IOptions<LogTables> logTables
     )
 {
     this.errorSettings = errorSettings.Value;
     this.documentSettings = documentSettings.Value;
     this.spoAuthorization = spoAuthorization;
     this.matterCenterServiceFunctions = matterCenterServiceFunctions;
     this.documentRepositoy = documentRepositoy;
     this.customLogger = customLogger;
     this.logTables = logTables.Value;
 }
コード例 #17
0
ファイル: Taxonomy.cs プロジェクト: Microsoft/mattercenter
 /// <summary>
 /// Constructor to inject required dependencies
 /// </summary>
 /// <param name="generalSettings"></param>
 /// <param name="taxonomySettings"></param>
 /// <param name="logTables"></param>
 /// <param name="spoAuthorization"></param>
 /// <param name="customLogger"></param>
 public Taxonomy(IOptions<GeneralSettings> generalSettings, 
     IOptions<TaxonomySettings> taxonomySettings,
     IOptions<ContentTypesConfig> contentTypeSettings,
     IOptions<LogTables> logTables,
     ISPOAuthorization spoAuthorization, ICustomLogger customLogger, 
     IConfigurationRoot configuration)
 {
     this.generalSettings = generalSettings.Value;
     this.taxonomySettings = taxonomySettings.Value;
     this.contentTypeSettings = contentTypeSettings.Value;
     this.logTables = logTables.Value;
     this.spoAuthorization = spoAuthorization;
     taxonomyResponseVM = new TaxonomyResponseVM();
     this.customLogger = customLogger;
     
     this.configuration = configuration;
 }       
コード例 #18
0
 /// <summary>
 /// Constructir where all the dependencies are injected
 /// </summary>
 /// <param name="spoAuthorization"></param>
 public UsersDetails(IOptions<MatterSettings> matterSettings, 
     IOptions<ListNames> listNames,
     ISPOAuthorization spoAuthorization, 
     ICustomLogger customLogger, 
     IOptions<LogTables> logTables,
     IHttpContextAccessor httpContextAccessor,
     IOptions<GeneralSettings> generalSettings)
 {
     this.matterSettings = matterSettings.Value;
     this.listNames = listNames.Value;
     this.spoAuthorization = spoAuthorization;
     //this.spList = spList;
     this.customLogger = customLogger;
     this.logTables = logTables.Value;
     this.httpContextAccessor = httpContextAccessor;
     this.generalSettings = generalSettings.Value;
 }
コード例 #19
0
        /// <summary>
        /// DcouemtsController Constructor where all the required dependencies are injected
        /// </summary>
        /// <remarks></remarks>        /// 
        /// <param name="errorSettings"></param>
        /// <param name="documentSettings"></param>
        /// <param name="matterCenterServiceFunctions"></param>
        /// <param name="documentRepositoy"></param>
        /// <param name="customLogger"></param>
        /// <param name="logTables"></param>
        /// <param name="documentProvision"></param>
        /// <param name="generalSettings"></param>
        public DocumentController(IOptions<ErrorSettings> errorSettings,
            IOptions<DocumentSettings> documentSettings,            
            IMatterCenterServiceFunctions matterCenterServiceFunctions,
            IDocumentRepository documentRepositoy,
            ICustomLogger customLogger, IOptions<LogTables> logTables, IDocumentProvision documentProvision,
            IOptions<GeneralSettings> generalSettings

            )
        {
            this.errorSettings = errorSettings.Value;
            this.documentSettings = documentSettings.Value;            
            this.matterCenterServiceFunctions = matterCenterServiceFunctions;
            this.documentRepositoy = documentRepositoy;
            this.customLogger = customLogger;
            this.logTables = logTables.Value;
            this.documentProvision = documentProvision;
            this.generalSettings = generalSettings.Value;
        }
コード例 #20
0
 /// <summary>
 /// Constructor where all the required dependencies are injected
 /// </summary>
 /// <param name="errorSettings"></param>
 /// <param name="matterSettings"></param>
 /// <param name="matterCenterServiceFunctions"></param>
 /// <param name="matterRepositoy"></param>
 /// <param name="customLogger"></param>
 /// <param name="logTables"></param>
 /// <param name="validationFunctions"></param>
 /// <param name="editFunctions"></param>
 /// <param name="matterProvision"></param>
 public MatterController(IOptions<ErrorSettings> errorSettings,
     IOptions<MatterSettings> matterSettings,
     
     IMatterCenterServiceFunctions matterCenterServiceFunctions,
     IMatterRepository matterRepositoy,
     ICustomLogger customLogger, IOptions<LogTables> logTables,
     IValidationFunctions validationFunctions,
     IEditFunctions editFunctions,
     IMatterProvision matterProvision
     )
 {
     this.errorSettings = errorSettings.Value;
     this.matterSettings = matterSettings.Value;            
     this.matterCenterServiceFunctions = matterCenterServiceFunctions;
     this.matterRepositoy = matterRepositoy;
     this.customLogger = customLogger;
     this.logTables = logTables.Value;
     this.validationFunctions = validationFunctions;
     this.editFunctions = editFunctions;
     this.matterProvision = matterProvision;
 }
コード例 #21
0
ファイル: AzureLogger.cs プロジェクト: Microsoft/mattercenter
 /// <summary>
 /// Logs message to Azure table storage.
 /// </summary>
 /// <param name="exception">Exception Object</param>
 /// <param name="className">Class Name where exception occur</param>
 /// <param name="methodName">Method Name where exception occur</param>
 /// <param name="logTableName">Name of the log table.</param>
 /// <param name="lineNumber">Line Number of the log table.</param>
 /// <returns>Returns date of logging</returns>
 internal static string LogInAzure(Exception exception, string className, string methodName, 
     string logTableName, int lineNumber, LogTables logTables, GeneralSettings generalSettings)
 {
     string connStr = generalSettings.CloudStorageConnectionString;
     CloudStorageAccount storageAccount = CloudStorageAccount.Parse(connStr);
     CloudTableClient client = storageAccount.CreateCloudTableClient();
     CloudTable table = client.GetTableReference(logTableName);
     table.CreateIfNotExists();
     AzureLogEntity tableEntityObj = new AzureLogEntity();
     tableEntityObj.PartitionKey = className;
     tableEntityObj.MethodName = methodName;
     string date = DateTime.Now.ToUniversalTime().ToString(logTables.AzureRowKeyDateFormat, CultureInfo.InvariantCulture);
     tableEntityObj.RowKey = string.Format(CultureInfo.InvariantCulture, "{0} - {1}", date, Guid.NewGuid().ToString());
     tableEntityObj.Stacktrace = exception.StackTrace;
     tableEntityObj.LogMessage = exception.Message;
     tableEntityObj.ErrorCode = exception.HResult;
     tableEntityObj.LineNumber = lineNumber;
     TableOperation insertOp = TableOperation.Insert(tableEntityObj);
     table.Execute(insertOp);
     return date;
 }
コード例 #22
0
 public DocumentProvision(IDocumentRepository docRepository, 
     IUserRepository userRepository, 
     IUploadHelperFunctions uploadHelperFunctions, 
     IOptions<GeneralSettings> generalSettings, 
     IOptions<DocumentSettings> documentSettings, 
     ICustomLogger customLogger,
     IOptions<SearchSettings> searchSettings,
     IConfigurationRoot configuration,
     IHttpContextAccessor httpContextAccessor,
     IOptions<LogTables> logTables, IOptions<ErrorSettings> errorSettings)
 {
     this.docRepository = docRepository;
     this.uploadHelperFunctions = uploadHelperFunctions;
     this.userRepository = userRepository;
     this.generalSettings = generalSettings.Value;
     this.documentSettings = documentSettings.Value;
     this.customLogger = customLogger;
     this.logTables = logTables.Value;
     this.errorSettings = errorSettings.Value;
     this.searchSettings = searchSettings.Value;
     this.configuration = configuration;
     this.httpContextAccessor = httpContextAccessor;
 }
コード例 #23
0
ファイル: SPList.cs プロジェクト: Microsoft/mattercenter
 /// <summary>
 /// All the dependencies are injected into the constructor
 /// </summary>
 /// <param name="spoAuthorization"></param>
 /// <param name="generalSettings"></param>
 public SPList(ISPOAuthorization spoAuthorization,
     IOptions<CamlQueries> camlQueries, 
     IOptions<ErrorSettings> errorSettings,
     IOptions<SearchSettings> searchSettings,
     IOptions<ContentTypesConfig> contentTypesConfig,
     ICustomLogger customLogger, 
     IOptions<LogTables> logTables, 
     IOptions<MailSettings> mailSettings,
     IOptions<GeneralSettings> generalSettings,
     IHostingEnvironment hostingEnvironment, 
     IUsersDetails userDetails)
 {
     this.searchSettings = searchSettings.Value;
     this.camlQueries = camlQueries.Value;
     this.spoAuthorization = spoAuthorization;
     this.customLogger = customLogger;
     this.logTables = logTables.Value;
     this.mailSettings = mailSettings.Value;
     this.hostingEnvironment = hostingEnvironment;
     this.errorSettings = errorSettings.Value;
     this.userDetails = userDetails;
     this.generalSettings = generalSettings.Value;
 }
コード例 #24
0
 public CustomLogger(IOptions<LogTables> logTables, IOptions<GeneralSettings> generalSettings)
 {
     this.logTables = logTables.Value;
     this.generalSettings = generalSettings.Value;
     
 }
コード例 #25
0
 public CustomLogger(IOptions <LogTables> logTables, IOptions <GeneralSettings> generalSettings)
 {
     this.logTables       = logTables.Value;
     this.generalSettings = generalSettings.Value;
 }