コード例 #1
0
 /// <summary>
 /// Initializes a new instance of the <see cref="SharePointFileManager" /> class.
 /// </summary>
 /// <param name="context">The context.</param>
 /// <param name="url">The URL.</param>
 /// <param name="log">The log.</param>
 public SharePointFileManager(ClientContext context, string url = null, ILogger log = null)
 {
     _context = context;
     _web     = new SPWebManager(_context, log).LoadWebAsync(url).ConfigureAwait(false).GetAwaiter().GetResult();
     _log     = log;
     Files    = new FileShaman(_web, log);
     Folders  = new FolderShaman(_web, log);
 }
コード例 #2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="BrandingService"/> class.
 /// </summary>
 /// <param name="ctx">The CTX.</param>
 /// <param name="target">The target.</param>
 /// <param name="defines">The defines.</param>
 /// <param name="log">The log.</param>
 /// <param name="branding">The branding.</param>
 public BrandingService(ClientContext ctx, string target, string[] defines, ILogger log, IBranding branding)
 {
     _ctx        = ctx;
     _target     = target;
     _defines    = defines;
     _branding   = branding;
     _log        = log;
     _webManager = new SPWebManager(_ctx, log);
     _web        = _webManager.LoadWebAsync().ConfigureAwait(false).GetAwaiter().GetResult();
     _fileShaman = new FileShaman(_web, log);
     _pageShaman = new PageShaman(_web, log);
     _jsInjector = new JsInjector(_web, log);
 }