public BrowserCapabilitiesCodeGenerator() { _headers = new CaseInsensitiveStringSet(); }
internal void AddTypeNames(ICollection typeNames) { if (typeNames == null) { return; } if (_registeredTypeNames == null) { _registeredTypeNames = new CaseInsensitiveStringSet(); } _registeredTypeNames.AddCollection(typeNames); }
private bool BatchCompileWebDirectory(VirtualDirectory vdir, VirtualPath virtualDir, bool ignoreErrors) { // Exactly one of vdir and virtualDir should be non-null. The idea is to avoid calling // VirtualPathProvider.GetDirectory if batching is disabled (VSWhidbey 437549). if (virtualDir == null) virtualDir = vdir.VirtualPathObject; if (vdir == null) vdir = HostingEnvironment.VirtualPathProvider.GetDirectory(virtualDir); // Then, check if we're already tried batch compiling this directory on this same request CaseInsensitiveStringSet directoryBatchCompilerChecker; directoryBatchCompilerChecker = CallContext.GetData(BatchCompilationSlotName) as CaseInsensitiveStringSet; if (directoryBatchCompilerChecker == null) { directoryBatchCompilerChecker = new CaseInsensitiveStringSet(); // Create it and save it in the CallContext CallContext.SetData(BatchCompilationSlotName, directoryBatchCompilerChecker); } // If we've already tried batch compiling this directory, don't do anything if (directoryBatchCompilerChecker.Contains(vdir.VirtualPath)) return false; // Add the current virtualDir to the batch compiler checker directoryBatchCompilerChecker.Add(vdir.VirtualPath); // If we're in the process of precompiling an app, never ignore errors. if (_precompilingApp) ignoreErrors = false; return BatchCompileWebDirectoryInternal(vdir, ignoreErrors); }
internal void AddTypeNames(ICollection typeNames) { if (typeNames != null) { if (this._registeredTypeNames == null) { this._registeredTypeNames = new CaseInsensitiveStringSet(); } this._registeredTypeNames.AddCollection(typeNames); } }