430 references to Assert
System.Web (430)
AspNetSynchronizationContext.cs (1)
94Debug.Assert(_state.SyncControlDisassociationActions.Count > 0, "DisassociateFromCurrentThread() was called on a thread which hadn't previously called AssociateWithCurrentThread().");
Cache\CacheDependency.cs (3)
91Debug.Assert(s_dependencyEmpty == null, "s_dependencyEmpty == null"); 559Debug.Assert(_objNotify == null, "_objNotify == null"); 729Debug.Assert(_objNotify == null, "_objNotify == null");
Cache\CacheEntry.cs (1)
319Debug.Assert(State == EntryState.RemovedFromCache, "State == EntryState.RemovedFromCache");
Cache\OutputCache.cs (2)
146Debug.Assert(false, "Unexpected, " + providerName + " should be a member of the collection."); 158Debug.Assert(context != null, "context != null");
Cache\SqlCacheDependency.cs (12)
243Debug.Assert(sqlDependencies.Count > 0, "sqlDependencies.Count > 0"); 521Debug.Assert(_poolConn, "_poolConn"); 522Debug.Assert(_sqlCmd != null, "_sqlCmd != null"); 558Debug.Assert(sqlCmd == null, "sqlCmd == null"); 562Debug.Assert(sqlCmd != null, "sqlCmd != null"); 632Debug.Assert(s_shutdown != true, "s_shutdown != true"); 870Debug.Assert(!dbState._tables.ContainsKey(tableName), 880Debug.Assert(dbState._tables.ContainsKey(tableName), 1096Debug.Assert(dbRegistered == false, "When this error happened, we shouldn't be able to poll the database"); 1141Debug.Assert(s_DatabaseNotifStates[database] != null, "s_DatabaseNotifStates[database] != null"); 1161Debug.Assert(dbState != null, "AddRef: s_DatabaseNotifStates[database] != null"); 1618Debug.Assert(!disable && table != null, "disable && table != null");
CachedPathData.cs (8)
168Debug.Assert(ConfigPathUtility.IsValid(configPath), "ConfigPathUtility.IsValid(configPath)"); 169Debug.Assert(configPath == configPath.ToLower(CultureInfo.InvariantCulture), "configPath == configPath.ToLower(CultureInfo.InvariantCulture)"); 358Debug.Assert(dataAdd._flags[FInited], "_flags[FInited]"); 495Debug.Assert(configPath == configPath.ToLower(CultureInfo.InvariantCulture), "configPath == configPath.ToLower(CultureInfo.InvariantCulture)"); 503Debug.Assert(_runtimeConfig == RuntimeConfig.GetErrorRuntimeConfig(), "_runtimeConfig == RuntimeConfig.GetErrorRuntimeConfig()"); 513Debug.Assert(configRecord != null, "configRecord != null"); 526Debug.Assert(parentData != null, "parentData != null"); 576Debug.Assert(false, "ValidatePath optimization failed: Request.PhysicalPath="
Compilation\AssemblyBuilder.cs (3)
895Debug.Assert(providerOptionName != null, "providerOptionName should not be null"); 896Debug.Assert(trueCompilerOption != null, "trueCompilerOption should not be null"); 897Debug.Assert(falseCompilerOption != null, "falseCompilerOption should not be null");
Compilation\BaseCodeDomTreeGenerator.cs (1)
168Debug.Assert(_designerMode, "This method should only be used in design mode.");
Compilation\BaseTemplateCodeDomTreeGenerator.cs (8)
440Debug.Assert(autoTemplateName != null && autoTemplateName.Length > 0, "Template Name is empty."); 453Debug.Assert(false, "baseClassType is not an INamingContainer"); 592Debug.Assert(child is CodeBlockBuilder, "child is CodeBlockBuilder"); 755Debug.Assert(pseSub.Name.IndexOf('.') < 0, "pseSub._name.IndexOf('.') < 0"); 869Debug.Assert(eb != null, "Did not expect null expression builder"); 1288Debug.Assert(child is string, "child is string"); 1411Debug.Assert(!entry.ReadOnlyProperty, "We should not attempt to build a data binding handler if the two way entry is read only."); 1412Debug.Assert(!entry.UseSetAttribute, "Two-way binding is not supported on expandos - this should have been prevented in ControlBuilder");
Compilation\BuildManager.cs (1)
690Debug.Assert(File.Exists(_webHashFilePath), _webHashFilePath);
Compilation\BuildResult.cs (3)
117Debug.Assert(false, "code=" + code); 984Debug.Assert(false, "BuildResultNoCompileTemplateControl"); 1260Debug.Assert(FileUtil.FileExists(_ccuPreservationFileName), _ccuPreservationFileName);
Compilation\BuildResultCache.cs (1)
749Debug.Assert(hash != null && hash.Item1 != 0 && hash.Item2 != 0, "SavePreservedSpecialFilesCombinedHash: hash0 != 0, hash1 != 0");
Compilation\ClientBuildManager.cs (1)
651Debug.Assert(!_hostCreationPending, "CreateHost: creation already pending");
Compilation\ClientBuildManagerTypeDescriptionProviderBridge.cs (1)
24Debug.Assert(_targetFrameworkProvider != null, "_targetFrameworkProvider should not be null");
Compilation\CompilationUtil.cs (3)
512Debug.Assert(codeDomProviderType != null, "codeDomProviderType should not be null"); 551Debug.Assert(ci != null, "CompilerInfo ci should not be null"); 641Debug.Assert(version.Length > 1, "Version has invalid length");
Compilation\ExpressionBuilder.cs (1)
85Debug.Assert(expressionBuilderType != null, "expressionBuilderType should not be null");
Compilation\MultiTargetingUtil.cs (1)
80Debug.Assert(s_targetFrameworkName != null, "s_targetFrameworkName should not be null");
Compilation\PreservationFileReader.cs (4)
73Debug.Assert(_root != null && _root.Name == "preserve", "_root != null && _root.Name == \"preserve\""); 94Debug.Assert(hashString != null, "hashString != null"); 193Debug.Assert(false, dependenciesNode.Name); 215Debug.Assert(fileName != null, "fileName != null");
Compilation\PreservationFileWriter.cs (1)
59Debug.Assert(hash != 0, "hash != 0");
Configuration\AuthenticationConfig.cs (1)
42Debug.Assert(value == AuthenticationMode.Forms, "Only Forms mode can be set to override config");
Configuration\EventMappingSettings.cs (1)
56get { Debug.Assert(_type != null, "_type != null"); return _type; }
Configuration\ExpressServerConfig.cs (2)
86Debug.Assert(false, "siteID is not numeric"); 319Debug.Assert(!String.IsNullOrEmpty(siteName), "!String.IsNullOrEmpty(siteName), siteArg=" + siteArgument);
Configuration\HealthMonitoringSectionHelper.cs (6)
135Debug.Assert(eventMappingSettings.ElementInformation.Properties[attribute].LineNumber != 0, 238Debug.Assert(ruleInfo._referencedProvider == null, "ruleInfo._referencedProvider == null"); 246Debug.Assert(provider != null, "provider != null"); 256Debug.Assert(profileSettings != null, "profileSettings != null"); 540Debug.Assert(type != null, "type != null"); 572Debug.Assert(provider != null, "provider != null");
Configuration\HttpConfigurationSystem.cs (5)
127Debug.Assert(s_httpConfigSystem != null, "s_httpConfigSystem != null - The appdomain is using the client configuration system."); 131Debug.Assert(!s_initComplete, "!s_initComplete"); 150Debug.Assert(s_httpConfigSystem == null, "s_httpConfigSystem == null"); 209Debug.Assert(UseHttpConfigurationSystem, "UseHttpConfigurationSystem"); 227Debug.Assert(UseHttpConfigurationSystem, "UseHttpConfigurationSystem");
Configuration\MachineKeySection.cs (1)
568Debug.Assert(iv != null, "Invalid value for IVType: " + ivType.ToString("G"));
Configuration\ProcessHostMapPath.cs (3)
50Debug.Assert(IntPtr.Zero != configSystem, "null != configSystem"); 77Debug.Assert(!String.IsNullOrEmpty(rootWeb), "rootWeb != null or empty"); 160Debug.Assert(!String.IsNullOrEmpty(siteName), "!String.IsNullOrEmpty(siteName), siteArg=" + siteArgument);
Configuration\ProcessHostServerConfig.cs (2)
57Debug.Assert(IntPtr.Zero != configSystem, "null != configSystem"); 76Debug.Assert(false, "siteID is not numeric");
Configuration\ProtocolsConfigurationHandler.cs (1)
47Debug.Assert(parent == null, "<protocols> config is only allowed in machine.config");
Configuration\WebConfigurationHost.cs (2)
128Debug.Assert(!String.IsNullOrEmpty(appSiteID), "No appSiteID found when site argument is null"); 219Debug.Assert(configMapPath == null || useConfigMapPath, "non-null configMapPath without useConfigMapPath == true");
FileChangesMonitor.cs (5)
1008Debug.Assert(fileName == null, "fileName == null"); 1009Debug.Assert(action != FileAction.Overwhelming, "action != FileAction.Overwhelming"); 1035Debug.Assert((int) action >= 1 && fileName != null && fileName.Length > 0, 1081Debug.Assert(StringUtil.EqualsIgnoreCase(fileMon.FileNameLong, ffd.FileNameLong), 1195Debug.Assert(action == FileAction.Modified, "action == FileAction.Modified");
Handlers\AssemblyResourceLoader.cs (3)
145Debug.Assert(assemblyInfo != null, "Assembly info should not be null"); 193Debug.Assert(assembly != null, "Type.Assembly should never be null."); 525Debug.Assert(separatorIndex != -1, "The decrypted data must contain a separator.");
Hosting\ApplicationManager.cs (2)
1611Debug.Assert(hostExecutionContextManager is HostExecutionContextManager || hostExecutionContextManager.GetType() == typeof(object), "THostExecutionContextManager was an unexpected type!"); 1617Debug.Assert(hostSecurityManager is HostSecurityManager || hostSecurityManager.GetType() == typeof(object), "THostSecurityManager was an unexpected type!");
Hosting\AsyncResultBase.cs (2)
66Debug.Assert(originalThread == null, "Another thread already called MarkCallToBeginMethodStarted."); 71Debug.Assert(originalThread == Thread.CurrentThread, "This thread did not call MarkCallToBeginMethodStarted.");
Hosting\CustomRuntimeManager.cs (1)
91Debug.Assert(removed, "Entry did not exist in the dictionary; was it removed twice?");
Hosting\HostingEnvironment.cs (2)
322Debug.Assert(File.Exists(rootWebConfigPath), "File.Exists(rootWebConfigPath)"); 1656Debug.Assert(baseVirtualDir != null, "baseVirtualDir != null");
Hosting\IIS7WorkerRequest.cs (6)
1324Debug.Assert(null !=bytes, "null != bytes"); 1723Debug.Assert(numFragments > startFragments, "numFragments > startFragments"); 1881Debug.Assert(fragmentTypes[i] <= 1, "invalid fragment type"); 2019Debug.Assert(HttpWorkerRequest.HeaderUserAgent == 39, "HttpWorkerRequest.HeaderUserAgent == 39"); 2154Debug.Assert(HttpWorkerRequest.HeaderUserAgent == 39, "HttpWorkerRequest.HeaderUserAgent == 39"); 2155Debug.Assert(HttpWorkerRequest.RequestHeaderMaximum == 40, "HttpWorkerRequest.RequestHeaderMaximum == 40");
Hosting\IPipelineRuntime.cs (2)
527Debug.Assert(root != null, "We should have a RootedObjects instance by this point."); 528Debug.Assert(wr != null, "We should have an IIS7WorkerRequest instance by this point.");
Hosting\ProcessHost.cs (5)
688Debug.Assert(_functions != null, "_functions != null"); 931Debug.Assert( !String.IsNullOrEmpty(physicalPath), "!String.IsNullOrEmpty(physicalPath)"); 1325Debug.Assert( HostingEnvironment.IsHosted, "HostingEnvironment.IsHosted" ); 1326Debug.Assert( null != handler, "null != handler" ); 1330Debug.Assert(null != unwrappedProxy, "null != unwrappedProxy");
Hosting\SuspendManager.cs (1)
146Debug.Assert(!_resumeWasCalled, "Resume was called too many times!");
HttpApplication.cs (16)
237Debug.Assert(_moduleIndexMap != null && _moduleIndexMap.Count > 0, "_moduleIndexMap != null && _moduleIndexMap.Count > 0"); 571Debug.Assert(HttpRuntime.UseIntegratedPipeline, "HttpRuntime.UseIntegratedPipeline"); 576Debug.Assert(HttpRuntime.UseIntegratedPipeline, "HttpRuntime.UseIntegratedPipeline"); 707Debug.Assert(container != null, "container != null"); 1627Debug.Assert(context != null, "context != null"); 1649Debug.Assert(_moduleConfigInfo != null, "_moduleConfigInfo != null"); 1650Debug.Assert(_moduleConfigInfo.Count >= 0, "_moduleConfigInfo.Count >= 0"); 1666Debug.Assert(null == _moduleContainers, "null == _moduleContainers"); 2345Debug.Assert(null != _moduleConfigInfo, "null != _moduleConfigInfo"); 2729Debug.Assert(HttpRuntime.UseIntegratedPipeline, "HttpRuntime.UseIntegratedPipeline"); 2828Debug.Assert(!String.IsNullOrEmpty(moduleName), "!String.IsNullOrEmpty(moduleName)"); 3394Debug.Assert(context.ConfigurationPath == context.Request.FilePathObject, "context.ConfigurationPath (" + 4290Debug.Assert(needToDisassociateThreadContext == true, "needToDisassociateThreadContext MUST BE true"); 4306Debug.Assert(needToDisassociateThreadContext == true, "needToDisassociateThreadContext MUST BE true"); 4396Debug.Assert(originalState == ASYNC_STATE_BEGIN_UNWOUND, "Unexpected state."); 4418Debug.Assert(originalState == ASYNC_STATE_CALLBACK_COMPLETED, "Unexpected state.");
HttpAsyncResult.cs (2)
112Debug.Assert(originalThread == null, "Another thread already called MarkCallToBeginMethodStarted."); 117Debug.Assert(originalThread == Thread.CurrentThread, "This thread did not call MarkCallToBeginMethodStarted.");
HttpCacheParams.cs (3)
53Debug.Assert(parameters.Length == 1, "parameters.Length == 1"); 58Debug.Assert(parameters.Length == 1, "parameters.Length == 1"); 115Debug.Assert(j == c, "j == c");
HttpCachePolicy.cs (2)
313Debug.Assert(_validationCallbackInfo[i].data == null, "_validationCallbackInfo[i].data == null"); 1183Debug.Assert(_utcTimestampCreated != DateTime.MinValue, "_utcTimestampCreated != DateTime.MinValue");
HttpCacheVary.cs (2)
56Debug.Assert(headers.Length == 1, "headers.Length == 1"); 137Debug.Assert(j == c, "j == c");
HttpContext.cs (1)
1013Debug.Assert(_sessionStateModule != null, "_sessionStateModule != null");
HttpHeaderCollection.cs (1)
100Debug.Assert(_iis7WorkerRequest != null, "_iis7WorkerRequest != null");
HttpResponse.cs (2)
1476Debug.Assert(_wr is IIS7WorkerRequest, "_wr is IIS7WorkerRequest"); 3320Debug.Assert(!url.Contains("?"), "Querystring should have been stripped off.");
HttpRuntime.cs (2)
1529Debug.Assert(status != RequestNotificationStatus.Pending, "status != RequestNotificationStatus.Pending"); 2549Debug.Assert(TrustLevel != null || !HostingEnvironment.IsHosted, "TrustLevel != null || !HostingEnvironment.IsHosted");
HttpWriter.cs (2)
559Debug.Assert(s != null, "s != null"); 596Debug.Assert(HttpRuntime.UseIntegratedPipeline, "HttpRuntime.UseIntegratedPipeline");
Management\regiisutil.cs (1)
295Debug.Assert(appPath.StartsWith("/", StringComparison.Ordinal), "This check is done in main.cxx in regiis");
Management\SimpleMailWebEventProvider.cs (1)
163Debug.Assert(events.Count > 0, "events.Count > 0");
Management\webeventbuffer.cs (8)
132Debug.Assert(callback != null, "callback != null"); 324Debug.Assert(max > 0, "max > 0"); 410Debug.Assert(reason != FlushCallReason.UrgentFlushThresholdExceeded, "reason != FlushCallReason.UrgentFlushThresholdExceeded"); 436Debug.Assert(!(!_regularTimeoutUsed && !_urgentFlushScheduled), 498Debug.Assert(_regularFlushIntervalMs == Infinite, "We can dispose the timer only if _regularFlushIntervalMs == Infinite"); 512Debug.Assert(lastFlushTime != DateTime.MaxValue, "lastFlushTime != DateTime.MaxValue"); 513Debug.Assert(discardedSinceLastFlush != -1, "discardedSinceLastFlush != -1"); 514Debug.Assert(eventsInBuffer != -1, "eventsInBuffer != -1");
Management\WebEventCodes.cs (4)
356Debug.Assert(false, "ASP.NET event code " + eventCode.ToString(CultureInfo.InvariantCulture) + " doesn't have message string mapped to it"); 385Debug.Assert(dim == 0 || dim == 1, "dim == 0 || dim == 1"); 395Debug.Assert(index0 >= 0 && index0 < GetEventArrayDimensionSize(0), "Index0 of system eventCode out of expected range: " + eventCode); 396Debug.Assert(index1 >= 0 && index1 < GetEventArrayDimensionSize(1), "Index1 of system eventCode out of expected range: " + eventCode);
Management\WebEvents.cs (5)
519Debug.Assert(manager != null, "manager != null"); 678Debug.Assert(false, "Unexpected system event code = " + eventCode); 827Debug.Assert(false, "WebEventProviderInformation shouldn't be used to Raise an event"); 886Debug.Assert(false, "Unexpected event type = " + systemEventType); 2202Debug.Assert(ruleInfo != null, "ruleInfo != null");
OutputCacheModule.cs (8)
175Debug.Assert(cachedVary._params == null || !cachedVary._varyByAllParams, "cachedVary._params == null || !cachedVary._varyByAllParams"); 188Debug.Assert(cachedVary._params == null || !cachedVary._varyByAllParams, "cachedVary._params == null || !cachedVary._varyByAllParams"); 202Debug.Assert(a == null || !getAllParams, "a == null || !getAllParams"); 588Debug.Assert(_key != null, "_key != null"); 673Debug.Assert(item == null || item is CachedRawResponse, "item == null || item is CachedRawResponse"); 696Debug.Assert(item is CachedRawResponse, "item is CachedRawResponse"); 867Debug.Assert(validationStatusFinal == HttpValidationStatus.Valid, 1182Debug.Assert(_key != null, "_key != null");
parent\parent\parent\misc\ConfigPathUtility.cs (1)
118Debug.Assert(String.IsNullOrEmpty(configPath) || IsValid(configPath), "String.IsNullOrEmpty(configPath) || IsValid(configPath)");
PipelineModuleStepContainer.cs (8)
71Debug.Assert(null != steps, "null != steps"); 74Debug.Assert(index != -1, "index != -1"); 82Debug.Assert(null != stepArray, "null != stepArray"); 99Debug.Assert(eventIndex >= 0, "eventIndex >= 0"); 100Debug.Assert(eventIndex < stepArray.Count, "eventIndex < stepArray.Count"); 156Debug.Assert(index != -1, "index != -1"); 174Debug.Assert(steps != null, "steps != null"); 253Debug.Assert(index != -1, "invalid request notification--need to update switch table?");
RootedObjects.cs (3)
236Debug.Assert(rootedObjects._requestActivityIdRefCount >= 2, "The original ref count should have been 1 or higher, else the activity ID could already have been released."); 254Debug.Assert(ActivityIdHelper.Instance.CurrentThreadActivityId == _rootedObjects._requestActivityId, "Unexpected activity ID on current thread."); 261Debug.Assert(_rootedObjects._requestActivityIdRefCount >= 0, "Somebody called Dispose() too many times.");
Security\ADMembershipProvider.cs (4)
4417Debug.Assert(directoryEntry != null, "PropertyManager::GetPropertyValue - directoryEntry is null"); 4418Debug.Assert(propertyName != null, "PropertyManager::GetPropertyValue - propertyName is null"); 4434Debug.Assert(res != null, "PropertyManager::GetSearchResultPropertyValue - res is null"); 4435Debug.Assert(propertyName != null, "PropertyManager::GetSearchResultPropertyValue - propertyName is null");
Security\Cryptography\CryptographicKey.cs (2)
34Debug.Assert(offset % 8 == 0, "Offset must be divisible by 8."); 35Debug.Assert(count % 8 == 0, "Count must be divisible by 8.");
Security\FormsAuthenticationTicketSerializer.cs (1)
188Debug.Assert(ticketBlobStream.Position == 10, "Critical that we be at position 10 in the stream at this point.");
Security\RoleManagerModule.cs (1)
98Debug.Assert(null != context.User, "null != context.User");
State\InProcStateClientManager.cs (8)
220Debug.Assert(lockId != null, "lockId != null"); 258Debug.Assert(item.Items != null, "item.Items != null"); 259Debug.Assert(item.StaticObjects != null, "item.StaticObjects != null"); 260Debug.Assert(item.Timeout <= SessionStateModule.MAX_CACHE_BASED_TIMEOUT_MINUTES, "item.Timeout <= SessionStateModule.MAX_CACHE_BASED_TIMEOUT_MINUTES"); 273Debug.Assert(lockId != null, "lockId != null"); 282Debug.Assert((stateCurrent._flags & (int)SessionStateItemFlags.Uninitialized) == 0, "Should never set an unitialized item; key = " + key); 366Debug.Assert(timeout <= SessionStateModule.MAX_CACHE_BASED_TIMEOUT_MINUTES, "item.Timeout <= SessionStateModule.MAX_CACHE_BASED_TIMEOUT_MINUTES"); 406Debug.Assert(lockId != null, "lockId != null");
State\OutOfProcStateClientManager.cs (9)
272Debug.Assert(timeout <= SessionStateModule.MAX_CACHE_BASED_TIMEOUT_MINUTES, "item.Timeout <= SessionStateModule.MAX_CACHE_BASED_TIMEOUT_MINUTES"); 389Debug.Assert(false, "Unknown results.lastPhase: " + results.lastPhase); 503Debug.Assert((results.actionFlags & (int)SessionStateActions.InitializeItem) == 0, 545Debug.Assert(lockId != null, "lockId != null"); 567Debug.Assert(item.Items != null, "item.Items != null"); 568Debug.Assert(item.StaticObjects != null, "item.StaticObjects != null"); 600Debug.Assert(lockId != null, "lockId != null"); 623Debug.Assert(timeout <= SessionStateModule.MAX_CACHE_BASED_TIMEOUT_MINUTES, "item.Timeout <= SessionStateModule.MAX_CACHE_BASED_TIMEOUT_MINUTES"); 694Debug.Assert(socket != OutOfProcSessionStateStore.INVALID_SOCKET,
State\SessionIDManager.cs (1)
253Debug.Assert(o != null, "GetCookielessSessionID should be run already");
State\SessionStateContainer.cs (1)
83Debug.Assert(_stateModule != null, "_stateModule != null");
State\SessionStateModule.cs (34)
484Debug.Assert(_rqIctx == null, "_rqIctx == null"); 485Debug.Assert(_rqChangeImpersonationRefCount == 0, "_rqChangeImpersonationRefCount == 0"); 737Debug.Assert(_rqId == null || // Session id isn't found in the request, OR 745Debug.Assert(_rqChangeImpersonationRefCount > 0, "Must call ChangeImpersonation first"); 765Debug.Assert(_rqId != null, "Session State ID must exist"); 766Debug.Assert(_rqItem != null, "Session State item must exist"); 795Debug.Assert(!(s_allowDelayedStateStoreItemCreation && s_configRegenerateExpiredSessionId), 878Debug.Assert(_rqChangeImpersonationRefCount > 0, "Must call ChangeImpersonation first"); 888Debug.Assert(_rqId != null || s_allowInProcOptimization, "_rqId != null || s_allowInProcOptimization"); 930Debug.Assert(s_allowInProcOptimization, "Shouldn't be called if we don't allow InProc optimization"); 931Debug.Assert(_rqId == null, "Shouldn't be called if we already have the id"); 932Debug.Assert(!((SessionIDManager)_idManager).UseCookieless(_rqContext), "We can delay session id only if we are not using cookieless"); 946Debug.Assert(!redirected, "DelayedGetSessionId shouldn't redirect us here."); 960Debug.Assert(_rqId != null, "_rqId != null"); 961Debug.Assert(_rqChangeImpersonationRefCount > 0, "Must call ChangeImpersonation first"); 965Debug.Assert(storedItem != null, "Must succeed in locking session state item."); 974Debug.Assert(_rqId != null, "_rqId != null"); 975Debug.Assert(_rqChangeImpersonationRefCount > 0, "Must call ChangeImpersonation first"); 1150Debug.Assert(_rqIctx == null, "_rqIctx == null"); 1158Debug.Assert(_rqChangeImpersonationRefCount != 0, "_rqChangeImpersonationRefCount != 0"); 1163Debug.Assert(!(_rqIctx != null && _rqTimerThreadImpersonationIctx != null), "Should not have mixed mode of impersonation"); 1171Debug.Assert(_rqContext != null, "_rqContext != null"); 1179Debug.Assert(_rqId != null, "_rqId != null"); 1206Debug.Assert(_timer != null, "_timer != null"); 1239Debug.Assert(s_allowInProcOptimization, "s_allowInProcOptimization"); 1243Debug.Assert(_rqId != null, "_rqId != null"); 1261Debug.Assert(!(_rqAddedCookie && !_rqIsNewSession), 1312Debug.Assert(s_allowDelayedStateStoreItemCreation, "s_allowDelayedStateStoreItemCreation"); 1313Debug.Assert(_rqItem == null, "_rqItem == null"); 1322Debug.Assert(_rqItem != null, "_rqItem cannot null if it's not a new session"); 1347Debug.Assert(_rqIsNewSession, "Saving a session and delayedSessionState is true: _rqIsNewSession must be true"); 1348Debug.Assert(s_allowDelayedStateStoreItemCreation, "Saving a session and delayedSessionState is true: s_allowDelayedStateStoreItemCreation"); 1349Debug.Assert(_rqItem == null, "Saving a session and delayedSessionState is true: _rqItem == null"); 1383Debug.Assert(_rqItem != null, "_rqItem cannot null if it's not a new session");
State\sqlstateclientmanager.cs (24)
254Debug.Assert(context != null, "context != null"); 266Debug.Assert(context != null, "context != null"); 273Debug.Assert(s_usePartition, "_partitionInfo can be null only if we're using paritioning and we haven't called GetConnection yet."); 419Debug.Assert(id.Length <= SessionIDManager.SESSION_ID_LENGTH_LIMIT, "id.Length <= SessionIDManager.SESSION_ID_LENGTH_LIMIT"); 420Debug.Assert(context != null, "context != null"); 433Debug.Assert(_partitionInfo != null, "_partitionInfo != null"); 434Debug.Assert(_partitionInfo.SupportFlags != SupportFlags.Uninitialized, "_partitionInfo.SupportFlags != SupportFlags.Uninitialized"); 516Debug.Assert(!Convert.IsDBNull(cmd.Parameters[3].Value), "!Convert.IsDBNull(cmd.Parameters[3].Value)"); 517Debug.Assert(!Convert.IsDBNull(cmd.Parameters[4].Value), "!Convert.IsDBNull(cmd.Parameters[4].Value)"); 524Debug.Assert(((int)cmd.Parameters[5].Value & (int)SessionStateActions.InitializeItem) == 0, 549Debug.Assert(!Convert.IsDBNull(cmd.Parameters[1].Value), "!Convert.IsDBNull(cmd.Parameters[1].Value)"); 552Debug.Assert(buf != null, "buf != null"); 598Debug.Assert(lockId != null, "lockId != null"); 599Debug.Assert(context != null, "context != null"); 632Debug.Assert(context != null, "context != null"); 637Debug.Assert(item.Items != null, "item.Items != null"); 638Debug.Assert(item.StaticObjects != null, "item.StaticObjects != null"); 664Debug.Assert(_rqOrigStreamLen > 0, "_rqOrigStreamLen > 0"); 711Debug.Assert(lockId != null, "lockId != null"); 712Debug.Assert(context != null, "context != null"); 734Debug.Assert(context != null, "context != null"); 754Debug.Assert(context != null, "context != null"); 760Debug.Assert(context != null, "context != null"); 1082Debug.Assert(!Convert.IsDBNull(p), "!Convert.IsDBNull(p)");
State\StateWorkerRequest.cs (7)
86Debug.Assert(false, "Shouldn't get here!"); 311Debug.Assert(_exclusive == UnsafeNativeMethods.StateProtocolExclusive.RELEASE, "_exclusive == UnsafeNativeMethods.StateProtocolExclusive.RELEASE"); 405Debug.Assert(_unmanagedState == IntPtr.Zero, "_unmanagedState == 0"); 406Debug.Assert(length == IntPtr.Size, "length == IntPtr.Size"); 407Debug.Assert(_methodIndex == UnsafeNativeMethods.StateProtocolVerb.GET, "verb == GET"); 408Debug.Assert(_exclusive != UnsafeNativeMethods.StateProtocolExclusive.RELEASE, 430Debug.Assert(_unmanagedState != IntPtr.Zero, "_unmanagedState != 0");
StaticFileHandler.cs (1)
181Debug.Assert(startIndex < rangeHeader.Length, "startIndex < rangeHeader.Length");
ThreadContext.cs (6)
57Debug.Assert(Current != this, "This ThreadContext is already associated with this thread."); 58Debug.Assert(!HasBeenDisassociatedFromThread, "This ThreadContext has already been disassociated from a thread."); 126Debug.Assert(Current == this, "This ThreadContext isn't associated with current thread."); 127Debug.Assert(!HasBeenDisassociatedFromThread, "This ThreadContext has already been disassociated from a thread."); 174Debug.Assert(Current == this, "This ThreadContext isn't associated with current thread."); 175Debug.Assert(!HasBeenDisassociatedFromThread, "This ThreadContext has already been disassociated from a thread.");
UI\BindableTemplateBuilder.cs (3)
46Debug.Assert(bindableTemplateBuilder != null, "ExtractTemplateValuesMethod called on non-BindableTemplateBuilder."); 66Debug.Assert(subBuilderControlBuilder.TemplateControl != null, "TemplateControl should not be null in no-compile pages. We need it for the FilterResolutionService."); 105Debug.Assert(false, "BoundPropertyEntry is of wrong control type or couldn't be found. Expected " + entry.ControlType.Name);
UI\CollectionBuilder.cs (1)
52Debug.Assert(ControlType != null, "ControlType != null");
UI\ControlBuilder.cs (17)
102Debug.Assert(ctrlType != null, "Control type is null."); 103Debug.Assert(typeof(INamingContainer).IsAssignableFrom(ctrlType), String.Format(CultureInfo.InvariantCulture, "NamingContainerBuilder.Control type {0} is not an INamingContainer", ctrlType.FullName)); 120Debug.Assert(ctrlType != null, "Control type is null."); 121Debug.Assert(typeof(INamingContainer).IsAssignableFrom(ctrlType), String.Format(CultureInfo.InvariantCulture, "NamingContainerBuilder.Control type {0} is not an INamingContainer", ctrlType.FullName)); 140Debug.Assert(bindingContainerBuilder is TemplateBuilder, "Assert failure in ControlBuilder class, there's a scenario where BindingContainerBuilder is not a TemplateBuilder, is someone asking for ModelType out of a Data Binding Context??"); 711Debug.Assert(ControlType != null, "ControlType should not be null if we're adding a property entry"); 726Debug.Assert(!(String.IsNullOrEmpty(expressionPrefix) ^ (expressionBuilder == null)), "expressionBuilder should be non-null iff expressionPrefix is non-empty"); 1272Debug.Assert(!InDesigner, "!InDesigner"); 1691Debug.Assert(false, "The type " + cba.BuilderType.Name + " should be made public for better performance."); 1726Debug.Assert(FChildrenAsProperties, "ChildrenAsProperties"); 1938Debug.Assert(DefaultPropertyBuilder != null, pca.DefaultProperty); 2176Debug.Assert(((ComplexPropertyEntry)entry).IsCollectionItem, "The entry should be a collection entry, instead it's a " + entry.GetType()); 2315Debug.Assert(eb != null, "Did not expect null expression builder"); 2383Debug.Assert(TemplateControl != null, "TemplateControl should not be null in no-compile pages. We need it for the FilterResolutionService."); 2408Debug.Assert(!entry.UseSetAttribute, "Two-way binding is not supported on expandos - this should have been prevented in ControlBuilder"); 2413Debug.Assert(entry.ControlType.IsInstanceOfType(sender), "The DataBinding event sender was not of type " + entry.ControlType.Name); 2849Debug.Assert(_controlType != null, "If we get here then the tag type must be either an ICollection or a Control, so how can it be null?");
UI\ControlIdConverter.cs (1)
78Debug.Assert(host != null, "Unable to get IDesignerHost in ControlIDConverter");
UI\ControlPropertyNameConverter.cs (1)
61Debug.Assert(host != null, "Unable to get IDesignerHost in ControlPropertyNameConverter");
UI\DataBinder.cs (1)
89Debug.Assert((expressionParts != null) && (expressionParts.Length != 0),
UI\DataBinding.cs (1)
51Debug.Assert((value != null) && (value.Length != 0),
UI\DataBoundLiteralControl.cs (2)
31Debug.Assert(!InDesigner, "!InDesigner"); 43Debug.Assert(!InDesigner, "!InDesigner");
UI\DataSourceCache.cs (3)
130Debug.Assert(key.StartsWith(CacheInternal.PrefixDataSourceControl, StringComparison.Ordinal), "All keys passed in should start with the prefix specified in CacheInternal.PrefixDataSourceControl."); 148Debug.Assert(key.StartsWith(CacheInternal.PrefixDataSourceControl, StringComparison.Ordinal), "All keys passed in should start with the prefix specified in CacheInternal.PrefixDataSourceControl."); 197Debug.Assert(key.StartsWith(CacheInternal.PrefixDataSourceControl, StringComparison.Ordinal), "All keys passed in should start with the prefix specified in CacheInternal.PrefixDataSourceControl.");
UI\EventValidationStore.cs (1)
110Debug.Assert(currentOffset == bufferToBeHashed.Length, "Should have populated the entire buffer.");
UI\Html32TextWriter.cs (1)
470Debug.Assert(false, "Invalid BulletStyle for HTML32.");
UI\HTMLTextWriter.cs (1)
312Debug.Assert(value >= 0, "Bogus Indent... probably caused by mismatched Indent++ and Indent--");
UI\Page.cs (1)
1331Debug.Assert(_preInitWorkComplete || DesignMode, "ContainsTheme should not be accessed before Page's PreInit.");
UI\SimplePropertyEntry.cs (1)
84Debug.Assert(Name.IndexOf('.') < 0, "_name.IndexOf('.') < 0");
UI\StateManagedCollection.cs (1)
119Debug.Assert(index >= -1 && index <= Count, "Expected index to be at least -1 and less than or equal to Count.");
UI\TargetFrameworkUtil.cs (3)
361Debug.Assert(s_cbmTdpBridge != null, "s_cbmTdpBridge should not be null"); 416Debug.Assert(s_cbmTdpBridge != null, "s_cbmTdpBridge should not be null"); 473Debug.Assert(s_cbmTdpBridge != null, "s_cbmTdpBridge should not be null in IsFrameworkType");
UI\TemplateParser.cs (4)
347Debug.Assert(FInDesigner, "DesignerHost should be accessed only when FInDesigner == true"); 351Debug.Assert(FInDesigner, "DesignerHost should be accessed only when FInDesigner == true"); 1435Debug.Assert(false, "Unexpected scope!"); 2105Debug.Assert(assembly != null, "assembly != null");
UI\UserControl.cs (1)
60Debug.Assert(InDesigner == true, "Should only be called in design-mode!");
UI\Util.cs (2)
166Debug.Assert(configPath != null, "configPath != null"); 219Debug.Assert(File.Exists(path), path);
UI\WebControls\AdRotator.cs (3)
905Debug.Assert(selectedIndex >= 0 && selectedIndex < _adRecs.Length, "Index not found"); 924Debug.Assert(iRec == adDicts.Count, "Record count did not match non-null entries"); 947Debug.Assert(adProperties != null, "Required here");
UI\WebControls\BaseValidator.cs (3)
405Debug.Assert(page.UnobtrusiveValidationMode == UnobtrusiveValidationMode.None, "The writer must have been passed in the Unobtrusive mode"); 596Debug.Assert(false, "Exception should have been thrown if properties are invalid"); 740Debug.Assert(display == ValidatorDisplay.Static, "Unknown Display Type");
UI\WebControls\BoundColumn.cs (2)
193Debug.Assert(DataField.Length != 0, "Shouldn't be DataBinding without a DataField"); 229Debug.Assert(boundControl is TextBox, "Expected the bound control to be a TextBox");
UI\WebControls\BoundField.cs (1)
460Debug.Assert(DataField.Length != 0, "Shouldn't be DataBinding without a DataField");
UI\WebControls\BulletedList.cs (3)
256Debug.Assert(false, "Invalid BulletStyle"); 356Debug.Assert(false, "Invalid BulletStyle"); 433Debug.Assert(false, "Invalid BulletedListDisplayMode");
UI\WebControls\ButtonColumn.cs (2)
261Debug.Assert(DataTextField.Length != 0, "Shouldn't be DataBinding without a DataTextField"); 291Debug.Assert(boundControl is Button, "Expected the bound control to be a Button");
UI\WebControls\ButtonField.cs (2)
270Debug.Assert(DataTextField.Length != 0, "Shouldn't be DataBinding without a DataTextField"); 306Debug.Assert(boundControl is IButtonControl, "Expected the bound control to be an IButtonControl");
UI\WebControls\Calendar.cs (3)
1427Debug.Assert(false, "Unknown DayNameFormat value!"); 1760Debug.Assert(false, "Unknown TitleFormat value!"); 1832Debug.Assert(dateFrom <= dateTo, "Bad Date Range");
UI\WebControls\CompareValidator.cs (3)
163Debug.Assert(PropertiesValid, "Properties should have already been checked"); 167Debug.Assert(leftText != null, "Should have already caught this!"); 186Debug.Assert(rightText != null, "Should have already caught this!");
UI\WebControls\CustomValidator.cs (1)
133Debug.Assert(controlValue != null, "Should have been caught be property check");
UI\WebControls\DataBoundControl.cs (1)
535Debug.Assert(modelDataSource != null, "A non-null ModelDataSource should be passed in");
UI\WebControls\DataBoundControlHelper.cs (2)
31Debug.Assert(control != null, "control should not be null"); 32Debug.Assert(!String.IsNullOrEmpty(controlID), "controlID should not be empty");
UI\WebControls\DataGrid.cs (1)
883Debug.Assert(realDataSource != null, "Must have a real data source when calling CreateAutoGeneratedColumns");
UI\WebControls\DetailsView.cs (4)
2237Debug.Assert(false, "DetailsView::ExtractRowValues- must hand in a valid reference to an IDictionary."); 2870Debug.Assert(oldPageIndex >= 0, "Page indeces are out of sync from callback hidden field state"); 3346Debug.Assert((arguments != null && (arguments.Length == 4)), "An unexpected number of params came through"); 3573Debug.Assert(modelDataSource != null, "A non-null ModelDataSource should be passed in");
UI\WebControls\FilteredDataSetHelper.cs (4)
22Debug.Assert(table != null, "Did not expect null table"); 23Debug.Assert(sortExpression != null, "Did not expect null sort expression"); 24Debug.Assert(filterExpression != null, "Did not expect null filter expression"); 35Debug.Assert(filterParameters != null, "Did not expect null filter parameters when a filter expression was set");
UI\WebControls\FontUnitConverter.cs (2)
124Debug.Assert(fieldName != null, "Invalid FontSize type"); 134Debug.Assert(member != null, "Looks like we're missing FontUnit static fields or FontUnit::ctor(Unit)");
UI\WebControls\FormView.cs (2)
1879Debug.Assert(false, "FormView::ExtractRowValues- must hand in a valid reference to an IDictionary."); 3019Debug.Assert(modelDataSource != null, "A non-null ModelDataSource should be passed in");
UI\WebControls\GridView.cs (4)
2743Debug.Assert(false, "GridView::ExtractRowValues- must hand in a valid reference to an IDictionary."); 2934Debug.Assert(_pageIndex >= 0, "Page index should never be negative!"); 4126Debug.Assert((arguments != null && (arguments.Length == 8)), "An unexpected number of params came through on " + eventArgument); 4420Debug.Assert(modelDataSource != null, "A non-null ModelDataSource should be passed in");
UI\WebControls\GridViewColumnsGenerator.cs (1)
40Debug.Assert(realDataSource != null, "Must have a real data source when calling CreateAutoGeneratedColumns");
UI\WebControls\HyperLinkColumn.cs (1)
274Debug.Assert((DataTextField.Length != 0) || (DataNavigateUrlField.Length != 0),
UI\WebControls\HyperLinkField.cs (1)
315Debug.Assert((DataTextField.Length != 0) || (DataNavigateUrlFields.Length != 0),
UI\WebControls\ImageField.cs (2)
284Debug.Assert(DesignMode, "Unless you're in designmode, there should be a control in the cell."); 386Debug.Assert(DataImageUrlField.Length != 0, "Shouldn't be DataBinding without an DataImageUrlField");
UI\WebControls\ModelDataSourceView.cs (3)
412Debug.Assert(!autoPage, "auto-paging should not be true when using async select method"); 1039Debug.Assert(dataSourceOperation == DataSourceOperation.Select, "Only Select Operation should have been done immediately after page load"); 1077Debug.Assert(entry.Key is string, "Some key value is not string");
UI\WebControls\ObjectDataSourceView.cs (14)
682Debug.Assert(inputParameters != null, "Did not expect null parameter dictionary"); 683Debug.Assert(dataObjectType != null, "Did not expect null DataObjectType"); 687Debug.Assert(dataObject != null, "We should never get back a null instance of the DataObject if the creation succeeded."); 840Debug.Assert(type != null, "Should not have a null type at this point"); 918Debug.Assert(type != null, "Should not have a null type at this point"); 1092Debug.Assert(type != null, "Should not have a null type at this point"); 1201Debug.Assert(type != null, "Should not have a null type at this point"); 1342Debug.Assert(dataObjectType != null, "This overload of GetResolvedMethodData should only be called when using a DataObject"); 1343Debug.Assert(oldDataObject != null || newDataObject != null, "Did not expect both oldDataObject and newDataObject to be null"); 1407Debug.Assert(matchedMethodParameters != null, "Method parameters should not be null if a method was found"); 1457Debug.Assert(allParameters != null, "The 'allParameters' dictionary should never be null"); 1569Debug.Assert(matchedMethodParameters != null, "Method parameters should not be null if a method was found"); 1942Debug.Assert(type != null, "Should not have a null type at this point"); 1956Debug.Assert(instance != null, "ReleaseInstance: Instance shouldn't be null");
UI\WebControls\RangeValidator.cs (2)
106Debug.Assert(PropertiesValid, "Should have already been checked"); 110Debug.Assert(text != null, "Should have already caught this!");
UI\WebControls\ReadOnlyDataSource.cs (1)
31Debug.Assert(dataSource == null || (dataSource is IEnumerable || dataSource is IDataSource || dataSource is IListSource), "Expected dataSource to be either null, an IEnumerable, an IDataSource, or an IListSource.");
UI\WebControls\ReadOnlyHierarchicalDataSource.cs (1)
29Debug.Assert(dataSource == null || (dataSource is IHierarchicalEnumerable || dataSource is IHierarchicalDataSource), "Expected dataSource to be either null, an IHierarchicalEnumerable, or an IHierarchicalDataSource.");
UI\WebControls\RegularExpressionValidator.cs (1)
85Debug.Assert(controlValue != null, "Should have already been checked");
UI\WebControls\RepeatInfo.cs (1)
154Debug.Assert(outerTableImplied == false, "Cannot use outer implied table with Horizontal layout");
UI\WebControls\TreeNode.cs (2)
813Debug.Assert(ChildNodes.Count > 0, "No nodes for expansion, why are we rendering an expander?"); 889Debug.Assert(Index != -1, "Didn't assign an index to a node.");
UI\WebControls\unitconverter.cs (1)
102Debug.Assert(member != null, "Looks like we're missing Unit.Empty or Unit::ctor(double, UnitType)");
UI\WebControls\ValidationSummary.cs (2)
278Debug.Assert(true, "Not all messages were found!"); 460Debug.Assert(errorDescriptions[i] != null && errorDescriptions[i].Length > 0, "Bad Error Messages");
UI\WebControls\Wizard.cs (1)
1985Debug.Assert(_viewStateArrayLength == 15, "Forgot to change array length when adding new item to view state?");
UI\WebControls\XmlDataSource.cs (1)
669Debug.Assert(!String.IsNullOrEmpty(writeableDataFile), "Did not expect WriteableDataFile to be empty in Save()");
UI\WebControls\XmlDataSourceNodeDescriptor.cs (1)
35Debug.Assert(node != null, "Did not expect null node");
UI\WebParts\GenericWebPart.cs (1)
79Debug.Assert(_childControl != null, "ChildControl cannot be null.");
UI\WebParts\PersonalizableAttribute.cs (1)
91Debug.Assert((isPersonalizable == true || isSensitive == false), "Only Personalizable properties can be sensitive");
UI\WebParts\PersonalizationStateQuery.cs (1)
49Debug.Assert(o != null, "Should always have a default value!");
Util\CountdownTask.cs (2)
37Debug.Assert(newCount >= 0, "The counter should never hit a negative value."); 41Debug.Assert(success, "TrySetResult shouldn't have been already called.");
Util\FileUtil.cs (1)
353Debug.Assert(!(directoryExistsOnError && fileExistsOnError), "!(directoryExistsOnError && fileExistsOnError)");
Util\HttpEncoder.cs (1)
359Debug.Assert(0 <= startPos && startPos <= s.Length, "0 <= startPos && startPos <= s.Length");
Util\ReadWriteSpinLock.cs (5)
130Debug.Assert(n >= 0, "n >= 0"); 140Debug.Assert(newWriteLockCount >= 0, "newWriteLockCount >= 0"); 149Debug.Assert(WriteLockCount(oldBits) == oldWriteLockCount, "WriteLockCount(oldBits) == oldWriteLockCount"); 150Debug.Assert(ReadLockCount(oldBits) == readLockCount, "ReadLockCount(oldBits) == readLockCount"); 169Debug.Assert(writeLockCount > 0, "writeLockCount > 0");
Util\SimpleBitVector32.cs (2)
61Debug.Assert(value >= 0, "Value must be non-negative."); 63Debug.Assert(((value << offset) & ~mask) == 0, "Value must fit within the mask.");
Util\StringUtil.cs (8)
212Debug.Assert(len >= 0, "len >= 0"); 214Debug.Assert(src != null, "src != null"); 215Debug.Assert(srcIndex >= 0, "srcIndex >= 0"); 216Debug.Assert(srcIndex + len <= src.Length, "src"); 218Debug.Assert(dest != null, "dest != null"); 219Debug.Assert(destIndex >= 0, "destIndex >= 0"); 220Debug.Assert(destIndex + len <= dest.Length, "dest"); 333Debug.Assert(len >= 0, "Negative length in memcpyimpl!");
Util\TaskExtensions.cs (1)
19Debug.Assert(task.IsCompleted, "The Task passed to this method must be marked as completed so that this method doesn't block.");
WebCategoryAttribute.cs (1)
56Debug.Assert(localizedValue != null, "All WebForms category attributes should have localized strings. Category '" + value + "' not found.");
WebSockets\AspNetWebSocket.cs (1)
403Debug.Assert(result.CloseStatus.HasValue, "The CloseStatus property should be non-null when a CLOSE frame is received.");