23859 references to Debug
ComSvcConfig (14)
ComplusEndpointConfigContainer.cs (5)
117Debug.Assert(config != null, "config != null"); 123Debug.Assert(endpointConfig.Appid == this.appInfo.ID, "can't add endpoint for a different application"); 562Debug.Assert(config != null, "config != null"); 568Debug.Assert(endpointConfig.Appid == this.appInfo.ID, "can't remove endpoint for a different application"); 602Debug.Assert(false, "attempting operation after container is closed");
SvcFileManager.cs (4)
64Debug.Assert(svcFile.State != SvcFileState.Deleted, "svcFile.State != SvcFileState.Deleted"); 81Debug.Assert(svcFile.State != SvcFileState.Added, "svcFile.State != SvcFileState.Added"); 90Debug.Assert(svcFile.State == SvcFileState.Existing, "svcFile.State == SvcFileState.Existing"); 326Debug.Assert(this.state == SvcFileState.Existing, "this.state == SvcFileState.Existing");
Tool.cs (2)
198Debug.Assert(componentInfo != null, "No component Found"); 993Debug.Assert(false, "unknown mode");
WasEndpointConfigContainer.cs (3)
71Debug.Assert(config != null, "config != null"); 366Debug.Assert(config != null, "config != null"); 407Debug.Assert(false, "attempting operation after container is closed");
PresentationBuildTasks (205)
Base\MS\Internal\IO\Packaging\Compoundfile\ContainerUtilities.cs (1)
111Debug.Assert(length >= 0, "The length cannot be negative. Caller must verify this");
Base\System\Windows\Markup\TypeConverterHelper.cs (2)
106Debug.Assert(null != memberInfo, "Null passed for memberInfo to GetConverterType"); 123Debug.Assert(null != type, "Null passed for type to GetConverterType");
Base\System\Windows\Markup\XmlCompatibilityReader.cs (1)
350Debug.Assert(Scope.ShouldProcessContent(namespaceName, Reader.LocalName));
Base\System\Windows\Markup\XmlWrappingReader.cs (1)
49Debug.Assert( baseReader != null );
BuildTasks\Ms\Internal\MarkupCompiler\MarkupCompiler.cs (29)
251Debug.Assert(!cu.Pass2); 273Debug.Assert(!cu.Pass2); 284Debug.Assert(!cu.Pass2 || _pendingLocalFiles == null); 285Debug.Assert(_pendingLocalFiles == null || _pendingLocalFiles.Count == 0); 585Debug.Assert(_codeContexts.Count == 0); 965Debug.Assert(_ccRoot.StyleConnectorFn.Statements.Count > 0); 967Debug.Assert(ccsConnector != null); 1776Debug.Assert(desc != null); 1851Debug.Assert(pis != null && pis.Length == 2 && KnownTypes.Types[(int)KnownElements.DependencyObject].IsAssignableFrom(pis[0].ParameterType)); 1979Debug.Assert(_ccRoot != null && _ccRoot.SubClass.Length > 0); 2052Debug.Assert(CompilerInfo != null && CompilerInfo.IsCodeDomProviderTypeValid); 2253Debug.Assert(genericName.Length > 0 || t.IsGenericTypeDefinition); 2257Debug.Assert(genericName.Length == 0 && typeArgsList != null); 2343Debug.Assert(typeArgsList != null && typeArgsList.Length == refTypeParams.Length); 2408Debug.Assert(_typeArgsList == null || (baseClass.IsGenericType && baseClass.IsGenericTypeDefinition)); 2409Debug.Assert(_typeArgsList != null || !baseClass.IsGenericType); 2476Debug.Assert(!string.IsNullOrEmpty(baseName)); 2482Debug.Assert(_ccRoot == null); 2483Debug.Assert(_codeContexts == null || _codeContexts.Count == 0, "mismatched CodeContexts"); 2502Debug.Assert(HasLocalReference, "if we have a local event, there should be a local mapping PI for it"); 2923Debug.Assert(_codeContexts.Count == 0, "mismatched codecontext"); 2925Debug.Assert(_ccRoot != null); 2974Debug.Assert(cc != null); 2978Debug.Assert(_ccRoot == (cc as CodeContextRoot)); 2979Debug.Assert(_ccRoot.CodeClass != null); 3003Debug.Assert(_ccRoot.HookupFn == null); 3057Debug.Assert(_ccRoot == (_codeContexts.Peek() as CodeContextRoot)); 3058Debug.Assert(_ccRoot.ElementType == null || 3082Debug.Assert(_ccRoot == (_codeContexts.Peek() as CodeContextRoot));
BuildTasks\Ms\Internal\MarkupCompiler\ParserExtension.cs (5)
49Debug.Assert(bamlWriter != null, "Need a BamlRecordWriter for compiling to Baml"); 158Debug.Assert(_name == null && _nameField == null, "Name has already been set"); 353Debug.Assert(_name == null && _nameField == null, "Name has already been set"); 793Debug.Assert(_name == null && _nameField == null, "Name definition has already been set"); 907Debug.Assert(bamlMemStream != null);
BuildTasks\MS\Internal\Tasks\CompilerLocalReference.cs (3)
186Debug.Assert(String.IsNullOrEmpty(_localCacheFile) != true, "_localCacheFile must not be empty."); 187Debug.Assert(mcPass1 != null, "A valid instance of MarkupCompilePass1 must be passed to method SaveCacheInformation."); 248Debug.Assert(String.IsNullOrEmpty(_localCacheFile) != true, "_localCacheFile must not be empty.");
BuildTasks\MS\Internal\Tasks\CompilerState.cs (5)
99Debug.Assert(String.IsNullOrEmpty(_stateFilePath) != true, "StateFilePath must not be empty."); 100Debug.Assert(mcPass1 != null, "A valid instance of MarkupCompilePass1 must be passed to method SaveCacheInformation."); 101Debug.Assert(_cacheInfoList.Length == (int)CompilerStateType.MaxCount, "The Cache string array should be already allocated."); 160Debug.Assert(String.IsNullOrEmpty(_stateFilePath) != true, "_stateFilePath must be not be empty."); 161Debug.Assert(_cacheInfoList.Length == (int)CompilerStateType.MaxCount, "The Cache string array should be already allocated.");
BuildTasks\MS\Internal\Tasks\TaskHelper.cs (1)
281Debug.Assert(String.IsNullOrEmpty(assemblyPath) == false, "assemblyPath should not be empty.");
Framework\MS\Internal\Globalization\LocalizationComments.cs (1)
362Debug.Assert(enumPrefix != null && enumNames != null);
Framework\System\Windows\Markup\BamlMapTable.cs (10)
92Debug.Assert(null != xamlTypeMapper); 168Debug.Assert(cmp > 0); 1034Debug.Assert(assemblyFullName.Length != 0, "empty assembly"); 1068Debug.Assert(bamlAssemblyInfoRecord.AssemblyId >= 0); 1104Debug.Assert( 1116Debug.Assert(bamlAssemblyInfoRecord.AssemblyId >= 0); 1296Debug.Assert(ownerTypeName != null); 1297Debug.Assert(attributeName != null); 1480Debug.Assert(GetHashTableData(stringValue) == null, 1514Debug.Assert(targetType != null && memberName != null);
Framework\System\Windows\Markup\BamlRecordHelper.cs (1)
135Debug.Assert(false, "Unhandled case in DoesRecordTypeHaveDebugExtension");
Framework\System\Windows\Markup\BamlRecords.cs (27)
699Debug.Assert(false,"Assembly, Type and Attribute records are not cached, so don't ask for one."); 724Debug.Assert(false,"Unknown RecordType"); 777Debug.Assert(null == _writeCache[(int)record.RecordType]); 869set { Debug.Assert (value == -1, "Setting fixed record to an invalid size"); } 878Debug.Assert(false, "Must override RecordType"); 917Debug.Assert( value <= 3 && value >= 0 ); 1110Debug.Assert(RecordSize < 0); 1543Debug.Assert(_valuePositionPosition != -1, 1730Debug.Assert(_valuePositionPosition != -1, 2115set { Debug.Assert (value == -1, "Wrong size set for complex prop record"); } 2191set { Debug.Assert (value == -1, "Wrong size set for complex prop record"); } 2256set { Debug.Assert (value == -1, "Wrong size set for complex prop record"); } 2478Debug.Assert(value <= ExtensionIdMask); 2498set { Debug.Assert(value == -1, "Wrong size set for complex prop record"); } 3105set { Debug.Assert (value == -1, "Wrong size set for complex prop record"); } 3376set { Debug.Assert(value == -1, "Wrong size set for element record"); } 3471set { Debug.Assert(value == -1, "Wrong size set for element record"); } 3627Debug.Assert(_contentSizePosition != -1, 3672set { Debug.Assert(value == -1, "Wrong size set for element record"); } 3837set { Debug.Assert(value == -1, "Wrong size set for complex prop record"); } 3937set { Debug.Assert(value == -1, "Wrong size set for complex prop record"); } 4017set { Debug.Assert(value == -1, "Wrong size set for complex prop record"); } 4220Debug.Assert(FilePos != -1,"UpdateWrite called but Write Never was"); 4795Debug.Assert( SerializerTypeId != 0 ); 4952Debug.Assert((propertyMember is MethodInfo) || (propertyMember is PropertyInfo) 4972Debug.Assert(arr.Length == 3 && arr[0] != null && arr[1] != null); 5015Debug.Assert(arr.Length == 3 && arr[0] != null && arr[1] != null);
Framework\System\Windows\Markup\BamlRecordWriter.cs (21)
144Debug.Assert(null != DocumentStartRecord); 416Debug.Assert(_deferElementDepth == 0); 417Debug.Assert(_deferComplexPropertyDepth == 0); 418Debug.Assert(_staticResourceElementDepth == 0); 419Debug.Assert(_dynamicResourceElementDepth == 0); 420Debug.Assert(_staticResourceRecordList == null); 438Debug.Assert(_staticResourceElementDepth == 0); 475Debug.Assert(!InStaticResourceSection, "We do not support x:Key within a StaticResource Section"); 576Debug.Assert(!InStaticResourceSection, "We do not support x:Key within a StaticResource Section"); 613Debug.Assert(!InStaticResourceSection, "We do not support x:Shared within a StaticResource Section"); 797Debug.Assert(!InStaticResourceSection, "We do not support x:Key within a StaticResource Section"); 853Debug.Assert(keyRecord.RecordList.Count == 0, "Should have empty record list"); 879Debug.Assert(!InStaticResourceSection, "We do not support x:Key within a StaticResource Section"); 890Debug.Assert(_deferElementDepth == 2); 1079Debug.Assert(extensionTypeId != (short)KnownElements.TypeExtension); 1096Debug.Assert(typeValue != null); 1641Debug.Assert(keyRecord != null, "Unknown key record type in defer load dictionary"); 1652Debug.Assert(keyIndex == _deferKeys.Count, 1676Debug.Assert(_deferElementDepth > 0 && CollectingValues, 1684Debug.Assert(valueDeferRecord.Record != null && 1696Debug.Assert(valueDeferRecord.Record != null && valueDeferRecord.Record.RecordType == BamlRecordType.ElementEnd,
Framework\System\Windows\Markup\KnownTypes.cs (3)
4752Debug.Assert(asmFramework != null, "asmFramework must not be null"); 4753Debug.Assert(asmCore != null, "asmCore must not be null"); 4754Debug.Assert(asmBase != null, "asmBase must not be null");
Framework\System\Windows\Markup\MarkupExtensionParser.cs (3)
1205Debug.Assert(sb.Length > 0); 1206Debug.Assert(!Char.IsWhiteSpace(sb[0])); 1561Debug.Assert(null != info, "No property or method info for field Name");
Framework\System\Windows\Markup\StyleModeStack.cs (2)
47Debug.Assert(Depth >= 0, "StyleModeStack's depth was " + Depth + ", should be >= 0"); 64Debug.Assert(Depth >= 0, "StyleMode::Pop() with depth of " + Depth + ", should be >= 0");
Framework\System\Windows\Markup\StyleXamlParser.cs (3)
513Debug.Assert(_inEventSetter); 1228Debug.Assert(!xamlClrEventNode.IsTemplateEvent && _inEventSetter); 1301Debug.Assert (mode != StyleMode.Base || xamlPropertyNode.PropName != XamlStyleSerializer.TargetTypePropertyName,
Framework\System\Windows\Markup\TemplateXamlParser.cs (3)
570Debug.Assert(_setterOrTriggerValueNode != null); 1343Debug.Assert(_styleModeStack.Mode == StyleMode.VisualTree); 1353Debug.Assert(!xamlClrEventNode.IsStyleSetterEvent);
Framework\System\Windows\Markup\TreeBuilder.cs (1)
98Debug.Assert (false, "Parse Fragment was not overidden");
Framework\System\Windows\Markup\XamlParser.cs (5)
531Debug.Assert(false,"Unknown Xaml Token."); 1097Debug.Assert(null != assemblyName, "assembly name returned from GetBaseElement is null"); 1098Debug.Assert(null != typeFullName, "Type name returned from GetBaseElement is null"); 1245Debug.Assert(SkipActionDepthCount == -1); 1351Debug.Assert(null == _bamlWriter || null == value, "XamlParser already had a bamlWriter");
Framework\System\Windows\Markup\XamlReaderHelper.cs (53)
139Debug.Assert(xamlParser != null, "Cannot have null xaml parser"); 140Debug.Assert(parserContext != null, "Cannot have null parser context"); 141Debug.Assert(xmlReader != null, "Cannot have null xmlReader"); 347Debug.Assert(null != xamlNode, "null returned from the collection"); 376Debug.Assert(null != XmlReader); 415Debug.Assert(!IsMoreData(), "Setting state to done but not done parsing."); 448Debug.Assert(null != xamlNode, "null returned from the collection"); 1190Debug.Assert(null != typeFullName, "type name not set"); 1191Debug.Assert(null != dynamicObjectName, "dynamicObject name not set"); 1192Debug.Assert(null != assemblyName, "assembly name not set"); 1522Debug.Assert( (null==ContentPropertyInfo && null==ContentPropertyName) 1847Debug.Assert(null == dynamicObject,"DynamicObject should be null for code"); 2015Debug.Assert(false == endTagHasBeenRead, "Read past end tag on end tag"); 2086Debug.Assert(false == endTagHasBeenRead); 2236Debug.Assert(IsElementScopedAttribute(attribName, attribLocalName, attributeNamespaceUri)); 2245Debug.Assert(IsElementScopedAttribute(attribName, attribLocalName, attributeNamespaceUri)); 2254Debug.Assert(IsElementScopedAttribute(attribName, attribLocalName, attributeNamespaceUri)); 2263Debug.Assert(IsElementScopedAttribute(attribName, attribLocalName, attributeNamespaceUri)); 2272Debug.Assert(IsElementScopedAttribute(attribName, attribLocalName, attributeNamespaceUri)); 2281Debug.Assert (attributeFound || !IsElementScopedAttribute(attribName, attribLocalName, attributeNamespaceUri)); 2771Debug.Assert(unknownTagName != null || null != parentType); 3191Debug.Assert(null != assemblyName, "property without an AssemblyName"); 3192Debug.Assert(null != declaringTypeFullName, "property without a type name"); 3193Debug.Assert(null != dynamicObjectName, "property without a field Name"); 3710Debug.Assert(typeAndSerializer == null || 3764Debug.Assert(CurrentContext.ContextType == ElementContextType.PropertyComplex || 4144Debug.Assert(null != assemblyName, "property without an AssemblyName"); 4145Debug.Assert(null != typeFullName, "property without a type name"); 4146Debug.Assert(null != dynamicObjectName, "property without a field Name"); 4790Debug.Assert( collectionTypeID >= 0 5010Debug.Assert( xmlNodeType == XmlNodeType.Text || 5043Debug.Assert( isWhitespace, 5091Debug.Assert (parentNodeType == ElementContextType.Unknown, 5222Debug.Assert(null != XmlReader, "XmlReader is not yet set"); 5270Debug.Assert(false, "XmlReader doesn't support LineNumber"); 5301Debug.Assert(false, "XmlReader doesn't support LinePosition"); 5453Debug.Assert(currentPos > 0 && currentPos < s.Length - 1); 5528Debug.Assert(null != text, "String passed to CollapseText cannot be null"); 5529Debug.Assert(textLength > 0, "String passed to Collapsed Text cannot be empty"); 5789Debug.Assert((_nodeIndex == 0 && _xamlNodes.Count == 0 ) || (_nodeIndex < _xamlNodes.Count), 5809Debug.Assert((_nodeIndex == 0 && _xamlNodes.Count == 0 ) || (_nodeIndex < _xamlNodes.Count), 5836Debug.Assert(!value || _insertionIndex == -1, "Attribute node collection is already marked for insertion."); 5895Debug.Assert(_nodeIndex == _xamlNodes.Count, "NodeIndex is larger than node count."); 5963Debug.Assert( _typeConverterDecisionState == TypeConverterDecisionState.ElementEnd, 6026Debug.Assert(((XamlNode)_xamlNodes[_typeConverterCandidateIndex]).TokenType==XamlNodeType.ElementStart, 6045Debug.Assert(((XamlNode)_xamlNodes[_typeConverterCandidateIndex])==xamlNode, 6069Debug.Assert(((XamlNode)_xamlNodes[_typeConverterCandidateIndex])==xamlNode, 6085Debug.Assert( _typeConverterTextWrittenAndNotProcessed != null, 6114Debug.Assert(((XamlNode)_xamlNodes[_typeConverterCandidateIndex]).TokenType==XamlNodeType.ElementStart, 6306Debug.Assert(false,"State machine checking for TypeConverter syntax has encountered an unexpected XamlNode type " + tokenType); 6390Debug.Assert(null != textFlowData, "No data for TextFlow"); 6412Debug.Assert(null != typeRightTag, "ElementType not yet assigned to Node"); 6533Debug.Assert(0 == textFlowData.InlineCount, "Text stack still has an inline count");
Framework\System\Windows\Markup\XamlTypeMapper.cs (18)
1029Debug.Assert(null != localName, "null localName"); 1030Debug.Assert(null != xmlNamespace, "null xmlNamespace"); 2001Debug.Assert(typeInfo != null, "Must have cached type info at this point"); 2403Debug.Assert(memberName != null); 2406Debug.Assert(memberInfo != null); 2421Debug.Assert(targetType != null); 2498Debug.Assert(null != xmlNamespace,"null value passed for xmlNamespace"); 2499Debug.Assert(null != localName,"null value passed for localName"); 2538Debug.Assert(null != xmlNamespace,"null value passed for xmlNamespace"); 2539Debug.Assert(null != localName,"null value passed for localName"); 2689Debug.Assert(namespaceMap.ClrNamespace != null,"Null CLR Namespace"); 2690Debug.Assert(localName != null,"Null localName"); 3373Debug.Assert(false, "Should initialize cache prior to compiling"); 3650Debug.Assert(false, "Should initialize cache prior to compiling"); 3669Debug.Assert(null != type, "Null passed for type to GetTypeConverterType"); 3744Debug.Assert(null != propType, "Null passed for propType to GetPropertyConverterType"); 3973Debug.Assert(null != type, "null value for type passed to GetWhitespace"); 4240Debug.Assert(_dpLookupHashtable != null,
Framework\System\Windows\Markup\XmlnsDictionary.cs (1)
722Debug.Assert(prefix != null);
Shared\MS\Internal\TokenizerHelper.cs (2)
201Debug.Assert(!Char.IsWhiteSpace(currentChar),"Token started on Whitespace"); 344Debug.Assert(null != numberFormat);
Shared\System\Windows\Markup\ReflectionHelper.cs (3)
112Debug.Assert(null != type, "Type passed to IsInternalType is null"); 133Debug.Assert(null != type, "Type passed to IsPublicType is null"); 519Debug.Assert(String.IsNullOrEmpty(assemblyGivenName) == false, "assemblyName should not be empty.");
PresentationCore (2127)
Core\CSharp\MS\Internal\AppModel\CookieHandler.cs (1)
132Debug.Assert(size > 0);
Core\CSharp\MS\Internal\Automation\EventPropertyMap.cs (1)
118Debug.Assert(properties != null);
Core\CSharp\MS\Internal\FontCache\FamilyCollection.cs (1)
830Debug.Assert(i == FamilyCount);
Core\CSharp\MS\Internal\FontCache\FontCacheUtil.cs (1)
76Debug.Assert(stream.Position == 0);
Core\CSharp\MS\Internal\FontCache\FontResourceCache.cs (3)
64Debug.Assert(uri.IsAbsoluteUri && uri.Scheme == PackUriHelper.UriSchemePack && BaseUriHelper.IsPackApplicationUri(uri)); 77Debug.Assert(escapedPath.EndsWith(FakeFileName, StringComparison.OrdinalIgnoreCase)); 145Debug.Assert(!folderResourceMap.ContainsKey(resourceFullName));
Core\CSharp\MS\Internal\FontCache\FontSource.cs (3)
93Debug.Assert(String.IsNullOrEmpty(_fontUri.Fragment)); 385Debug.Assert(memoryFontSize <= fileReadBufferSize); 476Debug.Assert(_memoryHandle.IsAllocated);
Core\CSharp\MS\Internal\FontFace\CompositeFontInfo.cs (3)
221Debug.Assert(IsFamilyMapRangesValid(familyMapRanges)); 229Debug.Assert(begin < end && end <= _familyMaps.Count); 257Debug.Assert(count == FirstFamilyMapRange);
Core\CSharp\MS\Internal\FontFace\PhysicalFontFamily.cs (4)
146Debug.Assert(bestMatch != null); 238Debug.Assert(bestStyleTypeface != null); 366Debug.Assert(advance <= unicodeString.Length); 372Debug.Assert(advance + sizeofChar <= unicodeString.Length);
Core\CSharp\MS\Internal\FontFace\TypefaceCollection.cs (2)
108Debug.Assert((_family != null && _familyTypefaceCollection == null)|| (_familyTypefaceCollection != null && _family == null)); 159Debug.Assert((typefaceCollection._family != null && typefaceCollection._familyTypefaceCollection == null)
Core\CSharp\MS\Internal\Generic\Span.cs (1)
143Debug.Assert(fc <= first);
Core\CSharp\MS\Internal\Ink\Bezier.cs (2)
116Debug.Assert(to - from >= 4); 357Debug.Assert(data.Node(to) - data.Node(from) > data.Node(j) - data.Node(from));
Core\CSharp\MS\Internal\Ink\CuspData.cs (1)
282Debug.Assert(bReverse);
Core\CSharp\MS\Internal\Ink\EllipticalNodeOperations.cs (12)
29System.Diagnostics.Debug.Assert((nodeShape != null) && nodeShape.IsEllipse); 43Debug.Assert(_nodeShapeToCircle.HasInverse, "About to invert a non-invertible transform"); 55Debug.Assert(_nodeShapeToCircle.HasInverse, "Just rotated an invertible transform and produced a non-invertible one"); 71Debug.Assert(_nodeShapeToCircle.HasInverse, "Just scaled an invertible transform and produced a non-invertible one"); 176System.Diagnostics.Debug.Assert(node.IsEmpty == false); 581System.Diagnostics.Debug.Assert(result.IsEmpty); 619System.Diagnostics.Debug.Assert(DoubleUtil.AreClose(beginRadius, endRadius) == false); 651System.Diagnostics.Debug.Assert(!double.IsNaN(findex)); 660System.Diagnostics.Debug.Assert(DoubleUtil.IsBetweenZeroAndOne(x) == false); 662System.Diagnostics.Debug.Assert(!double.IsNaN(findex)); 678System.Diagnostics.Debug.Assert(!double.IsNaN(findex)); 690System.Diagnostics.Debug.Assert(!double.IsNaN(findex));
Core\CSharp\MS\Internal\Ink\ErasingStroke.cs (6)
33System.Diagnostics.Debug.Assert(erasingShape != null); 59System.Diagnostics.Debug.Assert((path != null) && (IEnumerablePointHelper.GetCount(path) != 0)); 100System.Diagnostics.Debug.Assert(iterator != null); 139System.Diagnostics.Debug.Assert(iterator != null); 140System.Diagnostics.Debug.Assert(intersections != null); 262System.Diagnostics.Debug.Assert(path.Length > 1);
Core\CSharp\MS\Internal\Ink\ExtendedPropertyCollection.cs (2)
185System.Diagnostics.Debug.Assert(propertyToRemove != null); 325System.Diagnostics.Debug.Assert(!this.Contains(extendedProperty.Id), "ExtendedProperty already belongs to the collection");
Core\CSharp\MS\Internal\Ink\GestureRecognizer\NativeRecognizer.cs (11)
81Debug.Assert(NativeRecognizer.RecognizerHandleSingleton != null); 448Debug.Assert(recContext != null && !recContext.IsInvalid); 502Debug.Assert(recContext != null && !recContext.IsInvalid); 596Debug.Assert(stylusPoints != null); 597Debug.Assert(propertyGuids.Length == StylusPointDescription.RequiredCountOfProperties); 741Debug.Assert(ApplicationGestureHelper.IsDefined(gesture)); 797Debug.Assert(!(bestResultColumnCount != 0 && pRecoLattice->pLatticeColumns == IntPtr.Zero), "Invalid results!"); 811Debug.Assert(0 < recoColumn.cLatticeElements, "Invalid results!"); 818Debug.Assert((RECO_TYPE)(recoElement.type) == RECO_TYPE.RECO_TYPE_WCHAR, "The Application gesture has to be WCHAR type" ); 835Debug.Assert(pProps->cbPropertyValue == sizeof(uint) / sizeof(byte)); 847Debug.Assert(ApplicationGestureHelper.IsDefined(gesture));
Core\CSharp\MS\Internal\Ink\InkSerializedFormat\AlgoModule.cs (4)
231Debug.Assert(outputBufferIndex < outputBuffer.Length); 240Debug.Assert(outputBufferIndex < outputBuffer.Length); 293Debug.Assert(countPerItem == 4 || countPerItem == 2 || countPerItem == 1); 357Debug.Assert(countPerItem == 4 || countPerItem == 2 || countPerItem == 1);
Core\CSharp\MS\Internal\Ink\InkSerializedFormat\CustomAttributeSerializer.cs (3)
341Debug.Assert(strm != null); 466System.Diagnostics.Debug.Assert(guid == Guid.Empty); 998Debug.Assert(false, "Missing case statement!");
Core\CSharp\MS\Internal\Ink\InkSerializedFormat\DrawingAttributeSerializer.cs (14)
303System.Diagnostics.Debug.Assert(false, "Corrupt Matrix in the ExtendedPropertyCollection!"); 352System.Diagnostics.Debug.Assert(penTip == PenTip.Rectangle); 441Debug.Assert(DrawingAttributes.MaxHeight == DrawingAttributes.MaxWidth && 484Debug.Assert(stream != null); 510Debug.Assert(bw != null); 516Debug.Assert(bw != null); 530System.Diagnostics.Debug.Assert(da.Color != (Color)DrawingAttributes.GetDefaultDrawingAttributeValue(KnownIds.Color), "Color was put in the EPC for the default value!"); 536Debug.Assert(bw != null); 549Debug.Assert(bw != null); 567Debug.Assert(bw != null); 649System.Diagnostics.Debug.Assert(da.StylusTip != StylusTip.Ellipse, "StylusTip was put in the EPC for the default value!"); 654Debug.Assert(bw != null); 708Debug.Assert(bw != null); 719Debug.Assert(bw != null);
Core\CSharp\MS\Internal\Ink\InkSerializedFormat\GorillaCodec.cs (5)
234Debug.Assert(intReader != null); 235Debug.Assert(shortReader != null); 247Debug.Assert(shortReader != null); 569Debug.Assert(outputBufferIndex < outputBuffer.Length); 586Debug.Assert(outputBufferIndex < outputBuffer.Length);
Core\CSharp\MS\Internal\Ink\InkSerializedFormat\HuffCodec.cs (9)
93Debug.Assert(input != null); 94Debug.Assert(input.Length >= 2); 95Debug.Assert(startIndex == 1); 96Debug.Assert(outputBuffer != null); 97Debug.Assert(outputBuffer.Length != 0); 109Debug.Assert(outputBufferIndex < outputBuffer.Length); 124Debug.Assert(outputBufferIndex < outputBuffer.Length); 189Debug.Assert(nDataLen > 0 && nDataLen - 1 <= Int32.MaxValue); 193Debug.Assert(nDataLen <= Int32.MaxValue);
Core\CSharp\MS\Internal\Ink\InkSerializedFormat\InkSerializer.cs (8)
107System.Diagnostics.Debug.Assert(inkData.Length > isfBase64PrefixLength); 252Debug.Assert(inkdata != null); 317Debug.Assert(inputStream != null); 2161Debug.Assert(data != null); 2558Debug.Assert(sizeOfHeaderInBytes == bytesWritten); 2597Debug.Assert(sizes[i] == bytesWritten); 2751System.Diagnostics.Debug.WriteLine(message); 2797System.Diagnostics.Debug.Assert(strokes != null);
Core\CSharp\MS\Internal\Ink\InkSerializedFormat\LZCodec.cs (4)
41Debug.Assert(input != null); 42Debug.Assert(input.Length > 1); 43Debug.Assert(inputIndex < input.Length); 44Debug.Assert(inputIndex >= 0);
Core\CSharp\MS\Internal\Ink\InkSerializedFormat\MultiByteCodec.cs (3)
80Debug.Assert(input != null); 81Debug.Assert(inputIndex < input.Length); 115Debug.Assert(input != null); //already validated at the AlgoModule level
Core\CSharp\MS\Internal\Ink\InkSerializedFormat\StrokeSerializer.cs (2)
318System.Diagnostics.Debug.Assert(false, "ExtendedProperties for points are not supported"); 1025Debug.Assert(stream != null);
Core\CSharp\MS\Internal\Ink\Lasso.cs (19)
54System.Diagnostics.Debug.Assert(_points != null); 68System.Diagnostics.Debug.Assert(_points != null); 82System.Diagnostics.Debug.Assert(_points != null); 83System.Diagnostics.Debug.Assert((0 <= index) && (index < _points.Count)); 95System.Diagnostics.Debug.Assert(null != points); 109System.Diagnostics.Debug.Assert(_points != null); 125System.Diagnostics.Debug.Assert(_points != null); 176System.Diagnostics.Debug.Assert(lassoSegment.Y != 0); 191System.Diagnostics.Debug.Assert(_points != null); 192System.Diagnostics.Debug.Assert(iterator != null); 341System.Diagnostics.Debug.Assert(!crossing.IsEmpty && crossing.StartNode.IsValid && crossing.EndNode.IsValid); 344System.Diagnostics.Debug.Assert(!mcrossing.IsEmpty && mcrossing.StartNode.IsValid && mcrossing.EndNode.IsValid); 351System.Diagnostics.Debug.Assert(!mcrossing.IsEmpty && mcrossing.StartNode.IsValid && mcrossing.EndNode.IsValid); 428System.Diagnostics.Debug.Assert(DoubleUtil.AreClose(si.InBegin, StrokeFIndices.BeforeFirst)); 563System.Diagnostics.Debug.Assert(!newFIndices.IsEmpty); 564System.Diagnostics.Debug.Assert(strokeNode.IsValid); 605System.Diagnostics.Debug.Assert(obj is LassoCrossing); 710System.Diagnostics.Debug.Assert(intersection >= 0 && intersection <= points.Count - 2); 813System.Diagnostics.Debug.Assert(hitEnd != hitBegin && orgBegin != orgEnd);
Core\CSharp\MS\Internal\Ink\Renderer.cs (8)
48Debug.Assert(renderer != null); 451System.Diagnostics.Debug.Assert(sender == _strokes); 501System.Diagnostics.Debug.Assert(_strokes.IndexOf(sender as Stroke) != -1); 552System.Diagnostics.Debug.Assert(_strokes != null); 558Debug.Assert(visual is StrokeVisual); 652System.Diagnostics.Debug.Assert(stroke != null); 661System.Diagnostics.Debug.Assert(stroke != null); 673System.Diagnostics.Debug.Assert(drawingAttributes != null);
Core\CSharp\MS\Internal\Ink\StrokeIntersection.cs (6)
192System.Diagnostics.Debug.Assert(intersections != null); 193System.Diagnostics.Debug.Assert(intersections.Length > 0); 198System.Diagnostics.Debug.Assert(!intersections[j].IsEmpty); 224System.Diagnostics.Debug.Assert(intersections != null); 225System.Diagnostics.Debug.Assert(intersections.Length > 0); 230System.Diagnostics.Debug.Assert(!intersections[j].IsEmpty);
Core\CSharp\MS\Internal\Ink\StrokeNode.cs (20)
42System.Diagnostics.Debug.Assert(operations != null); 43System.Diagnostics.Debug.Assert((nodeData.IsEmpty == false) && (index >= 0)); 266Debug.Assert(false, "StrokeNodeOperations.GetPointsAtStartOfSegment failed to find the D position"); 292Debug.Assert(!endNodeRect.Contains(point)); 379Debug.Assert(false, "StrokeNodeOperations.GetPointsAtEndOfSegment failed to find the B position"); 647Debug.Assert(false, "Couldn't find all 4 indexes in StrokeNodeOperations.GetPointsAtMiddleSegment"); 905System.Diagnostics.Debug.Assert(!double.IsNaN(cutAt.BeginFIndex) && !double.IsNaN(cutAt.EndFIndex)); 923System.Diagnostics.Debug.Assert(IsValid && (_index >= 0)); 930System.Diagnostics.Debug.Assert(fragment.BeginFIndex >= 0 && fragment.BeginFIndex <= 1); 935System.Diagnostics.Debug.Assert(fragment.EndFIndex >= 0 && fragment.EndFIndex <= 1); 955System.Diagnostics.Debug.Assert(IsValid); 967System.Diagnostics.Debug.Assert(DoubleUtil.GreaterThanOrClose(fragment.BeginFIndex, 0f)); 969System.Diagnostics.Debug.Assert(DoubleUtil.LessThanOrClose(fragment.BeginFIndex, 1f)); 983System.Diagnostics.Debug.Assert(DoubleUtil.GreaterThanOrClose(fragment.EndFIndex, 0f)); 985System.Diagnostics.Debug.Assert(DoubleUtil.LessThanOrClose(fragment.EndFIndex, 1f)); 1009System.Diagnostics.Debug.Assert(IsValid); 1027System.Diagnostics.Debug.Assert(IsValid); 1045System.Diagnostics.Debug.Assert(IsValid); 1049System.Diagnostics.Debug.Assert(findex == 0); 1053System.Diagnostics.Debug.Assert((findex >= _index - 1) && (findex <= _index));
Core\CSharp\MS\Internal\Ink\StrokeNodeData.cs (2)
51System.Diagnostics.Debug.Assert(DoubleUtil.GreaterThan((double)pressure, 0d)); 62Debug.Assert(DoubleUtil.AreClose(0, s_empty._pressure));
Core\CSharp\MS\Internal\Ink\StrokeNodeOperations.cs (19)
52System.Diagnostics.Debug.Assert(nodeShape != null); 83System.Diagnostics.Debug.Assert((boundingBox.X <= 0) && (boundingBox.Y <= 0)); 129System.Diagnostics.Debug.Assert(node.IsEmpty == false); 327System.Diagnostics.Debug.Assert(DoubleUtil.IsZero(pressureFactor) == false); 378System.Diagnostics.Debug.Assert(count > 0); 404System.Diagnostics.Debug.Assert(count > 0); 426System.Diagnostics.Debug.Assert(count > 0); 493System.Diagnostics.Debug.Assert(DoubleUtil.IsZero(pressureFactor) == false); 639System.Diagnostics.Debug.Assert(findex >= 0 && findex <= 1); 653System.Diagnostics.Debug.Assert(findex >= 0 && findex <= 1); 790System.Diagnostics.Debug.Assert(true == DoubleUtil.IsBetweenZeroAndOne(findex)); 978System.Diagnostics.Debug.Assert(DoubleUtil.IsZero(pressureFactor) == false); 1003System.Diagnostics.Debug.Assert(DoubleUtil.IsZero(pressureFactor) == false); 1035System.Diagnostics.Debug.Assert(!quad.IsEmpty); 1105System.Diagnostics.Debug.Assert(i < count); 1145System.Diagnostics.Debug.Assert(count > 0); 1167System.Diagnostics.Debug.Assert(count > 0); 1240System.Diagnostics.Debug.Assert(DoubleUtil.IsZero(pressureFactor) == false); 1312System.Diagnostics.Debug.Assert(findex >= 0 && findex <= 1);
Core\CSharp\MS\Internal\Ink\StrokeNodeOperations2.cs (3)
45System.Diagnostics.Debug.Assert((null != vertices) && (2 < vertices.Length)); 83System.Diagnostics.Debug.Assert(quad.IsEmpty == false); 509System.Diagnostics.Debug.Assert((false == DoubleUtil.IsZero(shortest.X)) || (false == DoubleUtil.IsZero(shortest.Y)));
Core\CSharp\MS\Internal\Ink\StrokeRenderer.cs (28)
47Debug.Assert(iterator != null); 48Debug.Assert(drawingAttributes != null); 79System.Diagnostics.Debug.Assert(true == strokeNode.IsValid); 161Debug.Assert(index == iterator.Count - 1); 221Debug.Assert(iterator != null && drawingAttributes != null); 357Debug.Assert(!prevStrokeNode.GetConnectingQuad().IsEmpty, "prevStrokeNode.GetConnectingQuad() is Empty!"); 464Debug.Assert(!strokeNode.GetConnectingQuad().IsEmpty, "strokeNode.GetConnectingQuad was empty, this is unexpected"); 493Debug.Assert(pathFigureDCSide.Count == 0); 637Debug.Assert(!strokeNode.IsValid); 659Debug.Assert(pathFigureDCSide.Count == 0); 686Debug.Assert(pathFigureABSide.Count == 0); 722Debug.Assert(pathFigureDCSide.Count == 0); 769Debug.Assert(pointBuffer1 != null); 770Debug.Assert(pointBuffer2 != null); 771Debug.Assert(pointBuffer3 != null); 772Debug.Assert(context != null); 845Debug.Assert(percentIntersect >= 0.0 && percentIntersect <= 100.0d); 881Debug.Assert(context != null); 882Debug.Assert(points != null); 883Debug.Assert(points.Count > 0); 909Debug.Assert(context != null); 910Debug.Assert(abPoints != null && dcPoints != null); 911Debug.Assert(abPoints.Count > 0 && dcPoints.Count > 0); 932Debug.Assert(context != null); 933Debug.Assert(abPoints != null && dcPoints != null); 934Debug.Assert(polyLinePoints != null); 963Debug.Assert(i + 2 < points.Count); 1113System.Diagnostics.Debug.Assert(da.IsHighlighter = true);
Core\CSharp\MS\Internal\Ink\StylusShape.cs (4)
167System.Diagnostics.Debug.Assert(value.HasInverse); 237System.Diagnostics.Debug.Assert(vertices.Length == 4); 262System.Diagnostics.Debug.Assert(clockWiseIndex == vertices.Length || counterClockIndex == vertices.Length); 280System.Diagnostics.Debug.Assert(m_tip == StylusTip.Ellipse);
Core\CSharp\MS\Internal\IO\Packaging\ByteRangeDownloader.cs (3)
98Debug.Assert(fileMutex != null, "FileMutex must be a valid mutex"); 99Debug.Assert(tempStream != null, "ByteRangeDownloader requires a stream to write to"); 235Debug.Assert(byteRanges.GetLength(0) == 1, "We don't support a request with multiple byte ranges");
Core\CSharp\MS\Internal\IO\Packaging\NetStream.cs (10)
786Debug.Assert(_fullStreamLength >= 0, "We assume _fullStreamLength is correct for Http cases - only Ftp can return bogus values"); 873Debug.Assert(offset >= 0); 874Debug.Assert(length >= 0); 899Debug.Assert(value >= 0); 912Debug.Assert(value >= 0); 958Debug.Assert(_offset <= b._offset); 959Debug.Assert(Mergeable(b)); 1007Debug.Assert(block.Length > 0); 1114Debug.Assert(block.Length > 0); 1232Debug.Assert(_fullDownloadComplete, "Do not call this unless full download is complete.");
Core\CSharp\MS\Internal\IO\Packaging\PseudoWebRequest.cs (3)
54Debug.Assert(uri != null, "PackWebRequest uri cannot be null"); 55Debug.Assert(packageUri != null, "packageUri cannot be null"); 56Debug.Assert(partUri != null, "partUri cannot be null");
Core\CSharp\MS\Internal\IO\Packaging\ResponseStream.cs (4)
52Debug.Assert(container != null, "Logic error: use other constructor for full package request streams"); 53Debug.Assert(owningStream != null, "Logic error: use other constructor for full package request streams"); 76Debug.Assert(s != null, "Logic error: base stream cannot be null"); 77Debug.Assert(response != null, "Logic error: response cannot be null");
Core\CSharp\MS\Internal\LoadedOrUnloadedOperation.cs (1)
28Debug.Assert(callback != null && target != null);
Core\CSharp\MS\Internal\Media\VisualTreeUtils.cs (7)
128Debug.Assert(element == null); 187Debug.Fail("How did a ray hit a Visual3D not parented to a Viewport3DVisual?"); 192Debug.Fail(String.Format("Unhandled HitTestResult type '{0}'", result.GetType().Name)); 253Debug.Assert((visual == null) != (visual3D == null), 274Debug.Assert(castSucceeded && ((visual == null) != (visual3D == null)), 281Debug.Assert(!castSucceeded && visual == null && visual3D == null, 299Debug.Fail(String.Format(
Core\CSharp\MS\Internal\Media3D\GeneralTransform2Dto3Dto2D.cs (1)
490Debug.Assert(uv.Length == p.Length, "vertices and texture coordinate sizes should match");
Core\CSharp\MS\Internal\Media3D\GeneralTransform3Dto2Dto3D.cs (1)
44Debug.Assert(transform3DTo2D != null && transform2DTo3D != null);
Core\CSharp\MS\Internal\Media3D\M3DUtil.cs (4)
45Debug.Assert(!bounds.IsEmpty, 149Debug.Assert(matrix.IsAffine); 327Debug.Assert(!matrix.IsAffine); 389Debug.Assert(camera != null, "Caller is responsible for ensuring camera is not null.");
Core\CSharp\MS\Internal\PartialArray.cs (1)
39Debug.Assert(initialIndex >= 0 && initialIndex + count <= array.Length);
Core\CSharp\MS\Internal\Shaping\GlyphInfoList.cs (1)
66Debug.Assert(_glyphs.Offset + _glyphs.Length == cch, "Invalid glyph length!");
Core\CSharp\MS\Internal\Shaping\OpenTypeCommon.cs (11)
243Debug.Assert(TableTag==OpenTypeTags.GSUB || TableTag==OpenTypeTags.GPOS); 244Debug.Assert(FirstGlyph<AfterLastGlyph); 245Debug.Assert(AfterLastGlyph<=GlyphInfo.Length); 611Debug.Assert(false,"Unknown OpenType layout table!"); 752Debug.Assert(featureDescription.Parameter != 0); 807Debug.Assert( FlagToSet==GlyphFlags.NotChanged || 959Debug.Assert(tableTag == OpenTypeTags.GSUB || tableTag == OpenTypeTags.GPOS); 1110Debug.Assert(false,"Ext.Lookup processed earlier!"); 1196Debug.Assert(false,"Ext.Lookup processed earlier!"); 1209Debug.Assert(false,"Unknown OpenType layout table!"); 1788Debug.Assert(Index < SubTableCount());
Core\CSharp\MS\Internal\Shaping\OpenTypeLayoutCache.cs (16)
87Debug.Assert(tableTag == OpenTypeTags.GSUB || tableTag == OpenTypeTags.GPOS); 351Debug.Assert(totalSize <= maxCacheSize); 355Debug.Assert(totalSize <= maxCacheSize); 430Debug.Assert(tableTag == OpenTypeTags.GSUB || tableTag == OpenTypeTags.GPOS); 450Debug.Assert(false); 583Debug.Assert(lastLookup >= 0); // There are lookups, so there was an index 610Debug.Assert(cacheSize > 0); // We've calcucalted them at least ones, and 611Debug.Assert(glyphCount > 0); // if there is no records, we already should've exited 682Debug.Assert((pList - pCache) * sizeof(ushort) < cacheSize); 687Debug.Assert((pList - pCache) * sizeof(ushort) < cacheSize); 720Debug.Assert((pList - pCache) * sizeof(ushort) < cacheSize); 725Debug.Assert((pList - pCache) * sizeof(ushort) < cacheSize); 737Debug.Assert((pList - pCache) * sizeof(ushort) == cacheSize); // We exactly filled up the cache 738Debug.Assert((pGlyphs - pCache) * sizeof(ushort) == (4 + glyphCount * 2) * sizeof(ushort)); // Glyphs ended where lists start. 888Debug.Assert(tableTag == OpenTypeTags.GSUB || tableTag == OpenTypeTags.GPOS); 1111Debug.Assert(recordCount > 0); // Otherwise, we would go into (glyph > maxGlyphLookup);
Core\CSharp\MS\Internal\Shaping\ShaperBuffers.cs (2)
123Debug.Assert(_charMap.Length == charCount); 134Debug.Assert(_glyphInfoList.Length == glyphCount);
Core\CSharp\MS\Internal\Shaping\TypefaceMap.cs (8)
175Debug.Assert(ichItem == unicodeString.Length); 190Debug.Assert(index >= 0); 408Debug.Assert(index >= 0, "Invalid scaled shapeable typeface index spans"); 592Debug.Assert(cchMap <= unicodeString.Length - ich); 829Debug.Assert(cchNextValid > 0 && cchNextValid <= unicodeString.Length - ich); 847Debug.Assert(cchNextValid == 0); 857Debug.Assert(recursionDepth > 0 || advance == unicodeString.Length); 1069Debug.Assert(cch > 0);
Core\CSharp\MS\Internal\Shaping\UshortList2.cs (4)
160Debug.Assert(false, "Not supported"); 166Debug.Assert(false, "Not supported"); 172Debug.Assert(false, "Not supported"); 177Debug.Assert(false, "Not supported");
Core\CSharp\MS\Internal\Span.cs (2)
109Debug.Assert(cp >= 0); 161Debug.Assert(spanIndex > 0);
Core\CSharp\MS\Internal\SynchronizedInputHelper.cs (3)
189Debug.Assert(mbArgs != null); 237Debug.Assert(mbArgs != null); 287Debug.Assert(false);
Core\CSharp\MS\Internal\TextFormatting\Bidi.cs (30)
705Debug.Assert(CharProperty[1, (int) startClass]==1 || (startClass == DirectionClass.ArabicLetter), 708Debug.Assert(CharProperty[1, (int) endClass]==1, ("Cannot use non strong type to resolve neutrals")); 731Debug.Assert(CharProperty[2, (int) characterClass[counter + classIndex]]==0, 756Debug.Assert(CharProperty[2, (int) characterClass[counter + classIndex]]==0, "Changing class of a fixed class"); 868Debug.Assert(startOfNeutrals == PositionInvalid, 913Debug.Assert(startOfDelayed != PositionInvalid, 958Debug.Assert(startOfNeutrals == PositionInvalid, 963Debug.Assert(startOfDelayed != PositionInvalid, 1064Debug.Assert(startOfNeutrals != PositionInvalid, 1103Debug.Assert(startOfNeutrals != PositionInvalid, 1136Debug.Assert(startOfNeutrals == PositionInvalid, 1154Debug.Assert(startOfNeutrals == PositionInvalid, 1167Debug.Assert(startOfDelayed != PositionInvalid, 1181Debug.Assert(startOfNeutrals == PositionInvalid, 1186Debug.Assert(startOfDelayed != PositionInvalid, 1197Debug.Assert(startOfNeutrals != PositionInvalid, 1206Debug.Assert(startOfNeutrals == PositionInvalid, 1224Debug.Assert(startOfDelayed != PositionInvalid, 1228Debug.Assert(lastClass == DirectionClass.EuropeanTerminator, 1235Debug.Assert(startOfNeutrals == PositionInvalid, 1240Debug.Assert(startOfDelayed != PositionInvalid, 1289Debug.Assert(startOfNeutrals != PositionInvalid, 1303Debug.Assert(startOfNeutrals == PositionInvalid, 1308Debug.Assert(startOfDelayed != PositionInvalid, 1340Debug.Assert(startOfNeutrals == PositionInvalid, 1367Debug.Assert(startOfNeutrals == PositionInvalid, 1412Debug.Assert(startOfNeutrals == PositionInvalid, 1448Debug.Assert(startOfDelayed != PositionInvalid, 1590Debug.Assert(startOfNeutrals == PositionInvalid, 2484Debug.Assert(runLengthResolved == runLength,
Core\CSharp\MS\Internal\TextFormatting\FormatSettings.cs (3)
221Debug.Assert(offsetToFirstCp == 0); 229Debug.Assert(offsetToFirstCp == 0); 242Debug.Assert(offsetToFirstCp == 0);
Core\CSharp\MS\Internal\TextFormatting\FormattedTextSymbols.cs (6)
66Debug.Assert(symbols != null); 89Debug.Assert(shapeables != null && shapeables.Count > 0); 103Debug.Assert(current != null); 217Debug.Assert(_glyphs != null); 240Debug.Assert(_glyphs != null); 384Debug.Assert(glyphAdvances.Length <= glyphIndices.Length);
Core\CSharp\MS\Internal\TextFormatting\FullTextLine.cs (18)
231Debug.Assert(_metrics._formatter != null); 489Debug.Assert(_collapsingSymbol == null && symbol != null); 511Debug.Assert(lineLength > 0); 732Debug.Assert((_statusFlags & StatusFlags.BoundingBoxComputed) != 0); 786Debug.Assert(_fullText != null); 791Debug.Assert(_metrics._height > 0); 867Debug.Assert(HasCollapsed); 1267Debug.Assert(direction == CaretDirection.Backward || direction == CaretDirection.Backspace); 1456Debug.Assert(direction == CaretDirection.Backward || direction == CaretDirection.Backspace); 1508Debug.Assert(_collapsingSymbol != null); 1606Debug.Assert(false); 1764Debug.Assert(boundsList != null); 2128Debug.Assert(textRun != null); 2132Debug.Assert(cchAcc > 0); 2145Debug.Assert(cchAcc > 0); 2149Debug.Assert(cchLeft == 0); 2509Debug.Assert(_ploline.Value != IntPtr.Zero); 2568Debug.Assert(_ploline.Value != IntPtr.Zero);
Core\CSharp\MS\Internal\TextFormatting\FullTextState.cs (2)
312Debug.Assert(lsccp > 0, "Zero-length text line!"); 322Debug.Assert(!TextStore.IsMarker(plsrun));
Core\CSharp\MS\Internal\TextFormatting\LineServicesCallbacks.cs (23)
211Debug.Assert(TextStore.IsContent(plsrun), "Unrecognizable run!"); 212Debug.Assert(lsrun.RunProp != null, "invalid lsrun!"); 255Debug.Assert(lsrun.RunProp != null); 566Debug.Assert(lsrun.Shapeable != null && stringLength > 0); 673Debug.Assert(markerStore != null, "No marker store, yet autonumbering is specified!"); 745Debug.Assert( 776Debug.Assert(ulInfo.dvpFirstUnderlineSize >= 0); 813Debug.Assert( 829Debug.Assert(stInfo.dvpLowerStrikethroughSize >= 0); 1357Debug.Assert(false, "Not supported TextDecorationUnit"); 1384Debug.Assert(false, "Not supported TextDecorationUnit"); 1736Debug.Assert(lsrunFirst.Shapeable != null); 1737Debug.Assert(cchText > 0); // LineServices should not pass in zero character count; 1904Debug.Assert(TextStore.IsContent(plsrun) && lsruns[i] != null); 1945Debug.Assert(TextStore.IsContent(plsrun) && lsrun.Shapeable != null); 2499Debug.Assert(false, "Unsupported installed object!"); 2549Debug.Assert(textObject != null); 2607Debug.Assert(false); 2634Debug.Assert(lsrun.Type == Plsrun.InlineObject); 2646Debug.Assert(textObject != null); 2647Debug.Assert(textFlow != LsTFlow.lstflowWS || runDirection != 0); 2800Debug.Assert(fGeometryProvided == 0, "Line enumeration doesn't need geometry information"); 3369Debug.Assert(lsrun.Shapeable != null);
Core\CSharp\MS\Internal\TextFormatting\LineServicesRun.cs (2)
263Debug.Assert(_shapeable != null); 940Debug.Assert(lsruns != null && lsruns.Length > 0 && lsruns[0] != null);
Core\CSharp\MS\Internal\TextFormatting\SimpleTextLine.cs (1)
581Debug.Assert((_statusFlags & StatusFlags.BoundingBoxComputed) != 0);
Core\CSharp\MS\Internal\TextFormatting\TextFormatterImp.cs (2)
582Debug.Assert(context.Owner == null); 607Debug.Assert(context != null);
Core\CSharp\MS\Internal\TextFormatting\TextMarkerSource.cs (6)
58Debug.Assert(markerStyle != TextMarkerStyle.None); 106Debug.Assert(autoNumberingIndex > 0); 137Debug.Assert(false, "Invalid marker style"); 145Debug.Assert(_characterArray != null); 277Debug.Assert(number >= 0); 409Debug.Assert(number >= 0 && number <= 9);
Core\CSharp\MS\Internal\TextFormatting\TextMetrics.cs (1)
174Debug.Assert(_cchLength > 0);
Core\CSharp\MS\Internal\TextFormatting\TextRunCacheImp.cs (2)
196Debug.Assert(textRun != null && runLength > 0, "Invalid run!"); 269Debug.Assert(
Core\CSharp\MS\Internal\TextFormatting\TextStore.cs (16)
276Debug.Assert(stringLength > 0 && runInfo.Length > 0); 336Debug.Assert( 512Debug.Assert(textEffects != null && textEffects.Count != 0); 656Debug.Assert(runInfo.StringLength > 0 && runInfo.Length > 0); 860Debug.Assert(runInfo.StringLength >= stringLength); 885Debug.Assert(cch <= runInfo.StringLength); 1434Debug.Assert(ichRun < ichEnd); 1462Debug.Assert(ichRun == cchUniform); 1560Debug.Assert(runInfo.OffsetToFirstChar + offsetToFirstChar + lsrunLength <= runInfo.CharacterBuffer.Count); 1580Debug.Assert(offsetToFirstChar == 0); 1626Debug.Assert(uniformBidiLevel == (Pap.RightToLeft ? 1 : 0)); 1655Debug.Assert(lsrunLength > 0); 1722Debug.Assert(false); 1732Debug.Assert(cch > 0 && cch <= stringLength - ich); 1971Debug.Assert(i < _plsrunVector.Count); 2394Debug.Assert(metrics != null);
Core\CSharp\MS\Internal\TextFormatting\ThousandthOfEmRealDoubles.cs (2)
52Debug.Assert(capacity >= 0); 63Debug.Assert(realValues != null);
Core\CSharp\MS\Internal\TextFormatting\ThousandthOfEmRealPoints.cs (2)
45Debug.Assert(capacity >= 0); 54Debug.Assert(pointValues != null);
Core\CSharp\MS\Internal\UIElementHelper.cs (3)
18Debug.Assert(o != null, "UIElementHelper.IsHitTestVisible called with null argument"); 34Debug.Assert(o != null, "UIElementHelper.IsVisible called with null argument"); 50Debug.Assert(o != null, "UIElementHelper.PredictFocus called with null argument");
Core\CSharp\MS\Win32\UnsafeNativeMethodsTablet.cs (3)
179Debug.Assert(handle != IntPtr.Zero); 244Debug.Assert(handle != IntPtr.Zero); 260System.Diagnostics.Debug.Assert(_recognizerHandle == null);
Core\CSharp\System\IO\Packaging\PackWebRequest.cs (2)
83Debug.Assert(uri != null, "PackWebRequest uri cannot be null"); 84Debug.Assert(packageUri != null, "packageUri cannot be null");
Core\CSharp\System\IO\Packaging\PackWebResponse.cs (1)
664Debug.Assert(false, "Cannot return full-container stream from cached container object");
Core\CSharp\System\Windows\Automation\Peers\AutomationPeer.cs (1)
1546Debug.Assert(caller._children != null, "iteration over a null family");
Core\CSharp\System\Windows\ClassHandlersStore.cs (4)
34Debug.Assert(index != -1, "There should exist a set of handlers for the given routedEvent"); 71Debug.Assert(index != -1, "There should exist a set of handlers for the given index"); 82Debug.Assert(GetHandlersIndex(routedEvent) == -1, "There should not exist a set of handlers for the given routedEvent"); 100Debug.Assert(baseClassListeners != null, "Update only when there are base class listeners to be updated");
Core\CSharp\System\Windows\Diagnostics\VisualDiagnostics.cs (1)
316System.Diagnostics.Debug.WriteLine(SR.Get(SRID.ReentrantVisualTreeChangeWarning, nameof(VisualTreeChanged)));
Core\CSharp\System\Windows\DragDrop.cs (2)
611Debug.Assert(dragSource != null, "Invalid dragSource"); 612Debug.Assert(dataObject != null, "Invalid dataObject");
Core\CSharp\System\Windows\DragEventArgs.cs (3)
61Debug.Assert(false, "Invalid dragDropKeyStates"); 66Debug.Assert(false, "Invalid allowedEffects"); 71Debug.Assert(false, "Invalid target");
Core\CSharp\System\Windows\DurationConverter.cs (1)
135Debug.Assert(durationValue == Duration.Automatic); // Only other legal duration type
Core\CSharp\System\Windows\EventHandlersStore.cs (2)
301Debug.Assert(key != null, "Search key cannot be null"); 319Debug.Assert(key != null, "Search key cannot be null");
Core\CSharp\System\Windows\FontStretch.cs (2)
33Debug.Assert(1 <= stretch && stretch <= 9); 62Debug.Assert(1 <= RealStretch && RealStretch <= 9);
Core\CSharp\System\Windows\FontStyle.cs (3)
27Debug.Assert(0 <= style && style <= 2); 122Debug.Assert(0 <= _style && _style <= 2); 141Debug.Assert(_style == 2);
Core\CSharp\System\Windows\FontWeight.cs (1)
30Debug.Assert(1 <= weight && weight <= 999);
Core\CSharp\System\Windows\FreezableCollection.cs (3)
194Debug.Assert(_collection.Count == 0); 1030Debug.Assert(list != null, "list may not be null."); 1129Debug.Assert(_index == -2, "expected -2, got " + _index + "\n");
Core\CSharp\system\windows\generated\TextDecorationCollection.cs (3)
108Debug.Assert(_collection.Count == 0); 780Debug.Assert(list != null, "list may not be null."); 879Debug.Assert(_index == -2, "expected -2, got " + _index + "\n");
Core\CSharp\System\Windows\GiveFeedbackEventArgs.cs (1)
46Debug.Assert(false, "Invalid effects");
Core\CSharp\System\Windows\GlobalEventManager.cs (3)
23Debug.Assert(GetRoutedEventFromName(name, ownerType, false) == null, 56Debug.Assert( 61Debug.Assert(routedEvent.IsLegalHandler(handler),
Core\CSharp\System\Windows\Ink\DrawingAttributes.cs (13)
54System.Diagnostics.Debug.Assert(extendedProperties != null); 65System.Diagnostics.Debug.Assert(_extendedProperties != null); 84Debug.Assert(Colors.Black == (Color)GetDefaultDrawingAttributeValue(KnownIds.Color)); 108Debug.Assert(StylusTip.Ellipse == (StylusTip)GetDefaultDrawingAttributeValue(KnownIds.StylusTip)); 114Debug.Assert(StylusTip.Rectangle == (StylusTip)GetExtendedPropertyBackedProperty(KnownIds.StylusTip)); 137Debug.Assert(Matrix.Identity == (Matrix)GetDefaultDrawingAttributeValue(KnownIds.StylusTipTransform)); 166Debug.Assert(DrawingAttributes.DefaultHeight == (double)GetDefaultDrawingAttributeValue(KnownIds.StylusHeight)); 193Debug.Assert(DrawingAttributes.DefaultWidth == (double)GetDefaultDrawingAttributeValue(KnownIds.StylusWidth)); 282Debug.Assert(false == (bool)GetDefaultDrawingAttributeValue(KnownIds.IsHighlighter)); 287Debug.Assert(true == (bool)GetExtendedPropertyBackedProperty(KnownIds.IsHighlighter)); 780System.Diagnostics.Debug.Assert(null != DrawingAttributes.GetDefaultDrawingAttributeValue(guid)); 802System.Diagnostics.Debug.Assert(sender != null); 803System.Diagnostics.Debug.Assert(args != null);
Core\CSharp\System\Windows\Ink\IncrementalHitTester.cs (18)
64System.Diagnostics.Debug.Assert(_strokes != null); 90System.Diagnostics.Debug.Assert(_strokes != null); 136System.Diagnostics.Debug.Assert(strokes != null); 179System.Diagnostics.Debug.Assert((_strokes != null) && (_strokeInfos != null) && (_strokes == sender)); 222Debug.Assert(false, "Benign assert. IncrementalHitTester's _strokeInfos cache is out of sync, rebuilding."); 230Debug.Assert(false, "Benign assert. IncrementalHitTester's _strokeInfos cache is out of sync, rebuilding."); 330System.Diagnostics.Debug.Assert((percentageWithinLasso >= 0) && (percentageWithinLasso <= 100)); 341System.Diagnostics.Debug.Assert((points != null) && (IEnumerablePointHelper.GetCount(points)!= 0)); 478System.Diagnostics.Debug.Assert(eventArgs != null); 519System.Diagnostics.Debug.Assert(eraserShape != null); 532System.Diagnostics.Debug.Assert((points != null) && (IEnumerablePointHelper.GetCount(points) != 0)); 533System.Diagnostics.Debug.Assert(_erasingStroke != null); 578System.Diagnostics.Debug.Assert(strokeHitEventArgCollection.Count != 0); 583System.Diagnostics.Debug.Assert(eventArgs.HitStroke != null); 594System.Diagnostics.Debug.Assert(eventArgs != null); 692System.Diagnostics.Debug.Assert(stroke != null && hitFragments != null && hitFragments.Length > 0); 736System.Diagnostics.Debug.Assert(stroke != null); 843System.Diagnostics.Debug.Assert(stylusPoints != null && index >= 0 && index < stylusPoints.Count);
Core\CSharp\System\Windows\Ink\Stroke.cs (18)
136Debug.Assert(_cachedGeometry == null || _cachedGeometry.IsFrozen); 273Debug.Assert(bezierPoints != null && bezierPoints.Count > 0); 326Debug.Assert(stylusPointsCount > stylusPointsIndex); 345Debug.Assert(bezierLength >= prevUnbezierLength); 747System.Diagnostics.Debug.Assert(cutAt != null); 748System.Diagnostics.Debug.Assert(cutAt.Length != 0); 779System.Diagnostics.Debug.Assert(false == ((!DoubleUtil.AreClose(cutAt[cutAt.Length - 1].EndFIndex, StrokeFIndices.AfterLast)) && 789System.Diagnostics.Debug.Assert(DoubleUtil.LessThan(fragment.BeginFIndex, fragment.EndFIndex)); 809System.Diagnostics.Debug.Assert(cutAt != null); 810System.Diagnostics.Debug.Assert(cutAt.Length != 0); 835System.Diagnostics.Debug.Assert(false == ((!DoubleUtil.AreClose(cutAt[cutAt.Length - 1].EndFIndex, StrokeFIndices.AfterLast)) && 853System.Diagnostics.Debug.Assert(DoubleUtil.LessThan(beginFIndex, fragment.BeginFIndex)); 882Debug.Assert(sourceStylusPoints != null); 895System.Diagnostics.Debug.Assert(pointCount >= 1); 905System.Diagnostics.Debug.Assert(sourceStylusPoints.Count > i + beginIndex); 909System.Diagnostics.Debug.Assert(stylusPoints.Count == pointCount); 1184Debug.Assert(ienum != null); 1203Debug.Assert(ienum != null);
Core\CSharp\System\Windows\Ink\Stroke2.cs (10)
540System.Diagnostics.Debug.Assert(_cachedGeometry != null && _cachedGeometry.IsFrozen); 573System.Diagnostics.Debug.Assert(false == _drawAsHollow); 603System.Diagnostics.Debug.Assert(geometry != null); 612System.Diagnostics.Debug.Assert(newBounds.IsEmpty == false); 622System.Diagnostics.Debug.Assert(shape != null); 623System.Diagnostics.Debug.Assert(path != null); 642System.Diagnostics.Debug.Assert(lasso != null); 665System.Diagnostics.Debug.Assert(cutAt != null); 689System.Diagnostics.Debug.Assert(cutAt != null); 728System.Diagnostics.Debug.Assert(DoubleUtil.IsZero(originalDa.StylusTipTransform.OffsetX) && DoubleUtil.IsZero(originalDa.StylusTipTransform.OffsetY));
Core\CSharp\System\Windows\Ink\StrokeCollection.cs (5)
136Debug.Assert(stream != null); 137Debug.Assert(stream.CanRead); 576Debug.Assert(stroke != null && IndexOf(stroke) == -1); 684Debug.Assert(e.Removed.Count > 0); 751Debug.Assert(startingIndex >= 0);
Core\CSharp\System\Windows\Ink\StrokeCollection2.cs (2)
500System.Diagnostics.Debug.Assert(original != null && toReplace != null); 501System.Diagnostics.Debug.Assert(index >= 0 && index < this.Count);
Core\CSharp\System\Windows\Input\AccessKeyManager.cs (2)
293Debug.Assert(target != null, "Targets should only be UIElements"); 701Debug.Assert(element is IInputElement, "Element in AccessKeyManager store was not of type IInputElement");
Core\CSharp\System\Windows\Input\InputLanguageSource.cs (1)
212Debug.Assert(_ipp == null, "_EnsureInputProcesoorProfile has been called.");
Core\CSharp\System\Windows\Input\InputMethod.cs (6)
614Debug.Assert(value != InputMethodState.DoNotCare); 687Debug.Assert(value != InputMethodState.DoNotCare); 727Debug.Assert(value != InputMethodState.DoNotCare); 808Debug.Assert(false, "Unknown Speech Mode"); 914Debug.Assert((value & ImeConversionModeValues.DoNotCare) == 0); 1171Debug.Assert((value & ImeSentenceModeValues.DoNotCare) == 0);
Core\CSharp\System\Windows\Input\InputMethodStateTypeInfo.cs (1)
106Debug.Assert(false, "The guid does not match.");
Core\CSharp\System\Windows\Input\InputProcessorProfiles.cs (5)
78Debug.Assert(Thread.CurrentThread.GetApartmentState() == ApartmentState.STA, "Initialize called on MTA thread!"); 80Debug.Assert(_ipp.Value == null, "Initialize called twice"); 105Debug.Assert(_ipp.Value != null, "Uninitialize called without initializing"); 222Debug.Assert(_cookie == UnsafeNativeMethods.TF_INVALID_COOKIE, "Cookie is already set."); 243Debug.Assert(_cookie != UnsafeNativeMethods.TF_INVALID_COOKIE, "Cookie is not set.");
Core\CSharp\System\Windows\Input\InputProcessorProfilesLoader.cs (1)
74Debug.Assert(Thread.CurrentThread.GetApartmentState() == ApartmentState.STA, "Load called on MTA thread!");
Core\CSharp\System\Windows\Input\Manipulation.cs (1)
46Debug.Assert(element != null, "element should be non-null.");
Core\CSharp\System\Windows\Input\ManipulationDevice.cs (7)
101Debug.Assert(element != null, "element should be non-null."); 130Debug.Assert(element != null, "element should be non-null."); 175Debug.Assert(manipulator != null); 193Debug.Assert(manipulator != null); 414Debug.Assert(!deltaEventArgs.IsInertial); 480Debug.Assert(!completedEventArgs.IsInertial); 514Debug.Assert(_manipulators == null || _manipulators.Count == 0);
Core\CSharp\System\Windows\Input\ManipulationLogic.cs (3)
253Debug.Assert(_lastManipulationBeforeInertia != null); 336Debug.Assert(_generatedEvent == null, "There is already a generated event waiting to be pushed."); 696Debug.Assert(_containerLayoutUpdated != null);
Core\CSharp\System\Windows\Input\MouseDevice.cs (1)
1558Debug.Assert(_mouseOver == null, "_mouseOver should be null because we have called ChangeMouseOver(null) already.");
Core\CSharp\System\Windows\Input\TextComposition.cs (1)
342Debug.Assert((_resultText.Length == 1) && Char.IsControl(_resultText[0]));
Core\CSharp\System\Windows\Input\TextCompositionManager.cs (1)
874Debug.Assert(_altNumpadEntryMode);
Core\CSharp\System\Windows\Input\TextServicesCompartment.cs (2)
107Debug.Assert(_cookie == UnsafeNativeMethods.TF_INVALID_COOKIE, "cookie is already set."); 132Debug.Assert(_cookie != UnsafeNativeMethods.TF_INVALID_COOKIE, "cookie is not set.");
Core\CSharp\System\Windows\Input\TextServicesContext.cs (1)
63Debug.Assert(Thread.CurrentThread.GetApartmentState() == ApartmentState.STA, "SetDispatcherThreaad on MTA thread");
Core\CSharp\System\Windows\Input\TouchDevice.cs (4)
661Debug.Assert(oldCapture != null, "oldCapture should be non-null."); 675Debug.Assert(captured != null, "captured should be non-null."); 926Debug.Assert(newDirectlyOver != _directlyOver, "ChangeDirectlyOver called when newDirectlyOver is the same as _directlyOver."); 1013Debug.Assert(element != null);
Core\CSharp\System\Windows\Interop\D3DImage.cs (8)
651Debug.Assert(timeout != Duration.Automatic); 698Debug.Assert(e.OldValue != e.NewValue); 741Debug.Assert(_isDirty); 742Debug.Assert(_isWaitingForPresent); 743Debug.Assert(_lockCount == 0); 764Debug.Assert(_duceResource.IsOnChannel(channel)); 859Debug.Assert(!skipOnChannelCheck || _duceResource.IsOnChannel(channel)); 934Debug.Assert(_duceResource.IsOnChannel(channel));
Core\CSharp\System\Windows\Interop\HwndAppCommandInputProvider.cs (1)
58Debug.Assert(null != _source);
Core\CSharp\System\Windows\Interop\HwndKeyboardInputProvider.cs (13)
72Debug.Assert( null != _source ); 94Debug.Assert( null != _source ); 195System.Diagnostics.Debug.WriteLine("HwndMouseInputProvider: AcquireFocus failed!"); 231System.Diagnostics.Debug.WriteLine("HwndKeyboardInputProvider: GetMessageTime failed!"); 262System.Diagnostics.Debug.WriteLine("HwndMouseInputProvider: GetTickCount failed!"); 634System.Diagnostics.Debug.WriteLine("HwndMouseInputProvider: GetKeyState failed!"); 668System.Diagnostics.Debug.WriteLine("HwndMouseInputProvider: MapVirtualKey failed!"); 721System.Diagnostics.Debug.WriteLine("HwndMouseInputProvider: MapVirtualKey failed!"); 787Debug.Assert( null != _source ); 825Debug.Assert( null != _source ); 906Debug.Assert( null != _source ); 924System.Diagnostics.Debug.WriteLine("HwndMouseInputProvider: GetKeyboardState failed!"); 939System.Diagnostics.Debug.WriteLine("HwndMouseInputProvider: GetMessageExtraInfo failed!");
Core\CSharp\System\Windows\Interop\HwndMouseInputProvider.cs (26)
63Debug.Assert(null != _source && null != _source.Value); 72System.Diagnostics.Debug.WriteLine("HwndMouseInputProvider: Dispose: GetCapture failed!"); 83System.Diagnostics.Debug.WriteLine("HwndMouseInputProvider: Dispose: GetCapture failed!"); 100Debug.Assert(null != _source && null != _source.Value); 145System.Diagnostics.Debug.WriteLine("HwndMouseInputProvider: SetCursor failed!"); 167Debug.Assert(null != _source && null != _source.Value); 180System.Diagnostics.Debug.WriteLine("HwndMouseInputProvider: SetCapture or GetCapture failed!"); 206System.Diagnostics.Debug.WriteLine("HwndMouseInputProvider: ScreenToClient failed!"); 248System.Diagnostics.Debug.WriteLine("HwndMouseInputProvider: ReleaseCapture failed!"); 368System.Diagnostics.Debug.WriteLine("HwndMouseInputProvider: GetIntermediatePoints failed!"); 414System.Diagnostics.Debug.WriteLine("HwndMouseInputProvider: GetMessageTime failed!"); 548System.Diagnostics.Debug.WriteLine("HwndMouseInputProvider: ScreenToClient failed!"); 745System.Diagnostics.Debug.WriteLine("HwndMouseInputProvider: GetCapture failed!"); 851System.Diagnostics.Debug.WriteLine("HwndMouseInputProvider: GetCapture failed!"); 992System.Diagnostics.Debug.WriteLine("HwndMouseInputProvider: GetMessagePos failed!"); 1005System.Diagnostics.Debug.WriteLine("HwndMouseInputProvider: WindowFromPoint failed!"); 1036System.Diagnostics.Debug.WriteLine("HwndMouseInputProvider: GetClientRect or ScreenToClient failed!"); 1088System.Diagnostics.Debug.WriteLine("HwndMouseInputProvider: TrackMouseEvent failed!"); 1110System.Diagnostics.Debug.WriteLine("HwndMouseInputProvider: TrackMouseEvent failed!"); 1130Debug.Assert(null != _source && null != _source.Value); 1184Debug.Assert(null != _source && null != _source.Value); 1261System.Diagnostics.Debug.WriteLine("HwndMouseInputProvider: GetCursorPos failed!"); 1270System.Diagnostics.Debug.WriteLine("HwndMouseInputProvider: WindowFromPoint failed!"); 1279System.Diagnostics.Debug.WriteLine("HwndMouseInputProvider: Spurious mouse event received!"); 1354System.Diagnostics.Debug.WriteLine("HwndMouseInputProvider: GetWindowStyle or GetClientRect failed!"); 1369System.Diagnostics.Debug.WriteLine("HwndMouseInputProvider: GetMessageExtraInfo failed!");
Core\CSharp\System\Windows\Interop\HwndSource.cs (6)
867Debug.Assert(_weakMenuModeMessageHandler == null); 897Debug.Assert(_weakMenuModeMessageHandler != null); 1231Debug.Assert(_hwndTarget!= null, "HwndTarget is null"); 1232Debug.Assert(_hwndTarget.IsDisposed == false, "HwndTarget is disposed"); 1777Debug.Assert(_adjustSizingForNonClientArea == true); 2616Debug.Assert(null!=ikis, "ChildSinkWithFocus called when none had focus");
Core\CSharp\System\Windows\Interop\HwndStylusInputProvider.cs (1)
95Debug.Assert( null != _source );
Core\CSharp\System\Windows\Interop\HwndTarget.cs (11)
525Debug.Assert(normalizedHwnd.Handle != IntPtr.Zero); 561Debug.Assert(normalizedHwnd.Handle != IntPtr.Zero); 661Debug.Assert(mode == RenderingMode.Software || mode == RenderingMode.Default); 802Debug.Assert(!_compositionTarget.IsOnChannel(channel)); 803Debug.Assert(!_compositionTarget.IsOnChannel(outOfBandChannel)); 822Debug.Assert(resourceCreated); 1455Debug.Assert(_restoreDT == sourceDT); 2576Debug.Assert(!_compositionTarget.IsOnChannel(channel)); 2811Debug.Assert(hwndTarget != null); 2833Debug.Assert(hwndTarget != null); 2836Debug.Assert(_hwndTargetCount >= 0);
Core\CSharp\System\Windows\Media\Animation\Animatable.cs (3)
77Debug.Assert(animatedPropertiesMap.Count > 0); 102Debug.Assert(animatedPropertiesMap.Count > 0); 325Debug.Assert(reference is WeakReference);
Core\CSharp\System\Windows\Media\Animation\AnimationClockResource.cs (6)
75Debug.Assert(sender as System.Windows.Threading.DispatcherObject != null); 76Debug.Assert(((System.Windows.Threading.DispatcherObject)sender).Dispatcher != null); 77Debug.Assert(_animationClock != null); 129Debug.Assert(!skipOnChannelCheck || _duceResource.IsOnChannel(channel)); 170Debug.Assert(_duceResource.IsOnChannel(channel)); 186Debug.Assert(_duceResource.IsOnChannel(channel));
Core\CSharp\System\Windows\Media\Animation\AnimationLayer.cs (19)
18Debug.Assert(ownerStorage != null); 29Debug.Assert( 36Debug.Assert(defaultDestinationValue != DependencyProperty.UnsetValue, 83Debug.Assert(handoffBehavior == HandoffBehavior.Compose, 85Debug.Assert(defaultDestinationValue == DependencyProperty.UnsetValue, 105Debug.Assert(_animationClocks != null); 120Debug.Assert(animationClocks != null); 121Debug.Assert(animationClocks.Count > 0); 122Debug.Assert(!animationClocks.Contains(null)); 123Debug.Assert(_animationClocks == null); 137Debug.Assert(_hasStickySnapshotValue, 147Debug.Assert(_animationClocks != null 155Debug.Assert(index >= 0, 187Debug.Assert(newAnimationClocks != null); 188Debug.Assert(newAnimationClocks.Count > 0); 189Debug.Assert(!newAnimationClocks.Contains(null)); 222Debug.Assert(defaultDestinationValue != DependencyProperty.UnsetValue); 242Debug.Assert(_snapshotValue != DependencyProperty.UnsetValue); 263Debug.Assert(count > 0);
Core\CSharp\System\Windows\Media\Animation\AnimationStorage.cs (41)
48Debug.Assert( _animationClocks == null 51Debug.Assert( _propertyTriggerLayers == null 80Debug.Assert(animationClock != null); 81Debug.Assert(_dependencyObject.Target != null); 82Debug.Assert(_currentTimeInvalidatedHandler != null); 108Debug.Assert(animationClock != null); 109Debug.Assert(_currentTimeInvalidatedHandler != null); 121Debug.Assert(_dependencyObject == null); 122Debug.Assert(_dependencyProperty == null); 146Debug.Assert(_propertyTriggerLayers != null); 147Debug.Assert(_propertyTriggerLayers.ContainsValue(layer)); 151Debug.Assert(index >= 0); 249Debug.Assert(animatedPropertyMap.Count > 0); 250Debug.Assert(animatedPropertyMap[_dependencyProperty.GlobalIndex] != DependencyProperty.UnsetValue); 507Debug.Assert( _animationClocks != null 515Debug.Assert(index > -1, 544Debug.Assert(_hasStickySnapshotValue, 556Debug.Assert(_animationClocks.Count > 0); 596Debug.Assert(animationClocks != null, 598Debug.Assert(animationClocks.Count > 0, 600Debug.Assert(!animationClocks.Contains(null), 602Debug.Assert(HandoffBehaviorEnum.IsDefined(handoffBehavior), 657Debug.Assert(animationClocks[i] != null); 665Debug.Assert(handoffBehavior == HandoffBehavior.Compose); 666Debug.Assert(storage != null); 667Debug.Assert(storage._animationClocks != null); 712Debug.Assert(animationClocks != null); 713Debug.Assert(!animationClocks.Contains(null)); 715Debug.Assert(HandoffBehaviorEnum.IsDefined(handoffBehavior), 785Debug.Assert(animation == null || IsAnimationValid(dp, animation)); 786Debug.Assert(IsPropertyAnimatable(d, dp)); 788Debug.Assert(HandoffBehaviorEnum.IsDefined(handoffBehavior), 857Debug.Assert(storage._animationClocks != null && storage._animationClocks.Count > 0, 904Debug.Assert(storage != null, 925Debug.Assert(storage._snapshotValue != DependencyProperty.UnsetValue); 937Debug.Assert(currentPropertyValue != DependencyProperty.UnsetValue); 947Debug.Assert(count > 0); 979Debug.Assert(clocksCount > 0); 980Debug.Assert(defaultDestinationValue != DependencyProperty.UnsetValue); 1097Debug.Assert( AnimatedPropertyMapField.GetValue(d)[dp.GlobalIndex] == DependencyProperty.UnsetValue 1159Debug.Assert(type == typeof(Vector3D), "Application is trying to create independent animation storage for an unsupported type.");
Core\CSharp\System\Windows\Media\Animation\Clock.cs (145)
67Debug.Assert(timeline != null); 177Debug.Assert(!IsTimeManager); 206Debug.Assert(!IsTimeManager); 224Debug.Assert(!IsTimeManager); 246Debug.Assert(!IsTimeManager); 284Debug.Assert(!IsTimeManager); 297Debug.Assert(!IsTimeManager); 315Debug.Assert(!IsTimeManager); 342Debug.Assert(!IsTimeManager); 370Debug.Assert(!IsTimeManager); 502Debug.Assert(!IsTimeManager); 588Debug.Assert(!clock.IsTimeManager); 638Debug.Assert(!current.IsTimeManager); // We should not yet be connected to the TimeManager 716Debug.Assert(!IsTimeManager); 792Debug.Assert(!IsTimeManager); 799Debug.Assert(!(IsInteractivelyPaused && PendingInteractivePause)); 800Debug.Assert(!(!IsInteractivelyPaused && PendingInteractiveResume)); 837Debug.Assert(!IsTimeManager); 844Debug.Assert( !(IsInteractivelyPaused && PendingInteractivePause)); 845Debug.Assert( !(!IsInteractivelyPaused && PendingInteractiveResume)); 872Debug.Assert(IsRoot); 894Debug.Assert(IsRoot); 965Debug.Assert(IsRoot); 976Debug.Assert(IsRoot); 1007Debug.Assert(IsRoot); 1088Debug.Assert(!IsTimeManager); 1124Debug.Assert(!IsTimeManager); 1146Debug.Assert(!IsTimeManager); 1165Debug.Assert(!IsTimeManager); 1244Debug.Assert(!IsTimeManager); 1392Debug.Assert(!IsTimeManager); 1412Debug.Assert(_resolvedDuration != Duration.Automatic, "_resolvedDuration should never be set to Automatic."); 1429Debug.Assert(!IsTimeManager); 1430Debug.Assert(_parent != null && !_parent.IsTimeManager); 1802Debug.Assert(IsRoot); // root clocks only; non-roots have constant begin time 1803Debug.Assert(_rootData != null); 1808Debug.Assert(!RootBeginPending); // we can have either a begin or a seek, not both 1879Debug.Assert(_beginTime.HasValue); 1930Debug.Assert(IsRoot); 1936Debug.Assert(_rootData.DesiredFrameRate > 0); 1956Debug.Assert(!IsTimeManager); 1957Debug.Assert(!IsInteractivelyStopped); 1958Debug.Assert(_parent._currentClockState != ClockState.Stopped); 1959Debug.Assert(_currentClockState != ClockState.Stopped); 1960Debug.Assert(_currentDuration != Duration.Automatic, "_currentDuration should never be Automatic."); 1961Debug.Assert(_beginTime.HasValue); 1963Debug.Assert(parentTime >= _beginTime.Value); // We are active or in postfill 1979Debug.Assert(_currentClockState != ClockState.Active); 2187Debug.Assert(_currentDuration == Duration.Forever, "_currentDuration has an invalid enum value."); 2188Debug.Assert(_currentClockState == ClockState.Active 2206Debug.Assert(this is ClockGroup, "ComputeCurrentIterationWithGrow should only run on ClockGroups."); 2207Debug.Assert(CanGrow, "ComputeCurrentIterationWithGrow should only run on clocks with CanGrow."); 2208Debug.Assert(_currentIterationBeginTime.HasValue, "ComputeCurrentIterationWithGrow should only be called when _currentIterationBeginTime has a value."); 2209Debug.Assert(_resolvedDuration.HasTimeSpan, "ComputeCurrentIterationWithGrow should only be called when _resolvedDuration has a value."); // We must have a computed duration 2210Debug.Assert(_currentDuration.HasTimeSpan, "ComputeCurrentIterationWithGrow should only be called when _currentDuration has a value."); 2271Debug.Assert(!IsTimeManager); 2272Debug.Assert(!IsInteractivelyStopped); 2273Debug.Assert(_parent._currentClockState != ClockState.Stopped); 2274Debug.Assert(_beginTime.HasValue); 2323Debug.Assert(!IsTimeManager); 2324Debug.Assert(!IsInteractivelyStopped); 2325Debug.Assert(_parent._currentClockState != ClockState.Stopped); 2326Debug.Assert(_currentClockState == ClockState.Active); // Must be active at this point 2353Debug.Assert(!IsTimeManager); 2354Debug.Assert(!IsInteractivelyStopped); 2355Debug.Assert(_parent._currentClockState != ClockState.Stopped); 2356Debug.Assert(_currentClockState != ClockState.Stopped); 2357Debug.Assert(_currentDuration != Duration.Automatic, "_currentDuration should never be Automatic."); 2361Debug.Assert(_currentDuration.TimeSpan > TimeSpan.Zero, "ComputeCurrentTime was entered with _currentDuration <= 0"); 2368Debug.Assert(transitionTime <= 1, "The values of the accel and decel attributes incorrectly add to more than 1.0"); 2369Debug.Assert(transitionTime >= 0, "The values of the accel and decel attributes incorrectly add to less than 0.0"); 2432Debug.Assert(_currentDuration == Duration.Forever, "_currentDuration has an invalid enum value."); 2446Debug.Assert(!IsTimeManager); 2460Debug.Assert(_resolvedDuration == Duration.Forever, "_resolvedDuration should be Forever when NaturalDuration is Automatic."); 2488Debug.Assert(!IsTimeManager); 2489Debug.Assert(!IsInteractivelyStopped || IsRoot); 2493Debug.Assert(_resolvedDuration != Duration.Automatic, "_resolvedDuration should never be Automatic."); 2494Debug.Assert(_currentDuration != Duration.Automatic, "_currentDuration should never be Automatic."); 2516Debug.Assert(_currentDuration.HasTimeSpan, "_currentDuration is invalid, neither Forever nor a TimeSpan."); 2517Debug.Assert(_currentDuration == _resolvedDuration, "For clocks which cannot grow, _currentDuration must equal _resolvedDuration."); 2529Debug.Assert(_resolvedDuration.HasTimeSpan, "_resolvedDuration is invalid, neither Forever nor a TimeSpan."); 2530Debug.Assert(_currentDuration.HasTimeSpan, "_currentDuration is invalid, neither Forever nor a TimeSpan."); 2539Debug.Assert(_beginTime.HasValue); // _currentIterationBeginTime.HasValue implies _beginTime.HasValue 2568Debug.Assert(repeatBehavior == RepeatBehavior.Forever); // Only other valid enum value 2662Debug.Assert(!IsTimeManager); 2663Debug.Assert(!IsInteractivelyStopped || IsRoot); 2670Debug.Assert(!_currentIterationBeginTime.HasValue, "_currentIterationBeginTime should not have a value when _beginTime has no value."); 2675Debug.Assert(_beginTime.HasValue); 2704Debug.Assert(IsRoot); 2746Debug.Assert(_beginTime == null); 2747Debug.Assert(_currentClockState == ClockState.Stopped); 2771Debug.Assert(!IsInteractivelyPaused); // Enforce invariant: cannot be pausePending when already paused 2772Debug.Assert(!PendingInteractiveResume); // Enforce invariant: cannot be both pause and resumePending 2789Debug.Assert(IsInteractivelyPaused); 2790Debug.Assert(!PendingInteractivePause); 2818Debug.Assert(endOfActivePeriod.HasValue); 2896Debug.Assert(!IsTimeManager); 2921Debug.Assert(parentTime.HasValue); // If parent isn't stopped, it must have valid time and speed 2922Debug.Assert(parentSpeed.HasValue); 2948Debug.Assert(parentTime.HasValue); // Cannot be true unless parent is stopped 2969Debug.Assert(_beginTime.HasValue); 2970Debug.Assert(parentTime.HasValue); 3015Debug.Assert(!IsTimeManager); 3016Debug.Assert(!IsInteractivelyStopped); 3017Debug.Assert(_parent._currentClockState != ClockState.Stopped); 3018Debug.Assert(_beginTime.HasValue); 3090Debug.Assert(!IsTimeManager); 3091Debug.Assert(!IsInteractivelyStopped || IsRoot); 3095Debug.Assert(_rootData != null, "A root Clock must have the _rootData structure initialized."); 3176Debug.Assert(!IsTimeManager); 3177Debug.Assert(_parent != null); 3178Debug.Assert(_parent.CurrentState != ClockState.Stopped); 3181Debug.Assert(HasSeekOccuredAfterLastTick || 3185Debug.Assert(_syncData.SyncClock == this || _syncData.SyncClock._parent == this); 3186Debug.Assert(CanSlip || _timeline is ParallelTimeline && ((ParallelTimeline)_timeline).SlipBehavior == SlipBehavior.Slip); 3188Debug.Assert(_syncData != null); 3189Debug.Assert(!_syncData.IsInSyncPeriod); 3192Debug.Assert(_timeline.AutoReverse == false); 3193Debug.Assert(_timeline.AccelerationRatio == 0); 3194Debug.Assert(_timeline.DecelerationRatio == 0); 3241Debug.Assert(syncClockDuration == Duration.Automatic); 3310Debug.Assert(!IsTimeManager); 3311Debug.Assert(_parent != null); 3312Debug.Assert(_syncData != null); 3313Debug.Assert(_syncData.IsInSyncPeriod); 3316Debug.Assert(_syncData.SyncClock == this || _syncData.SyncClock._parent == this); 3320Debug.Assert(!parentIntervalCollection.IsEmpty); // The parent isn't Stopped, so it must have a TIC 3324Debug.Assert(parentIntervalCollection.IsEmptyOfRealPoints || parentIntervalCollection.FirstNodeTime <= currentParentTimePT); 3325Debug.Assert(currentParentSpeed >= 0); 3415Debug.Assert(!current.IsRoot, "Root nodes never should reset their Slip amounts with ResetSlipOnSubtree(), even when seeking."); 3457Debug.Assert(!IsTimeManager); 3538Debug.Assert(_rootData.DesiredFrameRate > 0); 3566Debug.Assert(!IsTimeManager); 3589Debug.Assert(!IsTimeManager); 3590Debug.Assert(_parent == null); 3591Debug.Assert(_timeManager == null); 3682Debug.Assert(factor != 0); // Divide by zero 3769Debug.Assert(IsRoot); // This should only be called on root-child clocks 3805Debug.Assert(!IsTimeManager); 3886Debug.Assert(!IsTimeManager); 4006Debug.Assert(syncClock != null); 4007Debug.Assert(syncClock.GetCanSlip()); 4008Debug.Assert(syncClock.IsRoot || syncClock._timeline.BeginTime.HasValue); // Only roots may later validate their _beginTime 4097Debug.Assert(_syncClockBeginTime.HasValue); // This should never be queried on a root without beginTime 4199Debug.Assert(Math.Abs(optimizedInputTime - inputTime) <= error,
Core\CSharp\System\Windows\Media\Animation\ClockController.cs (1)
47Debug.Assert(owner != null, "ClockController must have a non-null owner.");
Core\CSharp\System\Windows\Media\Animation\ClockGroup.cs (19)
58Debug.Assert(!IsTimeManager); 71Debug.Assert(!IsTimeManager); 84Debug.Assert(IsTimeManager); 102Debug.Assert(timelineGroup != null); 191Debug.Assert(IsTimeManager); 219Debug.Assert(IsTimeManager); 256Debug.Assert(IsTimeManager); 302Debug.Assert(group != null); // We should only have this flag set for ClockGroups 316Debug.Assert(_children != null); 415Debug.Assert(!IsTimeManager, "Cannot associate a root with multiple timing trees"); 416Debug.Assert(this._timeManager == null, "Cannot use a timeline already in the timing tree as a root"); 417Debug.Assert(timeManager.TimeManagerClock == this, "Cannot associate more than one root per timing tree"); 418Debug.Assert(this._parent == null && _children == null, "Cannot use a timeline connected to other timelines as a root"); 440Debug.Assert(IsRoot); 465Debug.Assert(IsTimeManager, "Invalid call to RootActivate for a non-root Clock"); 466Debug.Assert(_timeManager != null); // RootActivate should be called by our own TimeManager 481Debug.Assert(IsTimeManager, "Invalid call to RootCleanChildren for a non-root Clock"); 504Debug.Assert(IsTimeManager, "Invalid call to RootHasChildren for a non-root Clock"); 515Debug.Assert(IsTimeManager, "Invalid call to RootDeactivate for a non-root Clock");
Core\CSharp\System\Windows\Media\Animation\DoubleAnimationUsingPath.cs (2)
175Debug.Assert(animationClock.CurrentState != ClockState.Stopped); 268Debug.Assert(!_isValid);
Core\CSharp\System\Windows\Media\Animation\Generated\BooleanAnimationUsingKeyFrames.cs (7)
336Debug.Assert(animationClock.CurrentState != ClockState.Stopped); 361Debug.Assert(maxKeyFrameIndex >= 0, "maxKeyFrameIndex is less than zero which means we don't actually have any key frames."); 553Debug.Assert(_areKeyTimesValid, "The key frames must be resolved and sorted before calling GetResolvedKeyFrameValue"); 560Debug.Assert(_areKeyTimesValid, "The key frames must be resolved and sorted before calling GetResolvedKeyFrame"); 610Debug.Assert(!_areKeyTimesValid, "KeyFrameBooleanAnimaton.ResolveKeyTimes() shouldn't be called if the key times are already valid."); 752Debug.Assert(index < keyFrameCount, 828Debug.Assert(_keyFrames != null && _keyFrames.Count > 2,
Core\CSharp\System\Windows\Media\Animation\Generated\BooleanKeyFrameCollection.cs (1)
491Debug.Assert(_keyFrames[index] != null);
Core\CSharp\System\Windows\Media\Animation\Generated\ByteAnimation.cs (2)
220Debug.Assert(animationClock.CurrentState != ClockState.Stopped); 318Debug.Fail("Unknown animation type.");
Core\CSharp\System\Windows\Media\Animation\Generated\ByteAnimationUsingKeyFrames.cs (7)
336Debug.Assert(animationClock.CurrentState != ClockState.Stopped); 361Debug.Assert(maxKeyFrameIndex >= 0, "maxKeyFrameIndex is less than zero which means we don't actually have any key frames."); 645Debug.Assert(_areKeyTimesValid, "The key frames must be resolved and sorted before calling GetResolvedKeyFrameValue"); 652Debug.Assert(_areKeyTimesValid, "The key frames must be resolved and sorted before calling GetResolvedKeyFrame"); 702Debug.Assert(!_areKeyTimesValid, "KeyFrameByteAnimaton.ResolveKeyTimes() shouldn't be called if the key times are already valid."); 844Debug.Assert(index < keyFrameCount, 920Debug.Assert(_keyFrames != null && _keyFrames.Count > 2,
Core\CSharp\System\Windows\Media\Animation\Generated\ByteKeyFrameCollection.cs (1)
491Debug.Assert(_keyFrames[index] != null);
Core\CSharp\System\Windows\Media\Animation\Generated\CharAnimationUsingKeyFrames.cs (7)
336Debug.Assert(animationClock.CurrentState != ClockState.Stopped); 361Debug.Assert(maxKeyFrameIndex >= 0, "maxKeyFrameIndex is less than zero which means we don't actually have any key frames."); 553Debug.Assert(_areKeyTimesValid, "The key frames must be resolved and sorted before calling GetResolvedKeyFrameValue"); 560Debug.Assert(_areKeyTimesValid, "The key frames must be resolved and sorted before calling GetResolvedKeyFrame"); 610Debug.Assert(!_areKeyTimesValid, "KeyFrameCharAnimaton.ResolveKeyTimes() shouldn't be called if the key times are already valid."); 752Debug.Assert(index < keyFrameCount, 828Debug.Assert(_keyFrames != null && _keyFrames.Count > 2,
Core\CSharp\System\Windows\Media\Animation\Generated\CharKeyFrameCollection.cs (1)
491Debug.Assert(_keyFrames[index] != null);
Core\CSharp\System\Windows\Media\Animation\Generated\ColorAnimation.cs (2)
220Debug.Assert(animationClock.CurrentState != ClockState.Stopped); 318Debug.Fail("Unknown animation type.");
Core\CSharp\System\Windows\Media\Animation\Generated\ColorAnimationUsingKeyFrames.cs (7)
336Debug.Assert(animationClock.CurrentState != ClockState.Stopped); 361Debug.Assert(maxKeyFrameIndex >= 0, "maxKeyFrameIndex is less than zero which means we don't actually have any key frames."); 645Debug.Assert(_areKeyTimesValid, "The key frames must be resolved and sorted before calling GetResolvedKeyFrameValue"); 652Debug.Assert(_areKeyTimesValid, "The key frames must be resolved and sorted before calling GetResolvedKeyFrame"); 702Debug.Assert(!_areKeyTimesValid, "KeyFrameColorAnimaton.ResolveKeyTimes() shouldn't be called if the key times are already valid."); 844Debug.Assert(index < keyFrameCount, 920Debug.Assert(_keyFrames != null && _keyFrames.Count > 2,
Core\CSharp\System\Windows\Media\Animation\Generated\ColorIndependentAnimationStorage.cs (1)
52Debug.Assert(_duceResource.IsOnChannel(channel));
Core\CSharp\System\Windows\Media\Animation\Generated\ColorKeyFrameCollection.cs (1)
491Debug.Assert(_keyFrames[index] != null);
Core\CSharp\System\Windows\Media\Animation\Generated\DecimalAnimation.cs (2)
220Debug.Assert(animationClock.CurrentState != ClockState.Stopped); 318Debug.Fail("Unknown animation type.");
Core\CSharp\System\Windows\Media\Animation\Generated\DecimalAnimationUsingKeyFrames.cs (7)
336Debug.Assert(animationClock.CurrentState != ClockState.Stopped); 361Debug.Assert(maxKeyFrameIndex >= 0, "maxKeyFrameIndex is less than zero which means we don't actually have any key frames."); 645Debug.Assert(_areKeyTimesValid, "The key frames must be resolved and sorted before calling GetResolvedKeyFrameValue"); 652Debug.Assert(_areKeyTimesValid, "The key frames must be resolved and sorted before calling GetResolvedKeyFrame"); 702Debug.Assert(!_areKeyTimesValid, "KeyFrameDecimalAnimaton.ResolveKeyTimes() shouldn't be called if the key times are already valid."); 844Debug.Assert(index < keyFrameCount, 920Debug.Assert(_keyFrames != null && _keyFrames.Count > 2,
Core\CSharp\System\Windows\Media\Animation\Generated\DecimalKeyFrameCollection.cs (1)
491Debug.Assert(_keyFrames[index] != null);
Core\CSharp\System\Windows\Media\Animation\Generated\DoubleAnimation.cs (2)
220Debug.Assert(animationClock.CurrentState != ClockState.Stopped); 318Debug.Fail("Unknown animation type.");
Core\CSharp\System\Windows\Media\Animation\Generated\DoubleAnimationUsingKeyFrames.cs (7)
336Debug.Assert(animationClock.CurrentState != ClockState.Stopped); 361Debug.Assert(maxKeyFrameIndex >= 0, "maxKeyFrameIndex is less than zero which means we don't actually have any key frames."); 645Debug.Assert(_areKeyTimesValid, "The key frames must be resolved and sorted before calling GetResolvedKeyFrameValue"); 652Debug.Assert(_areKeyTimesValid, "The key frames must be resolved and sorted before calling GetResolvedKeyFrame"); 702Debug.Assert(!_areKeyTimesValid, "KeyFrameDoubleAnimaton.ResolveKeyTimes() shouldn't be called if the key times are already valid."); 844Debug.Assert(index < keyFrameCount, 920Debug.Assert(_keyFrames != null && _keyFrames.Count > 2,
Core\CSharp\System\Windows\Media\Animation\Generated\DoubleIndependentAnimationStorage.cs (1)
52Debug.Assert(_duceResource.IsOnChannel(channel));
Core\CSharp\System\Windows\Media\Animation\Generated\DoubleKeyFrameCollection.cs (1)
491Debug.Assert(_keyFrames[index] != null);
Core\CSharp\System\Windows\Media\Animation\Generated\Int16Animation.cs (2)
220Debug.Assert(animationClock.CurrentState != ClockState.Stopped); 318Debug.Fail("Unknown animation type.");
Core\CSharp\System\Windows\Media\Animation\Generated\Int16AnimationUsingKeyFrames.cs (7)
336Debug.Assert(animationClock.CurrentState != ClockState.Stopped); 361Debug.Assert(maxKeyFrameIndex >= 0, "maxKeyFrameIndex is less than zero which means we don't actually have any key frames."); 645Debug.Assert(_areKeyTimesValid, "The key frames must be resolved and sorted before calling GetResolvedKeyFrameValue"); 652Debug.Assert(_areKeyTimesValid, "The key frames must be resolved and sorted before calling GetResolvedKeyFrame"); 702Debug.Assert(!_areKeyTimesValid, "KeyFrameInt16Animaton.ResolveKeyTimes() shouldn't be called if the key times are already valid."); 844Debug.Assert(index < keyFrameCount, 920Debug.Assert(_keyFrames != null && _keyFrames.Count > 2,
Core\CSharp\System\Windows\Media\Animation\Generated\Int16KeyFrameCollection.cs (1)
491Debug.Assert(_keyFrames[index] != null);
Core\CSharp\System\Windows\Media\Animation\Generated\Int32Animation.cs (2)
220Debug.Assert(animationClock.CurrentState != ClockState.Stopped); 318Debug.Fail("Unknown animation type.");
Core\CSharp\System\Windows\Media\Animation\Generated\Int32AnimationUsingKeyFrames.cs (7)
336Debug.Assert(animationClock.CurrentState != ClockState.Stopped); 361Debug.Assert(maxKeyFrameIndex >= 0, "maxKeyFrameIndex is less than zero which means we don't actually have any key frames."); 645Debug.Assert(_areKeyTimesValid, "The key frames must be resolved and sorted before calling GetResolvedKeyFrameValue"); 652Debug.Assert(_areKeyTimesValid, "The key frames must be resolved and sorted before calling GetResolvedKeyFrame"); 702Debug.Assert(!_areKeyTimesValid, "KeyFrameInt32Animaton.ResolveKeyTimes() shouldn't be called if the key times are already valid."); 844Debug.Assert(index < keyFrameCount, 920Debug.Assert(_keyFrames != null && _keyFrames.Count > 2,
Core\CSharp\System\Windows\Media\Animation\Generated\Int32KeyFrameCollection.cs (1)
491Debug.Assert(_keyFrames[index] != null);
Core\CSharp\System\Windows\Media\Animation\Generated\Int64Animation.cs (2)
220Debug.Assert(animationClock.CurrentState != ClockState.Stopped); 318Debug.Fail("Unknown animation type.");
Core\CSharp\System\Windows\Media\Animation\Generated\Int64AnimationUsingKeyFrames.cs (7)
336Debug.Assert(animationClock.CurrentState != ClockState.Stopped); 361Debug.Assert(maxKeyFrameIndex >= 0, "maxKeyFrameIndex is less than zero which means we don't actually have any key frames."); 645Debug.Assert(_areKeyTimesValid, "The key frames must be resolved and sorted before calling GetResolvedKeyFrameValue"); 652Debug.Assert(_areKeyTimesValid, "The key frames must be resolved and sorted before calling GetResolvedKeyFrame"); 702Debug.Assert(!_areKeyTimesValid, "KeyFrameInt64Animaton.ResolveKeyTimes() shouldn't be called if the key times are already valid."); 844Debug.Assert(index < keyFrameCount, 920Debug.Assert(_keyFrames != null && _keyFrames.Count > 2,
Core\CSharp\System\Windows\Media\Animation\Generated\Int64KeyFrameCollection.cs (1)
491Debug.Assert(_keyFrames[index] != null);
Core\CSharp\System\Windows\Media\Animation\Generated\MatrixAnimationUsingKeyFrames.cs (7)
336Debug.Assert(animationClock.CurrentState != ClockState.Stopped); 361Debug.Assert(maxKeyFrameIndex >= 0, "maxKeyFrameIndex is less than zero which means we don't actually have any key frames."); 553Debug.Assert(_areKeyTimesValid, "The key frames must be resolved and sorted before calling GetResolvedKeyFrameValue"); 560Debug.Assert(_areKeyTimesValid, "The key frames must be resolved and sorted before calling GetResolvedKeyFrame"); 610Debug.Assert(!_areKeyTimesValid, "KeyFrameMatrixAnimaton.ResolveKeyTimes() shouldn't be called if the key times are already valid."); 752Debug.Assert(index < keyFrameCount, 828Debug.Assert(_keyFrames != null && _keyFrames.Count > 2,
Core\CSharp\System\Windows\Media\Animation\Generated\MatrixIndependentAnimationStorage.cs (1)
52Debug.Assert(_duceResource.IsOnChannel(channel));
Core\CSharp\System\Windows\Media\Animation\Generated\MatrixKeyFrameCollection.cs (1)
491Debug.Assert(_keyFrames[index] != null);
Core\CSharp\System\Windows\Media\Animation\Generated\ObjectAnimationUsingKeyFrames.cs (7)
336Debug.Assert(animationClock.CurrentState != ClockState.Stopped); 361Debug.Assert(maxKeyFrameIndex >= 0, "maxKeyFrameIndex is less than zero which means we don't actually have any key frames."); 553Debug.Assert(_areKeyTimesValid, "The key frames must be resolved and sorted before calling GetResolvedKeyFrameValue"); 560Debug.Assert(_areKeyTimesValid, "The key frames must be resolved and sorted before calling GetResolvedKeyFrame"); 610Debug.Assert(!_areKeyTimesValid, "KeyFrameObjectAnimaton.ResolveKeyTimes() shouldn't be called if the key times are already valid."); 752Debug.Assert(index < keyFrameCount, 828Debug.Assert(_keyFrames != null && _keyFrames.Count > 2,
Core\CSharp\System\Windows\Media\Animation\Generated\ObjectKeyFrameCollection.cs (1)
491Debug.Assert(_keyFrames[index] != null);
Core\CSharp\System\Windows\Media\Animation\Generated\Point3DAnimation.cs (2)
220Debug.Assert(animationClock.CurrentState != ClockState.Stopped); 318Debug.Fail("Unknown animation type.");
Core\CSharp\System\Windows\Media\Animation\Generated\Point3DAnimationUsingKeyFrames.cs (7)
336Debug.Assert(animationClock.CurrentState != ClockState.Stopped); 361Debug.Assert(maxKeyFrameIndex >= 0, "maxKeyFrameIndex is less than zero which means we don't actually have any key frames."); 645Debug.Assert(_areKeyTimesValid, "The key frames must be resolved and sorted before calling GetResolvedKeyFrameValue"); 652Debug.Assert(_areKeyTimesValid, "The key frames must be resolved and sorted before calling GetResolvedKeyFrame"); 702Debug.Assert(!_areKeyTimesValid, "KeyFramePoint3DAnimaton.ResolveKeyTimes() shouldn't be called if the key times are already valid."); 844Debug.Assert(index < keyFrameCount, 920Debug.Assert(_keyFrames != null && _keyFrames.Count > 2,
Core\CSharp\System\Windows\Media\Animation\Generated\Point3DIndependentAnimationStorage.cs (1)
52Debug.Assert(_duceResource.IsOnChannel(channel));
Core\CSharp\System\Windows\Media\Animation\Generated\Point3DKeyFrameCollection.cs (1)
491Debug.Assert(_keyFrames[index] != null);
Core\CSharp\System\Windows\Media\Animation\Generated\PointAnimation.cs (2)
220Debug.Assert(animationClock.CurrentState != ClockState.Stopped); 318Debug.Fail("Unknown animation type.");
Core\CSharp\System\Windows\Media\Animation\Generated\PointAnimationUsingKeyFrames.cs (7)
336Debug.Assert(animationClock.CurrentState != ClockState.Stopped); 361Debug.Assert(maxKeyFrameIndex >= 0, "maxKeyFrameIndex is less than zero which means we don't actually have any key frames."); 645Debug.Assert(_areKeyTimesValid, "The key frames must be resolved and sorted before calling GetResolvedKeyFrameValue"); 652Debug.Assert(_areKeyTimesValid, "The key frames must be resolved and sorted before calling GetResolvedKeyFrame"); 702Debug.Assert(!_areKeyTimesValid, "KeyFramePointAnimaton.ResolveKeyTimes() shouldn't be called if the key times are already valid."); 844Debug.Assert(index < keyFrameCount, 920Debug.Assert(_keyFrames != null && _keyFrames.Count > 2,
Core\CSharp\System\Windows\Media\Animation\Generated\PointIndependentAnimationStorage.cs (1)
52Debug.Assert(_duceResource.IsOnChannel(channel));
Core\CSharp\System\Windows\Media\Animation\Generated\PointKeyFrameCollection.cs (1)
491Debug.Assert(_keyFrames[index] != null);
Core\CSharp\System\Windows\Media\Animation\Generated\QuaternionAnimation.cs (2)
220Debug.Assert(animationClock.CurrentState != ClockState.Stopped); 318Debug.Fail("Unknown animation type.");
Core\CSharp\System\Windows\Media\Animation\Generated\QuaternionAnimationUsingKeyFrames.cs (7)
336Debug.Assert(animationClock.CurrentState != ClockState.Stopped); 361Debug.Assert(maxKeyFrameIndex >= 0, "maxKeyFrameIndex is less than zero which means we don't actually have any key frames."); 645Debug.Assert(_areKeyTimesValid, "The key frames must be resolved and sorted before calling GetResolvedKeyFrameValue"); 652Debug.Assert(_areKeyTimesValid, "The key frames must be resolved and sorted before calling GetResolvedKeyFrame"); 702Debug.Assert(!_areKeyTimesValid, "KeyFrameQuaternionAnimaton.ResolveKeyTimes() shouldn't be called if the key times are already valid."); 844Debug.Assert(index < keyFrameCount, 920Debug.Assert(_keyFrames != null && _keyFrames.Count > 2,
Core\CSharp\System\Windows\Media\Animation\Generated\QuaternionIndependentAnimationStorage.cs (1)
52Debug.Assert(_duceResource.IsOnChannel(channel));
Core\CSharp\System\Windows\Media\Animation\Generated\QuaternionKeyFrameCollection.cs (1)
491Debug.Assert(_keyFrames[index] != null);
Core\CSharp\System\Windows\Media\Animation\Generated\RectAnimation.cs (2)
220Debug.Assert(animationClock.CurrentState != ClockState.Stopped); 318Debug.Fail("Unknown animation type.");
Core\CSharp\System\Windows\Media\Animation\Generated\RectAnimationUsingKeyFrames.cs (7)
336Debug.Assert(animationClock.CurrentState != ClockState.Stopped); 361Debug.Assert(maxKeyFrameIndex >= 0, "maxKeyFrameIndex is less than zero which means we don't actually have any key frames."); 645Debug.Assert(_areKeyTimesValid, "The key frames must be resolved and sorted before calling GetResolvedKeyFrameValue"); 652Debug.Assert(_areKeyTimesValid, "The key frames must be resolved and sorted before calling GetResolvedKeyFrame"); 702Debug.Assert(!_areKeyTimesValid, "KeyFrameRectAnimaton.ResolveKeyTimes() shouldn't be called if the key times are already valid."); 844Debug.Assert(index < keyFrameCount, 920Debug.Assert(_keyFrames != null && _keyFrames.Count > 2,
Core\CSharp\System\Windows\Media\Animation\Generated\RectIndependentAnimationStorage.cs (1)
52Debug.Assert(_duceResource.IsOnChannel(channel));
Core\CSharp\System\Windows\Media\Animation\Generated\RectKeyFrameCollection.cs (1)
491Debug.Assert(_keyFrames[index] != null);
Core\CSharp\System\Windows\Media\Animation\Generated\Rotation3DAnimation.cs (2)
220Debug.Assert(animationClock.CurrentState != ClockState.Stopped); 318Debug.Fail("Unknown animation type.");
Core\CSharp\System\Windows\Media\Animation\Generated\Rotation3DAnimationUsingKeyFrames.cs (7)
336Debug.Assert(animationClock.CurrentState != ClockState.Stopped); 361Debug.Assert(maxKeyFrameIndex >= 0, "maxKeyFrameIndex is less than zero which means we don't actually have any key frames."); 645Debug.Assert(_areKeyTimesValid, "The key frames must be resolved and sorted before calling GetResolvedKeyFrameValue"); 652Debug.Assert(_areKeyTimesValid, "The key frames must be resolved and sorted before calling GetResolvedKeyFrame"); 702Debug.Assert(!_areKeyTimesValid, "KeyFrameRotation3DAnimaton.ResolveKeyTimes() shouldn't be called if the key times are already valid."); 844Debug.Assert(index < keyFrameCount, 920Debug.Assert(_keyFrames != null && _keyFrames.Count > 2,
Core\CSharp\System\Windows\Media\Animation\Generated\Rotation3DKeyFrameCollection.cs (1)
491Debug.Assert(_keyFrames[index] != null);
Core\CSharp\System\Windows\Media\Animation\Generated\SingleAnimation.cs (2)
220Debug.Assert(animationClock.CurrentState != ClockState.Stopped); 318Debug.Fail("Unknown animation type.");
Core\CSharp\System\Windows\Media\Animation\Generated\SingleAnimationUsingKeyFrames.cs (7)
336Debug.Assert(animationClock.CurrentState != ClockState.Stopped); 361Debug.Assert(maxKeyFrameIndex >= 0, "maxKeyFrameIndex is less than zero which means we don't actually have any key frames."); 645Debug.Assert(_areKeyTimesValid, "The key frames must be resolved and sorted before calling GetResolvedKeyFrameValue"); 652Debug.Assert(_areKeyTimesValid, "The key frames must be resolved and sorted before calling GetResolvedKeyFrame"); 702Debug.Assert(!_areKeyTimesValid, "KeyFrameSingleAnimaton.ResolveKeyTimes() shouldn't be called if the key times are already valid."); 844Debug.Assert(index < keyFrameCount, 920Debug.Assert(_keyFrames != null && _keyFrames.Count > 2,
Core\CSharp\System\Windows\Media\Animation\Generated\SingleKeyFrameCollection.cs (1)
491Debug.Assert(_keyFrames[index] != null);
Core\CSharp\System\Windows\Media\Animation\Generated\SizeAnimation.cs (2)
220Debug.Assert(animationClock.CurrentState != ClockState.Stopped); 318Debug.Fail("Unknown animation type.");
Core\CSharp\System\Windows\Media\Animation\Generated\SizeAnimationUsingKeyFrames.cs (7)
336Debug.Assert(animationClock.CurrentState != ClockState.Stopped); 361Debug.Assert(maxKeyFrameIndex >= 0, "maxKeyFrameIndex is less than zero which means we don't actually have any key frames."); 645Debug.Assert(_areKeyTimesValid, "The key frames must be resolved and sorted before calling GetResolvedKeyFrameValue"); 652Debug.Assert(_areKeyTimesValid, "The key frames must be resolved and sorted before calling GetResolvedKeyFrame"); 702Debug.Assert(!_areKeyTimesValid, "KeyFrameSizeAnimaton.ResolveKeyTimes() shouldn't be called if the key times are already valid."); 844Debug.Assert(index < keyFrameCount, 920Debug.Assert(_keyFrames != null && _keyFrames.Count > 2,
Core\CSharp\System\Windows\Media\Animation\Generated\SizeIndependentAnimationStorage.cs (1)
52Debug.Assert(_duceResource.IsOnChannel(channel));
Core\CSharp\System\Windows\Media\Animation\Generated\SizeKeyFrameCollection.cs (1)
491Debug.Assert(_keyFrames[index] != null);
Core\CSharp\System\Windows\Media\Animation\Generated\StringAnimationUsingKeyFrames.cs (7)
336Debug.Assert(animationClock.CurrentState != ClockState.Stopped); 361Debug.Assert(maxKeyFrameIndex >= 0, "maxKeyFrameIndex is less than zero which means we don't actually have any key frames."); 553Debug.Assert(_areKeyTimesValid, "The key frames must be resolved and sorted before calling GetResolvedKeyFrameValue"); 560Debug.Assert(_areKeyTimesValid, "The key frames must be resolved and sorted before calling GetResolvedKeyFrame"); 610Debug.Assert(!_areKeyTimesValid, "KeyFrameStringAnimaton.ResolveKeyTimes() shouldn't be called if the key times are already valid."); 752Debug.Assert(index < keyFrameCount, 828Debug.Assert(_keyFrames != null && _keyFrames.Count > 2,
Core\CSharp\System\Windows\Media\Animation\Generated\StringKeyFrameCollection.cs (1)
491Debug.Assert(_keyFrames[index] != null);
Core\CSharp\System\Windows\Media\Animation\Generated\TimelineCollection.cs (3)
116Debug.Assert(_collection.Count == 0); 788Debug.Assert(list != null, "list may not be null."); 887Debug.Assert(_index == -2, "expected -2, got " + _index + "\n");
Core\CSharp\System\Windows\Media\Animation\Generated\TimelineGroup.cs (1)
205Debug.Assert(s_Children == null || s_Children.IsFrozen,
Core\CSharp\System\Windows\Media\Animation\Generated\Vector3DAnimation.cs (2)
220Debug.Assert(animationClock.CurrentState != ClockState.Stopped); 318Debug.Fail("Unknown animation type.");
Core\CSharp\System\Windows\Media\Animation\Generated\Vector3DAnimationUsingKeyFrames.cs (7)
336Debug.Assert(animationClock.CurrentState != ClockState.Stopped); 361Debug.Assert(maxKeyFrameIndex >= 0, "maxKeyFrameIndex is less than zero which means we don't actually have any key frames."); 645Debug.Assert(_areKeyTimesValid, "The key frames must be resolved and sorted before calling GetResolvedKeyFrameValue"); 652Debug.Assert(_areKeyTimesValid, "The key frames must be resolved and sorted before calling GetResolvedKeyFrame"); 702Debug.Assert(!_areKeyTimesValid, "KeyFrameVector3DAnimaton.ResolveKeyTimes() shouldn't be called if the key times are already valid."); 844Debug.Assert(index < keyFrameCount, 920Debug.Assert(_keyFrames != null && _keyFrames.Count > 2,
Core\CSharp\System\Windows\Media\Animation\Generated\Vector3DIndependentAnimationStorage.cs (1)
52Debug.Assert(_duceResource.IsOnChannel(channel));
Core\CSharp\System\Windows\Media\Animation\Generated\Vector3DKeyFrameCollection.cs (1)
491Debug.Assert(_keyFrames[index] != null);
Core\CSharp\System\Windows\Media\Animation\Generated\VectorAnimation.cs (2)
220Debug.Assert(animationClock.CurrentState != ClockState.Stopped); 318Debug.Fail("Unknown animation type.");
Core\CSharp\System\Windows\Media\Animation\Generated\VectorAnimationUsingKeyFrames.cs (7)
336Debug.Assert(animationClock.CurrentState != ClockState.Stopped); 361Debug.Assert(maxKeyFrameIndex >= 0, "maxKeyFrameIndex is less than zero which means we don't actually have any key frames."); 645Debug.Assert(_areKeyTimesValid, "The key frames must be resolved and sorted before calling GetResolvedKeyFrameValue"); 652Debug.Assert(_areKeyTimesValid, "The key frames must be resolved and sorted before calling GetResolvedKeyFrame"); 702Debug.Assert(!_areKeyTimesValid, "KeyFrameVectorAnimaton.ResolveKeyTimes() shouldn't be called if the key times are already valid."); 844Debug.Assert(index < keyFrameCount, 920Debug.Assert(_keyFrames != null && _keyFrames.Count > 2,
Core\CSharp\System\Windows\Media\Animation\Generated\VectorKeyFrameCollection.cs (1)
491Debug.Assert(_keyFrames[index] != null);
Core\CSharp\System\Windows\Media\Animation\IndependentAnimationStorage.cs (11)
93Debug.Assert(_duceResource.IsOnChannel(channel)); 109Debug.Assert(d != null); 112Debug.Assert(d.Dispatcher != null); 115Debug.Assert(d.CheckAccess()); 180Debug.Assert(!skipOnChannelCheck || _duceResource.IsOnChannel(channel)); 212Debug.Assert(d != null); 216Debug.Assert(_duceResource.IsOnAnyChannel); 232Debug.Assert(d != null); 233Debug.Assert(dp != null); 234Debug.Assert(d is Animatable ? ((Animatable)d).HasAnimatedProperties : true); 244Debug.Assert(storage._duceResource.IsOnChannel(channel));
Core\CSharp\System\Windows\Media\Animation\KeySpline.cs (3)
267Debug.Assert(_isDirty); 319Debug.Assert(_isSpecified); 341Debug.Assert(_isSpecified);
Core\CSharp\System\Windows\Media\Animation\MatrixAnimationUsingPath.cs (2)
258Debug.Assert(animationClock.CurrentState != ClockState.Stopped); 321Debug.Assert(!_isValid);
Core\CSharp\System\Windows\Media\Animation\PointAnimationUsingPath.cs (2)
151Debug.Assert(animationClock.CurrentState != ClockState.Stopped); 224Debug.Assert(!_isValid);
Core\CSharp\System\Windows\Media\Animation\RepeatBehavior.cs (3)
209Debug.Fail("Unhandled RepeatBehaviorType"); 254Debug.Fail("Unhandled RepeatBehaviorType"); 320Debug.Fail("Unhandled RepeatBehaviorType.");
Core\CSharp\System\Windows\Media\Animation\RepeatBehaviorConverter.cs (1)
152Debug.Fail("Unknown type of RepeatBehavior passed to RepeatBehaviorConverter.");
Core\CSharp\System\Windows\Media\Animation\TimeIntervalCollection.cs (82)
112Debug.Assert(_minimumCapacity >= 2); 139Debug.Assert(IsEmpty); // We should start with a new or Clear()-ed collection first 146Debug.Assert(_nodeIsInterval[0] == false); 195Debug.Assert(_count == 0); // The boolean constructor already did the job for us 257Debug.Assert(_count > 0); 305Debug.Assert(0 < _count && _count <= 2); 314Debug.Assert(beginTime <= _nodeTime[1]); 418Debug.Assert(_nodeTime[index] < time); 550Debug.Assert(fromIndex <= toIndex); 561Debug.Assert(toIndex >= 0); // Since fromIndex!=toIndex, toIndex must be >= 0 568Debug.Assert(fromIndex + 1 < toIndex); 624Debug.Assert(!_invertCollection); // Make sure we never leave inverted mode enabled 688Debug.Assert(!tic1.IsEmptyOfRealPoints); // We shouldn't reach here if either TIC is empty 689Debug.Assert(!tic2.IsEmptyOfRealPoints); 717Debug.Assert(!intersectionFound); // If an intersection was already found, we should not reach this far 727Debug.Assert(tic2.CurrentNodeIsPoint || tic2.CurrentNodeIsInterval); 745Debug.Assert(!tic1.CurrentIsAtLastNode); // Thus tic1._current can be safely advanced now 751Debug.Assert(tic1.CurrentNodeTime >= tic2.CurrentNodeTime); 754Debug.Assert(tic2.CurrentIsAtLastNode || (tic1.CurrentNodeTime < tic2.NextNodeTime)); 755Debug.Assert(tic1.CurrentIsAtLastNode || (tic2.CurrentNodeTime < tic1.NextNodeTime)); 787Debug.Assert(tic1.NextNodeTime == tic2.NextNodeTime); 795Debug.Assert(tic1.CurrentIsAtLastNode && tic2.CurrentIsAtLastNode); 803Debug.Assert(tic2.CurrentIsAtLastNode || (tic1.CurrentNodeTime < tic2.NextNodeTime)); 804Debug.Assert(tic1.CurrentIsAtLastNode || (tic2.CurrentNodeTime < tic1.NextNodeTime)); 815Debug.Assert(!_invertCollection); // Make sure we never leave inverted mode enabled 863Debug.Assert(!_invertCollection); // Make sure we never leave inverted mode enabled 882Debug.Assert(beginTime <= CurrentNodeTime); // The PTIC is clipped by the active period, and we are a subset of the active period 883Debug.Assert(CurrentIsAtLastNode || beginTime < NextNodeTime); 990Debug.Assert(!_invertCollection); // Make sure we never leave inverted mode enabled 1038Debug.Assert(projection.IsEmpty); // Make sure the projection was properly cleared first 1039Debug.Assert(!_invertCollection); // Make sure we never leave inverted mode enabled 1040Debug.Assert(beginTime <= endTime); // Ensure legitimate begin/end clipping parameters 1042Debug.Assert(!IsEmptyOfRealPoints); // We assume this function is ONLY called when this collection overlaps the postfill zone. So we cannot be empty. 1043Debug.Assert(!period.HasTimeSpan || period.TimeSpan > TimeSpan.Zero || beginTime == endTime); // Check the consistency of degenerate case where simple duration is zero; expiration time should equal beginTime 1044Debug.Assert(!_nodeIsInterval[_count - 1]); // We should not have an infinite domain set 1161Debug.Assert(projection.IsEmpty); 1162Debug.Assert(!_invertCollection); // Make sure we never leave inverted mode enabled 1163Debug.Assert(!endTime.HasValue || beginTime <= endTime); // Ensure legitimate begin/end clipping parameters 1165Debug.Assert(!IsEmptyOfRealPoints); // We assume this function is ONLY called when this collection overlaps the active zone. So we cannot be empty. 1166Debug.Assert(!endTime.HasValue || endTime >= _nodeTime[0]); // EndTime must come at or after our first node (it can be infinite) 1167Debug.Assert(_nodeTime[_count - 1] >= beginTime); // Our last node must come at least at begin time (since we must intersect the active period) 1168Debug.Assert(endTime.HasValue || fillDuration == TimeSpan.Zero); // Either endTime is finite, or it's infinite hence we cannot have any fill zone 1169Debug.Assert(!period.HasTimeSpan || period.TimeSpan > TimeSpan.Zero || (endTime.HasValue && beginTime == endTime)); // Check the consistency of degenerate case where simple duration is zero; expiration time should equal beginTime 1170Debug.Assert(!_nodeIsInterval[_count - 1]); // We should not have an infinite domain set 1244Debug.Assert(!IsEmptyOfRealPoints); 1245Debug.Assert(projection.IsEmpty); 1284Debug.Assert(_current > 0); // The only way _current could stay at zero is if the collection begins at (or past) the end of active period 1289Debug.Assert(endTime.HasValue && CurrentNodeTime >= endTime.Value); 1314Debug.Assert(!IsEmptyOfRealPoints); // The entire projection process assumes we are not empty (have an intersection with the active zone). 1315Debug.Assert(periodInTicks > 0); // We do not handle the degenerate case here. 1319Debug.Assert(CurrentNodeTime >= TimeSpan.Zero); // Verify that we are already clipped 1336Debug.Assert(CurrentNodeIsPoint); 1357Debug.Assert(CurrentNodeIsPoint); // We should only call this method when we project a legitimate point 1358Debug.Assert(!CurrentNodeIsInterval); 1429Debug.Assert(timeBeforeNextPeriod > 0); 1502Debug.Assert(intervalLength > 0); 1585Debug.Assert(index == -1 || _nodeTime[index] < point); 1616Debug.Assert(from < to); // Our code should never call MergeInterval for a point or reversed interval 1632Debug.Assert(_nodeTime.Length >= _minimumCapacity); // Assert that we indeed have memory allocated 1670Debug.Assert(_nodeTime[fromIndex] == from); 1701Debug.Assert(_nodeTime[toIndex] == to); 1702Debug.Assert(fromIndex < toIndex); 1733Debug.Assert(_count + netIncreaseInNodes >= 2); // We should never shrink past size 2 1781Debug.Assert(_nodeIsPoint == null); 1782Debug.Assert(_nodeIsInterval == null); 1790Debug.Assert(_nodeIsPoint != null); 1791Debug.Assert(_nodeIsInterval != null); 1822Debug.Assert(periodInTicks > 0); 1823Debug.Assert(accelRatio + decelRatio > 0); 2137Debug.Assert(_count > 0); // Count cannot be negative 2163Debug.Assert(right == _count - 1); 2193Debug.Assert(_current <= _count); 2208Debug.Assert(_current < _count); 2213Debug.Assert(_current < _count); 2222Debug.Assert(_current < _count); 2227Debug.Assert(_current < _count); 2236Debug.Assert(_current < _count); 2241Debug.Assert(_current < _count); 2250Debug.Assert(_current + 1 < _count); 2259Debug.Assert(_current + 1 < _count); 2268Debug.Assert(_current + 1 < _count); 2283Debug.Assert(_invertCollection != mode); // Make sure we aren't redundantly setting the mode
Core\CSharp\System\Windows\Media\Animation\Timeline.cs (1)
935Debug.Assert(sourceStore.Count > 0);
Core\CSharp\System\Windows\Media\Animation\TimelineClockCollection.cs (2)
434Debug.Assert(owner != null, "ClockCollection must have a non-null owner."); 443Debug.Assert(false, "Parameterless constructor is illegal for ClockCollection.");
Core\CSharp\System\Windows\Media\Animation\TimeManager.cs (1)
595Debug.Assert(false, "Unrecognized TimeState enumeration value");
Core\CSharp\System\Windows\Media\BitmapCacheBrush.cs (11)
195Debug.Assert(InternalTarget == AutoWrapVisual, 214Debug.Assert(!_pendingLayout); 272Debug.Assert(element != null); 292Debug.Assert(_pendingLayout); 296Debug.Assert(element != null); 307Debug.Assert(_DispatcherLayoutResult != null); 308Debug.Assert(_DispatcherLayoutResult.Status == DispatcherOperationStatus.Pending); 310Debug.Assert(abortStatus); 322Debug.Assert(_pendingLayout); 325Debug.Assert(element != null); 363Debug.Assert(_reentrancyFlag); // Exit must be matched with Enter. See Enter comments.
Core\CSharp\System\Windows\Media\BoundsDrawingContextWalker.cs (4)
518Debug.Assert(_pushTypeStack != null); 519Debug.Assert(_pushTypeStack.Count > 0); 528Debug.Assert(_transformStack != null); 529Debug.Assert(_transformStack.Count > 0);
Core\CSharp\System\Windows\Media\ByteStreamGeometryContext.cs (8)
369Debug.Assert(sizeof(MIL_PATHGEOMETRY) <= _currOffset); 370Debug.Assert(_currentPathGeometryData.Size == (uint)_currOffset); 491Debug.Assert(_chunkList.Count != 0); 625Debug.Assert(_currentPathFigureDataOffset + sizeof(MIL_PATHFIGURE) <= _currOffset); 670Debug.Assert(_currentPolySegmentDataOffset + sizeof(MIL_SEGMENT_POLY) <= _currOffset); 762Debug.Assert(points != null); 763Debug.Assert(count > 0); 816Debug.Assert((_currentPolySegmentDataOffset != -1) &&
Core\CSharp\System\Windows\Media\ColorContext.cs (2)
177Debug.Assert(_profileUri.Value == null); 695Debug.Assert(stm != null);
Core\CSharp\System\Windows\Media\ColorTransformHelper.cs (2)
106Debug.Assert(success); 108Debug.Assert(success);
Core\CSharp\System\Windows\Media\CombinedGeometry.cs (1)
209Debug.Assert(false);
Core\CSharp\System\Windows\Media\CompositionTarget.cs (6)
80Debug.Assert(channel != null); 81Debug.Assert(!_contentRoot.IsOnChannel(channel)); 83Debug.Assert(outOfBandChannel != null); 84Debug.Assert(!_contentRoot.IsOnChannel(outOfBandChannel)); 95Debug.Assert(resourceCreated); 490Debug.Assert(_cachedRenderContext == null);
Core\CSharp\System\Windows\Media\Drawing.cs (1)
91Debug.Assert(ctx != null);
Core\CSharp\System\Windows\Media\DrawingContextDrawingContextWalker.cs (1)
40Debug.Assert (drawingContext != null);
Core\CSharp\System\Windows\Media\DrawingContextWalker.cs (2)
48Debug.Assert(false); 58Debug.Assert(false);
Core\CSharp\System\Windows\Media\DrawingDrawingContext.cs (3)
1343Debug.Assert(geometry != null); 1429Debug.Assert(newDrawing != null); 1435Debug.Assert(_currentDrawingGroup == null);
Core\CSharp\System\Windows\Media\DrawingGroup.cs (3)
115Debug.Assert(_open); 116Debug.Assert(rootDrawingGroupChildren != null); 195Debug.Assert(!ctx.ShouldStopWalking);
Core\CSharp\System\Windows\Media\DrawingGroupDrawingContext.cs (2)
26Debug.Assert(null != drawingGroup); 44Debug.Assert(null != _drawingGroup);
Core\CSharp\System\Windows\Media\DrawingVisual.cs (4)
68Debug.Assert(intersectionDetail != IntersectionDetail.NotCalculated); 158Debug.Assert(_proxy.IsOnChannel(channel)); 231Debug.Assert(!CheckFlagsAnd(channel, VisualProxyFlags.IsContentConnected)); 232Debug.Assert(_proxy.IsOnChannel(channel));
Core\CSharp\System\Windows\Media\DrawingVisualDrawingContext.cs (2)
46Debug.Assert(null != ownerVisual); 62Debug.Assert(null != _ownerVisual);
Core\CSharp\System\Windows\Media\Effects\Generated\BitmapEffectCollection.cs (3)
115Debug.Assert(_collection.Count == 0); 787Debug.Assert(list != null, "list may not be null."); 886Debug.Assert(_index == -2, "expected -2, got " + _index + "\n");
Core\CSharp\System\Windows\Media\Effects\Generated\BitmapEffectGroup.cs (1)
224Debug.Assert(s_Children == null || s_Children.IsFrozen,
Core\CSharp\System\Windows\Media\Effects\Generated\BitmapEffectInput.cs (1)
257Debug.Assert(s_Input == null || s_Input.IsFrozen,
Core\CSharp\System\Windows\Media\Effects\Generated\BlurEffect.cs (2)
198Debug.Assert(!skipOnChannelCheck || _duceResource.IsOnChannel(channel)); 247Debug.Assert(_duceResource.IsOnChannel(channel));
Core\CSharp\System\Windows\Media\Effects\Generated\DropShadowEffect.cs (2)
264Debug.Assert(!skipOnChannelCheck || _duceResource.IsOnChannel(channel)); 336Debug.Assert(_duceResource.IsOnChannel(channel));
Core\CSharp\System\Windows\Media\Effects\Generated\ImplicitInputBrush.cs (2)
135Debug.Assert(!skipOnChannelCheck || _duceResource.IsOnChannel(channel)); 215Debug.Assert(_duceResource.IsOnChannel(channel));
Core\CSharp\System\Windows\Media\Effects\Generated\PixelShader.cs (1)
201Debug.Assert(_duceResource.IsOnChannel(channel));
Core\CSharp\System\Windows\Media\Effects\Generated\ShaderEffect.cs (3)
128Debug.Assert(!channel.IsOutOfBandChannel); 129Debug.Assert(!targetResource.GetHandle(channel).IsNull); 222Debug.Assert(_duceResource.IsOnChannel(channel));
Core\CSharp\System\Windows\Media\Effects\PixelShader.cs (3)
103Debug.Assert(newUri.IsAbsoluteUri); 176Debug.Assert(len == lengthRead); 204Debug.Assert(!skipOnChannelCheck || _duceResource.IsOnChannel(channel));
Core\CSharp\System\Windows\Media\Effects\ShaderEffect.cs (8)
419Debug.Assert(false); 561Debug.Assert(!channel.IsOutOfBandChannel); 562Debug.Assert(!targetResource.GetHandle(channel).IsNull); 580Debug.Assert(!skipOnChannelCheck || _duceResource.IsOnChannel(channel)); 734Debug.Assert(sizeof(DUCE.ResourceHandle) == sizeof(Int32)); 740Debug.Assert(!hBrush.IsNull || ss._brush == null, "If brush isn't null, hBrush better not be"); 822Debug.Assert(_duceResource.IsOnChannel(channel)); 977Debug.Assert(false);
Core\CSharp\System\Windows\Media\EllipseGeometry.cs (2)
171Debug.Assert(worldMatrix != null); 172Debug.Assert(geometryMatrix != null);
Core\CSharp\System\Windows\Media\EventProxy.cs (2)
48Debug.Assert(((IntPtr)pEPD.m_handle) != IntPtr.Zero, "If this asserts fires: Why is it firing? It might be legal in future."); 148Debug.Assert(((IntPtr)epd.m_handle) != IntPtr.Zero, "Stream is disposed.");
Core\CSharp\System\Windows\Media\FactoryMaker.cs (2)
126Debug.Assert(s_pFactory != IntPtr.Zero); 146Debug.Assert(s_pImagingFactory != IntPtr.Zero);
Core\CSharp\System\Windows\Media\FamilyMap.cs (1)
372Debug.Assert(first <= last);
Core\CSharp\System\Windows\Media\FontFamilyConverter.cs (3)
193Debug.Assert(name != null); 198Debug.Assert(name != null); 203Debug.Assert(name != null);
Core\CSharp\System\Windows\Media\FormattedText.cs (6)
1038Debug.Assert(_nextLine == null); 1058Debug.Assert(_totalHeight + _currentLine.Height <= _that._maxTextHeight); 1147Debug.Assert(_that._text.Length > 0 && textSourcePosition + line.Length <= _that._text.Length + 1); 1163Debug.Assert(_that._trimming == TextTrimming.WordEllipsis); 1770Debug.Assert(_defaultParaProps.Indent == 0.0, "FormattedText was assumed to always have 0 indent. This assumption has changed and thus the calculation of Width and Overhangs should be revised."); 1771Debug.Assert(_defaultParaProps.TextMarkerProperties == null, "FormattedText was assumed to always have no TextMarkerProperties. This assumption has changed and thus the calculation of Width and Overhangs should be revised.");
Core\CSharp\System\Windows\Media\Generated\BitmapCache.cs (2)
200Debug.Assert(!skipOnChannelCheck || _duceResource.IsOnChannel(channel)); 249Debug.Assert(_duceResource.IsOnChannel(channel));
Core\CSharp\System\Windows\Media\Generated\BitmapCacheBrush.cs (10)
135Debug.Assert(!channel.IsOutOfBandChannel); 136Debug.Assert(!targetResource.GetHandle(channel).IsNull); 172Debug.Assert(element != null); 175Debug.Assert(target._DispatcherLayoutResult != null); 176Debug.Assert(target._DispatcherLayoutResult.Status == System.Windows.Threading.DispatcherOperationStatus.Pending); 178Debug.Assert(abortStatus); 196Debug.Assert(!channel.IsOutOfBandChannel); 197Debug.Assert(!targetResource.GetHandle(channel).IsNull); 337Debug.Assert(!skipOnChannelCheck || _duceResource.IsOnChannel(channel)); 428Debug.Assert(_duceResource.IsOnChannel(channel));
Core\CSharp\System\Windows\Media\Generated\Brush.cs (6)
136Debug.Assert(!channel.IsOutOfBandChannel); 137Debug.Assert(!targetResource.GetHandle(channel).IsNull); 184Debug.Assert(!channel.IsOutOfBandChannel); 185Debug.Assert(!targetResource.GetHandle(channel).IsNull); 461Debug.Assert(s_Transform == null || s_Transform.IsFrozen, 465Debug.Assert(s_RelativeTransform == null || s_RelativeTransform.IsFrozen,
Core\CSharp\System\Windows\Media\Generated\CombinedGeometry.cs (8)
135Debug.Assert(!channel.IsOutOfBandChannel); 136Debug.Assert(!targetResource.GetHandle(channel).IsNull); 183Debug.Assert(!channel.IsOutOfBandChannel); 184Debug.Assert(!targetResource.GetHandle(channel).IsNull); 282Debug.Assert(!skipOnChannelCheck || _duceResource.IsOnChannel(channel)); 350Debug.Assert(_duceResource.IsOnChannel(channel)); 472Debug.Assert(s_Geometry1 == null || s_Geometry1.IsFrozen, 476Debug.Assert(s_Geometry2 == null || s_Geometry2.IsFrozen,
Core\CSharp\System\Windows\Media\Generated\DashStyle.cs (3)
182Debug.Assert(!skipOnChannelCheck || _duceResource.IsOnChannel(channel)); 252Debug.Assert(_duceResource.IsOnChannel(channel)); 367Debug.Assert(s_Dashes == null || s_Dashes.IsFrozen,
Core\CSharp\System\Windows\Media\Generated\DoubleCollection.cs (2)
808Debug.Assert(list != null, "list may not be null."); 907Debug.Assert(_index == -2, "expected -2, got " + _index + "\n");
Core\CSharp\System\Windows\Media\Generated\DrawingBrush.cs (4)
128Debug.Assert(!channel.IsOutOfBandChannel); 129Debug.Assert(!targetResource.GetHandle(channel).IsNull); 197Debug.Assert(!skipOnChannelCheck || _duceResource.IsOnChannel(channel)); 303Debug.Assert(_duceResource.IsOnChannel(channel));
Core\CSharp\System\Windows\Media\Generated\DrawingCollection.cs (2)
824Debug.Assert(list != null, "list may not be null."); 923Debug.Assert(_index == -2, "expected -2, got " + _index + "\n");
Core\CSharp\System\Windows\Media\Generated\DrawingContextWalker.cs (24)
54Debug.Assert(false); 74Debug.Assert(false); 96Debug.Assert(false); 120Debug.Assert(false); 152Debug.Assert(false); 190Debug.Assert(false); 224Debug.Assert(false); 264Debug.Assert(false); 286Debug.Assert(false); 304Debug.Assert(false); 324Debug.Assert(false); 339Debug.Assert(false); 369Debug.Assert(false); 387Debug.Assert(false); 399Debug.Assert(false); 411Debug.Assert(false); 425Debug.Assert(false); 441Debug.Assert(false); 453Debug.Assert(false); 465Debug.Assert(false); 476Debug.Assert(false); 493Debug.Assert(false); 508Debug.Assert(false); 517Debug.Assert(false);
Core\CSharp\System\Windows\Media\Generated\DrawingGroup.cs (19)
148Debug.Assert(!channel.IsOutOfBandChannel); 149Debug.Assert(!targetResource.GetHandle(channel).IsNull); 161Debug.Assert(resource != null); 172Debug.Assert(resource != null); 219Debug.Assert(!channel.IsOutOfBandChannel); 220Debug.Assert(!targetResource.GetHandle(channel).IsNull); 274Debug.Assert(!channel.IsOutOfBandChannel); 275Debug.Assert(!targetResource.GetHandle(channel).IsNull); 322Debug.Assert(!channel.IsOutOfBandChannel); 323Debug.Assert(!targetResource.GetHandle(channel).IsNull); 370Debug.Assert(!channel.IsOutOfBandChannel); 371Debug.Assert(!targetResource.GetHandle(channel).IsNull); 587Debug.Assert(!skipOnChannelCheck || _duceResource.IsOnChannel(channel)); 699Debug.Assert(_duceResource.IsOnChannel(channel)); 755Debug.Assert(!channel.IsOutOfBandChannel); 756Debug.Assert(!thisResource.GetHandle(channel).IsNull); 783Debug.Assert(!channel.IsOutOfBandChannel); 784Debug.Assert(!thisResource.GetHandle(channel).IsNull); 895Debug.Assert(s_Children == null || s_Children.IsFrozen,
Core\CSharp\System\Windows\Media\Generated\DrawingImage.cs (4)
128Debug.Assert(!channel.IsOutOfBandChannel); 129Debug.Assert(!targetResource.GetHandle(channel).IsNull); 197Debug.Assert(!skipOnChannelCheck || _duceResource.IsOnChannel(channel)); 244Debug.Assert(_duceResource.IsOnChannel(channel));
Core\CSharp\System\Windows\Media\Generated\EllipseGeometry.cs (2)
200Debug.Assert(!skipOnChannelCheck || _duceResource.IsOnChannel(channel)); 277Debug.Assert(_duceResource.IsOnChannel(channel));
Core\CSharp\System\Windows\Media\Generated\GeneralTransformCollection.cs (3)
117Debug.Assert(_collection.Count == 0); 789Debug.Assert(list != null, "list may not be null."); 888Debug.Assert(_index == -2, "expected -2, got " + _index + "\n");
Core\CSharp\System\Windows\Media\Generated\GeneralTransformGroup.cs (1)
213Debug.Assert(s_Children == null || s_Children.IsFrozen,
Core\CSharp\System\Windows\Media\Generated\Geometry.cs (3)
131Debug.Assert(!channel.IsOutOfBandChannel); 132Debug.Assert(!targetResource.GetHandle(channel).IsNull); 378Debug.Assert(s_Transform == null || s_Transform.IsFrozen,
Core\CSharp\System\Windows\Media\Generated\GeometryCollection.cs (2)
824Debug.Assert(list != null, "list may not be null."); 923Debug.Assert(_index == -2, "expected -2, got " + _index + "\n");
Core\CSharp\System\Windows\Media\Generated\GeometryDrawing.cs (8)
128Debug.Assert(!channel.IsOutOfBandChannel); 129Debug.Assert(!targetResource.GetHandle(channel).IsNull); 176Debug.Assert(!channel.IsOutOfBandChannel); 177Debug.Assert(!targetResource.GetHandle(channel).IsNull); 224Debug.Assert(!channel.IsOutOfBandChannel); 225Debug.Assert(!targetResource.GetHandle(channel).IsNull); 323Debug.Assert(!skipOnChannelCheck || _duceResource.IsOnChannel(channel)); 380Debug.Assert(_duceResource.IsOnChannel(channel));
Core\CSharp\System\Windows\Media\Generated\GeometryGroup.cs (11)
155Debug.Assert(!channel.IsOutOfBandChannel); 156Debug.Assert(!targetResource.GetHandle(channel).IsNull); 168Debug.Assert(resource != null); 179Debug.Assert(resource != null); 262Debug.Assert(!skipOnChannelCheck || _duceResource.IsOnChannel(channel)); 349Debug.Assert(_duceResource.IsOnChannel(channel)); 399Debug.Assert(!channel.IsOutOfBandChannel); 400Debug.Assert(!thisResource.GetHandle(channel).IsNull); 427Debug.Assert(!channel.IsOutOfBandChannel); 428Debug.Assert(!thisResource.GetHandle(channel).IsNull); 525Debug.Assert(s_Children == null || s_Children.IsFrozen,
Core\CSharp\System\Windows\Media\Generated\GlyphRunDrawing.cs (6)
109Debug.Assert(!channel.IsOutOfBandChannel); 110Debug.Assert(!targetResource.GetHandle(channel).IsNull); 157Debug.Assert(!channel.IsOutOfBandChannel); 158Debug.Assert(!targetResource.GetHandle(channel).IsNull); 241Debug.Assert(!skipOnChannelCheck || _duceResource.IsOnChannel(channel)); 293Debug.Assert(_duceResource.IsOnChannel(channel));
Core\CSharp\System\Windows\Media\Generated\GradientBrush.cs (1)
310Debug.Assert(s_GradientStops == null || s_GradientStops.IsFrozen,
Core\CSharp\System\Windows\Media\Generated\GradientStopCollection.cs (3)
117Debug.Assert(_collection.Count == 0); 893Debug.Assert(list != null, "list may not be null."); 992Debug.Assert(_index == -2, "expected -2, got " + _index + "\n");
Core\CSharp\System\Windows\Media\Generated\GuidelineSet.cs (4)
208Debug.Assert(!skipOnChannelCheck || _duceResource.IsOnChannel(channel)); 285Debug.Assert(_duceResource.IsOnChannel(channel)); 392Debug.Assert(s_GuidelinesX == null || s_GuidelinesX.IsFrozen, 396Debug.Assert(s_GuidelinesY == null || s_GuidelinesY.IsFrozen,
Core\CSharp\System\Windows\Media\Generated\ImageBrush.cs (4)
128Debug.Assert(!channel.IsOutOfBandChannel); 129Debug.Assert(!targetResource.GetHandle(channel).IsNull); 197Debug.Assert(!skipOnChannelCheck || _duceResource.IsOnChannel(channel)); 303Debug.Assert(_duceResource.IsOnChannel(channel));
Core\CSharp\System\Windows\Media\Generated\ImageDrawing.cs (4)
128Debug.Assert(!channel.IsOutOfBandChannel); 129Debug.Assert(!targetResource.GetHandle(channel).IsNull); 219Debug.Assert(!skipOnChannelCheck || _duceResource.IsOnChannel(channel)); 274Debug.Assert(_duceResource.IsOnChannel(channel));
Core\CSharp\System\Windows\Media\Generated\Int32Collection.cs (2)
808Debug.Assert(list != null, "list may not be null."); 907Debug.Assert(_index == -2, "expected -2, got " + _index + "\n");
Core\CSharp\System\Windows\Media\Generated\LinearGradientBrush.cs (1)
202Debug.Assert(_duceResource.IsOnChannel(channel));
Core\CSharp\System\Windows\Media\Generated\LineGeometry.cs (2)
178Debug.Assert(!skipOnChannelCheck || _duceResource.IsOnChannel(channel)); 249Debug.Assert(_duceResource.IsOnChannel(channel));
Core\CSharp\System\Windows\Media\Generated\MatrixTransform.cs (2)
156Debug.Assert(!skipOnChannelCheck || _duceResource.IsOnChannel(channel)); 203Debug.Assert(_duceResource.IsOnChannel(channel));
Core\CSharp\System\Windows\Media\Generated\PathFigure.cs (1)
288Debug.Assert(s_Segments == null || s_Segments.IsFrozen,
Core\CSharp\System\Windows\Media\Generated\PathFigureCollection.cs (3)
118Debug.Assert(_collection.Count == 0); 880Debug.Assert(list != null, "list may not be null."); 979Debug.Assert(_index == -2, "expected -2, got " + _index + "\n");
Core\CSharp\System\Windows\Media\Generated\PathGeometry.cs (2)
206Debug.Assert(_duceResource.IsOnChannel(channel)); 317Debug.Assert(s_Figures == null || s_Figures.IsFrozen,
Core\CSharp\System\Windows\Media\Generated\PathSegmentCollection.cs (3)
117Debug.Assert(_collection.Count == 0); 789Debug.Assert(list != null, "list may not be null."); 888Debug.Assert(_index == -2, "expected -2, got " + _index + "\n");
Core\CSharp\System\Windows\Media\Generated\Pen.cs (7)
128Debug.Assert(!channel.IsOutOfBandChannel); 129Debug.Assert(!targetResource.GetHandle(channel).IsNull); 218Debug.Assert(!channel.IsOutOfBandChannel); 219Debug.Assert(!targetResource.GetHandle(channel).IsNull); 392Debug.Assert(!skipOnChannelCheck || _duceResource.IsOnChannel(channel)); 459Debug.Assert(_duceResource.IsOnChannel(channel)); 593Debug.Assert(s_DashStyle == null || s_DashStyle.IsFrozen,
Core\CSharp\System\Windows\Media\Generated\PointCollection.cs (2)
810Debug.Assert(list != null, "list may not be null."); 909Debug.Assert(_index == -2, "expected -2, got " + _index + "\n");
Core\CSharp\System\Windows\Media\Generated\PolyBezierSegment.cs (1)
226Debug.Assert(s_Points == null || s_Points.IsFrozen,
Core\CSharp\System\Windows\Media\Generated\PolyLineSegment.cs (1)
226Debug.Assert(s_Points == null || s_Points.IsFrozen,
Core\CSharp\System\Windows\Media\Generated\PolyQuadraticBezierSegment.cs (1)
226Debug.Assert(s_Points == null || s_Points.IsFrozen,
Core\CSharp\System\Windows\Media\Generated\RadialGradientBrush.cs (1)
246Debug.Assert(_duceResource.IsOnChannel(channel));
Core\CSharp\System\Windows\Media\Generated\RectangleGeometry.cs (2)
200Debug.Assert(!skipOnChannelCheck || _duceResource.IsOnChannel(channel)); 277Debug.Assert(_duceResource.IsOnChannel(channel));
Core\CSharp\System\Windows\Media\Generated\RenderData.cs (14)
534Debug.Assert(_duceResource.IsOnChannel(channel)); 546Debug.Assert(cbExtraData <= (uint)Int32.MaxValue); 558Debug.Assert((_curOffset > 0) || (_dependentResources.Count == 0)); 562Debug.Assert((_buffer != null) || (_curOffset == 0)); 565Debug.Assert((_buffer == null) || (_curOffset <= _buffer.Length)); 1107Debug.Assert(false); 1133Debug.Assert((_curOffset > 0) || (_dependentResources.Count == 0)); 1137Debug.Assert((_buffer != null) || (_curOffset == 0)); 1140Debug.Assert((_buffer == null) || (_curOffset <= _buffer.Length)); 1453Debug.Assert(false); 1479Debug.Assert((_curOffset > 0) || (_dependentResources.Count == 0)); 1483Debug.Assert((_buffer != null) || (_curOffset == 0)); 1486Debug.Assert((_buffer == null) || (_curOffset <= _buffer.Length)); 1811Debug.Assert(false);
Core\CSharp\System\Windows\Media\Generated\RenderDataDrawingContext.cs (25)
84Debug.Assert(sizeof(MILCMD_DRAW_LINE) == 40); 150Debug.Assert(sizeof(MILCMD_DRAW_LINE_ANIMATE) == 48); 210Debug.Assert(sizeof(MILCMD_DRAW_RECTANGLE) == 40); 277Debug.Assert(sizeof(MILCMD_DRAW_RECTANGLE_ANIMATE) == 48); 349Debug.Assert(sizeof(MILCMD_DRAW_ROUNDED_RECTANGLE) == 56); 438Debug.Assert(sizeof(MILCMD_DRAW_ROUNDED_RECTANGLE_ANIMATE) == 72); 512Debug.Assert(sizeof(MILCMD_DRAW_ELLIPSE) == 40); 603Debug.Assert(sizeof(MILCMD_DRAW_ELLIPSE_ANIMATE) == 56); 663Debug.Assert(sizeof(MILCMD_DRAW_GEOMETRY) == 16); 719Debug.Assert(sizeof(MILCMD_DRAW_IMAGE) == 40); 781Debug.Assert(sizeof(MILCMD_DRAW_IMAGE_ANIMATE) == 40); 833Debug.Assert(sizeof(MILCMD_DRAW_GLYPH_RUN) == 8); 881Debug.Assert(sizeof(MILCMD_DRAW_DRAWING) == 8); 935Debug.Assert(sizeof(MILCMD_DRAW_VIDEO) == 40); 995Debug.Assert(sizeof(MILCMD_DRAW_VIDEO_ANIMATE) == 40); 1039Debug.Assert(sizeof(MILCMD_PUSH_CLIP) == 8); 1084Debug.Assert(sizeof(MILCMD_PUSH_OPACITY_MASK) == 24); 1131Debug.Assert(sizeof(MILCMD_PUSH_OPACITY) == 8); 1184Debug.Assert(sizeof(MILCMD_PUSH_OPACITY_ANIMATE) == 16); 1228Debug.Assert(sizeof(MILCMD_PUSH_TRANSFORM) == 8); 1314Debug.Assert(sizeof(MILCMD_PUSH_GUIDELINE_SET) == 8); 1358Debug.Assert(sizeof(MILCMD_PUSH_GUIDELINE_Y1) == 8); 1409Debug.Assert(sizeof(MILCMD_PUSH_GUIDELINE_Y2) == 16); 1458Debug.Assert(sizeof(MILCMD_PUSH_EFFECT) == 8); 1507Debug.Assert(sizeof(MILCMD_POP) == 1);
Core\CSharp\System\Windows\Media\Generated\RotateTransform.cs (2)
200Debug.Assert(!skipOnChannelCheck || _duceResource.IsOnChannel(channel)); 259Debug.Assert(_duceResource.IsOnChannel(channel));
Core\CSharp\System\Windows\Media\Generated\ScaleTransform.cs (2)
222Debug.Assert(!skipOnChannelCheck || _duceResource.IsOnChannel(channel)); 287Debug.Assert(_duceResource.IsOnChannel(channel));
Core\CSharp\System\Windows\Media\Generated\SkewTransform.cs (2)
222Debug.Assert(!skipOnChannelCheck || _duceResource.IsOnChannel(channel)); 287Debug.Assert(_duceResource.IsOnChannel(channel));
Core\CSharp\System\Windows\Media\Generated\SolidColorBrush.cs (2)
156Debug.Assert(!skipOnChannelCheck || _duceResource.IsOnChannel(channel)); 242Debug.Assert(_duceResource.IsOnChannel(channel));
Core\CSharp\System\Windows\Media\Generated\TextEffectCollection.cs (3)
117Debug.Assert(_collection.Count == 0); 789Debug.Assert(list != null, "list may not be null."); 888Debug.Assert(_index == -2, "expected -2, got " + _index + "\n");
Core\CSharp\System\Windows\Media\Generated\TransformCollection.cs (2)
824Debug.Assert(list != null, "list may not be null."); 923Debug.Assert(_index == -2, "expected -2, got " + _index + "\n");
Core\CSharp\System\Windows\Media\Generated\TransformGroup.cs (11)
148Debug.Assert(!channel.IsOutOfBandChannel); 149Debug.Assert(!targetResource.GetHandle(channel).IsNull); 161Debug.Assert(resource != null); 172Debug.Assert(resource != null); 240Debug.Assert(!skipOnChannelCheck || _duceResource.IsOnChannel(channel)); 310Debug.Assert(_duceResource.IsOnChannel(channel)); 359Debug.Assert(!channel.IsOutOfBandChannel); 360Debug.Assert(!thisResource.GetHandle(channel).IsNull); 387Debug.Assert(!channel.IsOutOfBandChannel); 388Debug.Assert(!thisResource.GetHandle(channel).IsNull); 480Debug.Assert(s_Children == null || s_Children.IsFrozen,
Core\CSharp\System\Windows\Media\Generated\TranslateTransform.cs (2)
178Debug.Assert(!skipOnChannelCheck || _duceResource.IsOnChannel(channel)); 231Debug.Assert(_duceResource.IsOnChannel(channel));
Core\CSharp\System\Windows\Media\Generated\VectorCollection.cs (2)
810Debug.Assert(list != null, "list may not be null."); 909Debug.Assert(_index == -2, "expected -2, got " + _index + "\n");
Core\CSharp\System\Windows\Media\Generated\VideoDrawing.cs (4)
109Debug.Assert(!channel.IsOutOfBandChannel); 110Debug.Assert(!targetResource.GetHandle(channel).IsNull); 200Debug.Assert(!skipOnChannelCheck || _duceResource.IsOnChannel(channel)); 255Debug.Assert(_duceResource.IsOnChannel(channel));
Core\CSharp\System\Windows\Media\Generated\VisualBrush.cs (8)
110Debug.Assert(element != null); 113Debug.Assert(target._DispatcherLayoutResult != null); 114Debug.Assert(target._DispatcherLayoutResult.Status == System.Windows.Threading.DispatcherOperationStatus.Pending); 116Debug.Assert(abortStatus); 134Debug.Assert(!channel.IsOutOfBandChannel); 135Debug.Assert(!targetResource.GetHandle(channel).IsNull); 227Debug.Assert(!skipOnChannelCheck || _duceResource.IsOnChannel(channel)); 334Debug.Assert(_duceResource.IsOnChannel(channel));
Core\CSharp\System\Windows\Media\Geometry.cs (5)
198Debug.Assert(pWorldMatrix != null); 309Debug.Assert(pbPathData != (byte*)0); 435Debug.Assert(pbPathData != (byte*)0); 649Debug.Assert(pbPathData != (byte*)0); 746Debug.Assert(pbPathData != (byte*)0);
Core\CSharp\System\Windows\Media\GeometryDrawing.cs (1)
61Debug.Assert(!ctx.ShouldStopWalking);
Core\CSharp\System\Windows\Media\GeometryGroup.cs (1)
70Debug.Assert(pg.CanFreeze);
Core\CSharp\System\Windows\Media\GeometryHitTestParameters.cs (1)
104Debug.Assert(_hitGeometryInternal.Transform.Value == _hitGeometryCache.Transform.Value,
Core\CSharp\System\Windows\Media\GlyphRun.cs (6)
640Debug.Assert(clusterMap[currentClusterStart] < lastGlyphInCluster); 1349Debug.Assert(!IsSideways); 1607Debug.Assert(!IsSideways); 1893Debug.Assert(_glyphTypeface != null); 2396Debug.Assert(!IsInitializing); 2407Debug.Assert(!IsInitialized);
Core\CSharp\System\Windows\Media\GlyphRunDrawing.cs (1)
57Debug.Assert(!ctx.ShouldStopWalking);
Core\CSharp\System\Windows\Media\GlyphsSerializer.cs (5)
109Debug.Assert(_clusters[characterIndex] > glyphClusterStart); 120Debug.Assert(_indices.Count > glyphClusterStart - _glyphClusterInitialOffset); 126Debug.Assert(_characters == null || _characters.Count == 0 || _indices.Count == _characters.Count); 174Debug.Assert(_glyphStringBuider.Length == 0); 309Debug.Assert(caretStopStringLength == sb.ToString().Length);
Core\CSharp\System\Windows\Media\GlyphTypeface.cs (2)
1741Debug.Assert(charBufferRange.Length > 0); 1817Debug.Assert(glyphIndices != null || glyphMetrics != null);
Core\CSharp\System\Windows\Media\GuidelineCollection.cs (2)
60Debug.Assert(!isDynamic || guidelinesX.Length % 2 == 0); 69Debug.Assert(!isDynamic || guidelinesY.Length % 2 == 0);
Core\CSharp\System\Windows\Media\HitTestWithGeometryDrawingContextWalker.cs (8)
45Debug.Assert(geometry != null); 345Debug.Assert(_modifierStack != null); 346Debug.Assert(_modifierStack.Count > 0); 356Debug.Assert((_modifierStack.Count > 0) || (_currentTransform == null)); 364Debug.Assert((_modifierStack.Count > 0) || (_currentClip == null)); 368Debug.Assert(currentModifier == null); 394Debug.Assert(_intersectionDetail != IntersectionDetail.FullyContains); 399Debug.Assert(intersectionDetail != IntersectionDetail.NotCalculated);
Core\CSharp\System\Windows\Media\HitTestWithPointDrawingContextWalker.cs (7)
348Debug.Assert(_pointStack != null); 349Debug.Assert(_pointStack.Count > 0); 385Debug.Assert(_noOpLayerDepth >= 1); 422Debug.Assert(!_currentLayerIsNoOp); 423Debug.Assert(_noOpLayerDepth == 0); 433Debug.Assert(_currentLayerIsNoOp); 434Debug.Assert(_noOpLayerDepth == 0);
Core\CSharp\System\Windows\Media\HostVisual.cs (9)
147Debug.Assert(target != null); 148Debug.Assert(target.Dispatcher.Thread == Thread.CurrentThread); 200Debug.Assert(_target != null); 201Debug.Assert(_target.Dispatcher.Thread == Thread.CurrentThread); 223Debug.Assert(!targetsHandle.IsNull); 259Debug.Assert(IsOnChannel(channel)); 272Debug.Assert(_target._contentRoot.IsOnChannel(channel)); 273Debug.Assert(_target.OutOfBandChannel == MediaContext.CurrentMediaContext.OutOfBandChannel); 275Debug.Assert(!created);
Core\CSharp\System\Windows\Media\ImageSourceConverter.cs (1)
250Debug.Assert(rawData != null, "rawData is null.");
Core\CSharp\System\Windows\Media\Imaging\BitmapCodecInfo.cs (9)
51Debug.Assert(codecInfoHandle != null); 120Debug.Assert(length >= 0); 172Debug.Assert(length >= 0); 224Debug.Assert(length >= 0); 276Debug.Assert(length >= 0); 328Debug.Assert(length >= 0); 380Debug.Assert(length >= 0); 432Debug.Assert(length >= 0); 484Debug.Assert(length >= 0);
Core\CSharp\System\Windows\Media\Imaging\BitmapDecoder.cs (4)
1036Debug.Assert(_syncObject != null); 1170Debug.Assert((uri.Scheme == Uri.UriSchemeHttp) || (uri.Scheme == Uri.UriSchemeHttps)); 1171Debug.Assert(stream.CanSeek); 1324Debug.Assert(decoder != IntPtr.Zero);
Core\CSharp\System\Windows\Media\Imaging\BitmapDownload.cs (1)
480Debug.Assert(false);
Core\CSharp\System\Windows\Media\Imaging\BitmapEncoder.cs (2)
426Debug.Assert(_supportsGlobalThumbnail); 458Debug.Assert(_supportsGlobalMetadata);
Core\CSharp\System\Windows\Media\Imaging\BitmapFrame.cs (2)
75Debug.Assert((stream == null), "Both stream and uri are non-null"); 96Debug.Assert((stream != null), "Both stream and uri are null");
Core\CSharp\System\Windows\Media\Imaging\BitmapFrameDecode.cs (7)
59Debug.Assert(decoder != null); 159Debug.Assert(decoder != null); 491Debug.Assert(_decoder != null); 765Debug.Assert(_decoder is LateBoundBitmapDecoder); 766Debug.Assert(IsDownloading == false); 771Debug.Assert(_decoder.InternalDecoder != null); 776Debug.Assert(_syncObject != null);
Core\CSharp\System\Windows\Media\Imaging\BitmapFrameEncode.cs (2)
57Debug.Assert(source != null); 186Debug.Assert(sourceBitmapFrameEncode._source != null);
Core\CSharp\System\Windows\Media\Imaging\BitmapImage.cs (5)
243Debug.Assert(_decoder != null); 386Debug.Assert(decoder.SyncObject != null); 392Debug.Assert(!_decoder.IsDownloading); 461Debug.Assert(oldWidth > 0 && oldHeight > 0); 488Debug.Assert(false);
Core\CSharp\System\Windows\Media\Imaging\BitmapMetadata.cs (4)
536Debug.Assert(blockWriter != null); 537Debug.Assert(blockWriter.MetadataBlocks != null); 1026Debug.Assert(length >= 0); 1073Debug.Assert(length >= 0);
Core\CSharp\System\Windows\Media\Imaging\BitmapMetadataEnumerator.cs (1)
200Debug.Assert(metadataHandle != null && !metadataHandle.IsInvalid);
Core\CSharp\System\Windows\Media\Imaging\BitmapPalette.cs (7)
190Debug.Assert(source != null); 193Debug.Assert(bitmapSource != null && !bitmapSource.IsInvalid); 227Debug.Assert(palette != null); 304Debug.Assert(palette != null && !palette.IsInvalid); 319Debug.Assert(_palette != null && !_palette.IsInvalid); 353Debug.Assert(_palette != null && !_palette.IsInvalid); 379Debug.Assert(cActualColors == numColors);
Core\CSharp\System\Windows\Media\Imaging\BitmapPalettes.cs (1)
297Debug.Assert(key < c_maxPalettes);
Core\CSharp\System\Windows\Media\Imaging\BitmapSizeOptions.cs (4)
224Debug.Assert(_preservesAspectRatio == true); 231Debug.Assert(_preservesAspectRatio == true); 238Debug.Assert(_preservesAspectRatio == false); 279Debug.Assert(false);
Core\CSharp\System\Windows\Media\Imaging\BitmapSource.cs (5)
604Debug.Assert(_syncObject != null); 885Debug.Assert(_isSourceCached); 1070Debug.Assert(!skipOnChannelCheck || _duceResource.IsOnChannel(channel)); 1107Debug.Assert(_duceResource.IsOnChannel(channel)); 1297Debug.Assert(destFmt == colorConvertedBitmap.Format);
Core\CSharp\System\Windows\Media\Imaging\BitmapSourceSafeMILHandle.cs (1)
121Debug.Assert(wicBitmap != IntPtr.Zero);
Core\CSharp\System\Windows\Media\Imaging\BitmapVisualManager.cs (3)
104Debug.Assert ((sizeX > 0) && (sizeY > 0)); 105Debug.Assert ((dpiX > 0) && (dpiY > 0)); 120Debug.Assert (renderTargetBitmap != null, "Render Target is null");
Core\CSharp\System\Windows\Media\Imaging\Generated\ColorConvertedBitmap.cs (1)
382Debug.Assert(s_Source == null || s_Source.IsFrozen,
Core\CSharp\System\Windows\Media\Imaging\Generated\CroppedBitmap.cs (1)
324Debug.Assert(s_Source == null || s_Source.IsFrozen,
Core\CSharp\System\Windows\Media\Imaging\Generated\FormatConvertedBitmap.cs (1)
382Debug.Assert(s_Source == null || s_Source.IsFrozen,
Core\CSharp\System\Windows\Media\Imaging\Generated\TransformedBitmap.cs (2)
343Debug.Assert(s_Source == null || s_Source.IsFrozen, 347Debug.Assert(s_Transform == null || s_Transform.IsFrozen,
Core\CSharp\System\Windows\Media\Imaging\InteropBitmapSource.cs (4)
78Debug.Assert (_unmanagedSource != null && !_unmanagedSource.IsInvalid); 115Debug.Assert (_unmanagedSource != null && !_unmanagedSource.IsInvalid); 175Debug.Assert (_unmanagedSource != null && !_unmanagedSource.IsInvalid); 469Debug.Assert(_sizeOptions.Rotation == Rotation.Rotate0);
Core\CSharp\System\Windows\Media\Imaging\LateBoundBitmapDecoder.cs (1)
352Debug.Assert(newStream.CanSeek == true);
Core\CSharp\System\Windows\Media\Imaging\RenderTargetBitmap.cs (2)
306Debug.Assert(renderTargetBitmap != null && !renderTargetBitmap.IsInvalid); 312Debug.Assert(bitmapSource != null && !bitmapSource.IsInvalid);
Core\CSharp\System\Windows\Media\Imaging\TransformedBitmap.cs (1)
164Debug.Assert(DoubleUtil.IsZero(m.M11) && DoubleUtil.IsZero(m.M22));
Core\CSharp\System\Windows\Media\Imaging\WriteableBitmap.cs (15)
254Debug.Assert(locked); 691Debug.Assert(_pBackBufferLock == null); 738Debug.Assert(!_isWaitingForCommit); 936Debug.Assert(!backwardsCompat); 942Debug.Assert(!backwardsCompat); 948Debug.Assert(!backwardsCompat); 966Debug.Assert(!backwardsCompat); 1045Debug.Assert(!backwardsCompat); 1051Debug.Assert(!backwardsCompat); 1384Debug.Assert(_duceResource.IsOnChannel(channel)); 1433Debug.Assert(!skipOnChannelCheck || _duceResource.IsOnChannel(channel)); 1502Debug.Assert(_isWaitingForCommit); // How else are we here? 1505Debug.Assert(_lockCount == 0); // How else are we here? 1506Debug.Assert(_hasDirtyRects); // How else are we here? 1516Debug.Assert(_duceResource.IsOnChannel(channel)); // How else are we here?
Core\CSharp\System\Windows\Media\LinearGradientBrush.cs (1)
144Debug.Assert(!skipOnChannelCheck || _duceResource.IsOnChannel(channel));
Core\CSharp\System\Windows\Media\LineGeometry.cs (2)
116Debug.Assert(worldMatrix != null); 117Debug.Assert(geometryMatrix != null);
Core\CSharp\System\Windows\Media\MatrixStack.cs (4)
165Debug.Assert(!IsEmpty); 177Debug.Assert(!IsEmpty); 193Debug.Assert(_size == 0); // The stack must be empty before this is called. 194Debug.Assert(_highWaterMark <= _items.Length);
Core\CSharp\System\Windows\Media\MediaContext.cs (34)
213Debug.Assert(dispatcher.Reserved0 == null); 379Debug.Assert(CheckAccess()); 647Debug.Assert(InterlockIsEnabled, 744Debug.Assert(_interlockState == InterlockState.WaitingForResponse, 821Debug.Assert(!InterlockIsWaiting, 886Debug.Assert(InterlockIsWaiting, 1122Debug.Assert(IsClockSupported, "MediaContext.CurrentTime called when QueryPerformaceCounter is not supported"); 1392Debug.Assert(_interlockState == InterlockState.Disabled, 1401Debug.Assert(Channel != null); 1422Debug.Assert(dispatcher != null, "Dispatcher required"); 1427Debug.Assert(dispatcher.Reserved0 == cm); 1450Debug.Assert(CheckAccess()); 1467Debug.Assert(CheckAccess()); 1498Debug.Assert(_timeManager != null); 1527Debug.Assert(dispatcher != null); 1528Debug.Assert(iv != null); 1540Debug.Assert(!_isDisposed); 1541Debug.Assert(iv != null); 1568Debug.Assert(dispatcher != null); 1569Debug.Assert(iv != null); 1587Debug.Assert(iv != null); 1637Debug.Assert(callback != null); 1642Debug.Assert(arg != null); 1683Debug.Assert(op != null); 1721Debug.Assert(CheckAccess()); 1851Debug.Assert(CheckAccess()); 1852Debug.Assert( 2091Debug.Assert(CheckAccess()); 2093Debug.Assert(!_isDisposed); 2094Debug.Assert(_registeredICompositionTargets != null); 2200Debug.Assert(_needToCommitChannel, "CommitChannel called with nothing on the channel"); 2204Debug.Assert(!InterlockIsWaiting, 2280Debug.Assert(InterlockIsEnabled, 2626Debug.Assert(_interlockState == InterlockState.WaitingForNextFrame
Core\CSharp\System\Windows\Media\MediaContextNotificationWindow.cs (1)
189Debug.Assert(_ownerMediaContext != null);
Core\CSharp\System\Windows\Media\MediaEventsHelper.cs (3)
103Debug.Assert((sender != null), "Sender is null"); 104Debug.Assert((sender.Dispatcher != null), "Dispatcher is null"); 270Debug.Assert((cb == size), "Invalid event packet");
Core\CSharp\System\Windows\Media\MediaPlayer.cs (1)
596Debug.Assert(_duceResource._duceResource.IsOnChannel(channel));
Core\CSharp\System\Windows\Media\MediaPlayerState.cs (2)
1069Debug.Assert(absoluteUri.IsAbsoluteUri); 1238Debug.Assert(_nativeMedia != null && !_nativeMedia.IsInvalid);
Core\CSharp\System\Windows\Media\MediaSystem.cs (2)
166Debug.Assert(s_refCount > 0); 309Debug.Assert(reference != null, "The reference object can not be null.");
Core\CSharp\System\windows\Media\MILUtilities.cs (10)
103Debug.Assert(pD3DMatrix[2] == 0.0f || Single.IsNaN(pD3DMatrix[2])); 104Debug.Assert(pD3DMatrix[3] == 0.0f || Single.IsNaN(pD3DMatrix[3])); 112Debug.Assert(pD3DMatrix[6] == 0.0f || Single.IsNaN(pD3DMatrix[6])); 113Debug.Assert(pD3DMatrix[7] == 0.0f || Single.IsNaN(pD3DMatrix[7])); 119Debug.Assert(pD3DMatrix[8] == 0.0f || Single.IsNaN(pD3DMatrix[8])); 120Debug.Assert(pD3DMatrix[9] == 0.0f || Single.IsNaN(pD3DMatrix[9])); 121Debug.Assert(pD3DMatrix[10] == 1.0f || Single.IsNaN(pD3DMatrix[10])); 122Debug.Assert(pD3DMatrix[11] == 0.0f || Single.IsNaN(pD3DMatrix[11])); 130Debug.Assert(pD3DMatrix[14] == 0.0f || Single.IsNaN(pD3DMatrix[14])); 131Debug.Assert(pD3DMatrix[15] == 1.0f || Single.IsNaN(pD3DMatrix[15]));
Core\CSharp\System\Windows\Media\PathGeometry.cs (30)
155Debug.Assert(pathData.Size >= currentOffset + sizeof(MIL_PATHGEOMETRY)); 176Debug.Assert(pathData.SerializedData.Length >= currentOffset + sizeof(MIL_PATHFIGURE)); 196Debug.Assert(pathData.SerializedData.Length >= currentOffset + sizeof(MIL_SEGMENT)); 197Debug.Assert(pathData.Size >= currentOffset + sizeof(MIL_SEGMENT)); 206Debug.Assert(pathData.SerializedData.Length >= currentOffset + sizeof(MIL_SEGMENT_LINE)); 207Debug.Assert(pathData.Size >= currentOffset + sizeof(MIL_SEGMENT_LINE)); 221Debug.Assert(pathData.SerializedData.Length >= currentOffset + sizeof(MIL_SEGMENT_BEZIER)); 222Debug.Assert(pathData.Size >= currentOffset + sizeof(MIL_SEGMENT_BEZIER)); 238Debug.Assert(pathData.SerializedData.Length >= currentOffset + sizeof(MIL_SEGMENT_QUADRATICBEZIER)); 239Debug.Assert(pathData.Size >= currentOffset + sizeof(MIL_SEGMENT_QUADRATICBEZIER)); 254Debug.Assert(pathData.SerializedData.Length >= currentOffset + sizeof(MIL_SEGMENT_ARC)); 255Debug.Assert(pathData.Size >= currentOffset + sizeof(MIL_SEGMENT_ARC)); 275Debug.Assert(pathData.SerializedData.Length >= currentOffset + sizeof(MIL_SEGMENT_POLY)); 276Debug.Assert(pathData.Size >= currentOffset + sizeof(MIL_SEGMENT_POLY)); 280Debug.Assert(pSegmentPoly->Count <= Int32.MaxValue); 287Debug.Assert(pathData.SerializedData.Length >= 291Debug.Assert(pathData.Size >= 385Debug.Assert(result != null); 407Debug.Assert(figureCollection != null); 527Debug.Assert(sameSegCount == 1); 558Debug.Assert(sameSegCount == 1); 627Debug.Assert(pbPathData != (byte*)0); 680Debug.Assert(pPathData1 != (byte*)0); 684Debug.Assert(pPathData2 != (byte*)0); 826Debug.Assert(!pathData.IsEmpty()); 845Debug.Assert(pbPathData != (byte*)0); 906Debug.Assert(pbPathData1 != (byte*)0); 910Debug.Assert(pbPathData2 != (byte*)0); 939Debug.Assert(detail != IntersectionDetail.NotCalculated); 1064Debug.Assert(!skipOnChannelCheck || _duceResource.IsOnChannel(channel));
Core\CSharp\System\Windows\Media\PathStreamGeometryContext.cs (21)
86Debug.Assert(_figures == null, "It is illegal to call SetFigureCount multiple times or after BeginFigure."); 87Debug.Assert(figureCount > 0); 95Debug.Assert(_figures != null, "It is illegal to call SetSegmentCount before BeginFigure."); 96Debug.Assert(_currentFigure != null, "It is illegal to call SetSegmentCount before BeginFigure."); 97Debug.Assert(_segments == null, "It is illegal to call SetSegmentCount multiple times per BeginFigure or after a *To method."); 98Debug.Assert(segmentCount > 0); 109Debug.Assert(_currentFigure != null); 124Debug.Assert(_currentFigure == null || _figures != null); 251Debug.Assert(_figures != null); 252Debug.Assert(_currentFigure != null); 308Debug.Assert(false); 320Debug.Assert(_currentSegmentPoints == null); 330Debug.Assert(points != null); 347Debug.Assert(_figures != null); 348Debug.Assert(_currentFigure != null); 350Debug.Assert(count != 0); 376Debug.Assert(_currentFigure != null); 380Debug.Assert(count > 0); 421Debug.Assert(count % 3 == 0); 438Debug.Assert(count % 2 == 0); 447Debug.Assert(false);
Core\CSharp\System\Windows\Media\Pen.cs (7)
94Debug.Assert((MIL_PEN_CAP)PenLineCap.Flat == MIL_PEN_CAP.MilPenCapFlat); 95Debug.Assert((MIL_PEN_CAP)PenLineCap.Square == MIL_PEN_CAP.MilPenCapSquare); 96Debug.Assert((MIL_PEN_CAP)PenLineCap.Round == MIL_PEN_CAP.MilPenCapRound); 97Debug.Assert((MIL_PEN_CAP)PenLineCap.Triangle == MIL_PEN_CAP.MilPenCapTriangle); 104Debug.Assert((MIL_PEN_JOIN)PenLineJoin.Miter == MIL_PEN_JOIN.MilPenJoinMiter); 105Debug.Assert((MIL_PEN_JOIN)PenLineJoin.Bevel == MIL_PEN_JOIN.MilPenJoinBevel); 106Debug.Assert((MIL_PEN_JOIN)PenLineJoin.Round == MIL_PEN_JOIN.MilPenJoinRound);
Core\CSharp\System\Windows\Media\PixelFormat.cs (7)
71Debug.Assert(mask != null); 180Debug.Assert(Marshal.SizeOf(typeof(Guid)) == 16); 543Debug.Assert(pixelFormatInfo != IntPtr.Zero); 556Debug.Assert(channelCount >= 1); 567Debug.Assert(cbBytes > 0); 576Debug.Assert(cbBytes == channelMask.Length); 653Debug.Assert(pixelFormatInfo != IntPtr.Zero);
Core\CSharp\System\Windows\Media\RadialGradientBrush.cs (1)
87Debug.Assert(!skipOnChannelCheck || _duceResource.IsOnChannel(channel));
Core\CSharp\System\Windows\Media\RectangleGeometry.cs (2)
199Debug.Assert(worldMatrix != null); 200Debug.Assert(geometryMatrix != null);
Core\CSharp\System\Windows\Media\RenderCapability.cs (3)
39Debug.Assert(mediaContext != null); 166Debug.Assert(mediaContext != null); 177Debug.Assert(mediaContext != null);
Core\CSharp\System\Windows\Media\RenderContext.cs (1)
92Debug.Assert(channel != null);
Core\CSharp\System\Windows\Media\RenderData.cs (17)
92Debug.Assert(cbRecordSize >= 0); 95Debug.Assert((_curOffset % 8) == 0); 96Debug.Assert((cbRecordSize % 8) == 0); 97Debug.Assert((sizeof(RecordHeader) % 8) == 0); 115Debug.Assert((_buffer != null) && (_buffer.Length >= newOffset)); 118Debug.Assert(_buffer.Length > 0); 143Debug.Assert(ctx != null); 245Debug.Assert(!this.IsFrozen); 285Debug.Assert(_dependentResources[i] as Freezable == null); 378Debug.Assert(_duceResource.IsOnChannel(channel)); 408Debug.Assert(_duceResource.IsOnChannel(channel)); 460Debug.Assert(_duceResource.IsOnChannel(channel)); 475Debug.Assert(cbRequiredSize >= 0); 485Debug.Assert(_buffer.Length < cbRequiredSize); 495Debug.Assert(newSize >= cbRequiredSize); 512Debug.Assert(index <= (uint)Int32.MaxValue); 519Debug.Assert(_dependentResources.Count >= index);
Core\CSharp\System\Windows\Media\StreamAsIStream.cs (2)
91Debug.Assert(((IntPtr)pSD.m_handle) != IntPtr.Zero, "If this asserts fires: why is it firing. It might be legal in future."); 626Debug.Assert(((IntPtr)sd.m_handle) != IntPtr.Zero, "Stream is disposed.");
Core\CSharp\System\Windows\Media\StreamGeometry.cs (5)
124Debug.Assert((_data != null) && (_data.Length >= sizeof(MIL_PATHGEOMETRY))); 153Debug.Assert((_data != null) && (_data.Length >= sizeof(MIL_PATHGEOMETRY))); 178Debug.Assert((_data != null) && (_data.Length >= sizeof(MIL_PATHGEOMETRY))); 439Debug.Assert(!skipOnChannelCheck || _duceResource.IsOnChannel(channel)); 509Debug.Assert(_duceResource.IsOnChannel(channel));
Core\CSharp\System\Windows\Media\TextFormatting\TextCharacters.cs (3)
219Debug.Assert(characterBufferReference.CharacterBuffer == _characterBufferReference.CharacterBuffer); 220Debug.Assert(offsetToFirstChar >= 0 && offsetToFirstChar < _length); 310Debug.Assert(shapeables != null);
Core\CSharp\System\Windows\Media\Typeface.cs (1)
528Debug.Assert(i > 0);
Core\CSharp\System\Windows\Media\UniqueEventHelper.cs (4)
82Debug.Assert((sender != null), "Sender is null"); 89Debug.Assert((handler != null), "Event handler is null"); 193Debug.Assert((sender != null), "Sender is null"); 200Debug.Assert((handler != null), "Event handler is null");
Core\CSharp\System\Windows\Media\VideoDrawing.cs (1)
46Debug.Assert(!ctx.ShouldStopWalking);
Core\CSharp\System\Windows\Media\Visual.cs (29)
178Debug.Assert(false, "TYPE_VISUAL or TYPE_VIEWPORT3DVISUAL expected."); 584Debug.Assert(BitmapEffectStateField.GetValue(this) != null); 662Debug.Assert(IsOnChannel(channel)); 663Debug.Assert(!CheckFlagsAnd(channel, VisualProxyFlags.IsContentNodeConnected)); 867Debug.Assert(channelsToCyclicBrushMap[channel] > 0); 893Debug.Assert(cyclicBrushToChannelsMap[cyclicBrush] > 0); 918Debug.Assert(cyclicBrushToChannelsMap != null); 919Debug.Assert(cyclicBrushToChannelsMap.ContainsKey(cyclicBrush)); 920Debug.Assert(cyclicBrushToChannelsMap[cyclicBrush] > 0); 941Debug.Assert(channelsToCyclicBrushMap != null); 942Debug.Assert(channelsToCyclicBrushMap.ContainsKey(channel)); 943Debug.Assert(channelsToCyclicBrushMap[channel] > 0); 1319Debug.Assert(CheckFlagsAnd(VisualFlags.ReentrancyFlag)); // Exit must be matched with Enter. See Enter comments. 1981Debug.Assert(Point.Equals(pointParams.HitPoint, backupHitPoint), 2107Debug.Assert(BitmapEffectStateField.GetValue(this) != null); 2238Debug.Assert(bitmapEffectState != null); 2277Debug.Assert(intersectionDetail != IntersectionDetail.NotCalculated); 2335Debug.Assert(intersectionDetail != IntersectionDetail.NotCalculated); 2399Debug.Assert(resultCallback != null); 2466Debug.Assert(intersectionDetail != IntersectionDetail.NotCalculated); 3081Debug.Assert(bed != null, "Must be non-null because otherwise the code would have earlied out where new value is compared against old value."); 3243Debug.Assert(currentBitmapEffect.IsFrozen == emulatingEffect.IsFrozen); 3313Debug.Assert(bitmapEffectState != null); 3327Debug.Assert(EffectField.GetValue(this) == null, "Not expecting both BitmapEffect and Effect to be set on the same node"); 4002Debug.Assert(_parent != null, "If oldParent is null, current parent should != null."); 4530Debug.Assert(ancestor != null); 4647Debug.Assert((group == null) || (group.Children.Count > 0)); 4725Debug.Assert(ancestor != null); 5288Debug.Assert(cyclicBrushToChannelsMap != null, "Visual brush roots need to have the visual brush to channels map!");
Core\CSharp\System\Windows\Media\VisualBrush.cs (10)
197Debug.Assert(!_pendingLayout); 240Debug.Assert(element != null); 262Debug.Assert(_pendingLayout); 266Debug.Assert(element != null); 277Debug.Assert(_DispatcherLayoutResult != null); 278Debug.Assert(_DispatcherLayoutResult.Status == DispatcherOperationStatus.Pending); 280Debug.Assert(abortStatus); 292Debug.Assert(_pendingLayout); 295Debug.Assert(element != null); 333Debug.Assert(_reentrancyFlag); // Exit must be matched with Enter. See Enter comments.
Core\CSharp\System\Windows\Media\VisualCollection.cs (19)
96Debug.Assert(_owner != null); 102Debug.Assert(_owner != null); 108Debug.Assert(_owner != null); 115Debug.Assert(_owner != null); 292Debug.Assert(_items != null); 299Debug.Assert(value == 0, "There shouldn't be a case where value != 0."); 300Debug.Assert(_size == 0, "Size must be 0 here."); 420Debug.Assert(value != null); 421Debug.Assert(_items[index] == null); 422Debug.Assert(value._parent == null); 423Debug.Assert(!value.IsRootElement); 438Debug.Assert(_items[index] != null); 494Debug.Assert(_items[addedPosition] == null); 573Debug.Assert(visual._parent != null); 688Debug.Assert(_items[i]._parent == _owner); 869Debug.Assert(visual._parent != null); 870Debug.Assert(destination == null || destination._parent == visual._parent); 871Debug.Assert(newIndex >= 0 && newIndex <= _size, "New index is invalid"); 1027Debug.Assert(_index == -2);
Core\CSharp\System\Windows\Media\VisualProxy.cs (7)
161Debug.Assert(count == 0); 183Debug.Assert(count == 1); 299Debug.Assert(index != PROXY_NOT_FOUND); 354Debug.Assert(index >= 0 && index < Count); 397Debug.Assert(index >= 0 && index < Count); 476Debug.Assert(index >= 0 && index < Count); 577Debug.Assert(delta % 2 == 0 && newLength >= 2);
Core\CSharp\System\Windows\Media\VisualTarget.cs (5)
58Debug.Assert(!_connected); 83Debug.Assert(channel != null); 84Debug.Assert(outOfBandChannel != null); 106Debug.Assert(!resourceCreated); 201Debug.Assert(_connected);
Core\CSharp\System\Windows\Media\VisualTreeHelper.cs (1)
175Debug.Assert(reference == null);
Core\CSharp\System\Windows\Media3D\GeneralTransform2DTo3D.cs (1)
37Debug.Assert(child != null, "Going from 2D to 3D containingVisual3D.Visual should not be null");
Core\CSharp\System\Windows\Media3D\Generated\AmbientLight.cs (2)
133Debug.Assert(!skipOnChannelCheck || _duceResource.IsOnChannel(channel)); 198Debug.Assert(_duceResource.IsOnChannel(channel));
Core\CSharp\System\Windows\Media3D\Generated\AxisAngleRotation3D.cs (2)
178Debug.Assert(!skipOnChannelCheck || _duceResource.IsOnChannel(channel)); 231Debug.Assert(_duceResource.IsOnChannel(channel));
Core\CSharp\System\Windows\Media3D\Generated\Camera.cs (3)
124Debug.Assert(!channel.IsOutOfBandChannel); 125Debug.Assert(!targetResource.GetHandle(channel).IsNull); 361Debug.Assert(s_Transform == null || s_Transform.IsFrozen,
Core\CSharp\System\Windows\Media3D\Generated\DiffuseMaterial.cs (5)
138Debug.Assert(!channel.IsOutOfBandChannel); 139Debug.Assert(!targetResource.GetHandle(channel).IsNull); 237Debug.Assert(!skipOnChannelCheck || _duceResource.IsOnChannel(channel)); 286Debug.Assert(_duceResource.IsOnChannel(channel)); 402Debug.Assert(s_Brush == null || s_Brush.IsFrozen,
Core\CSharp\System\Windows\Media3D\Generated\DirectionalLight.cs (2)
152Debug.Assert(!skipOnChannelCheck || _duceResource.IsOnChannel(channel)); 223Debug.Assert(_duceResource.IsOnChannel(channel));
Core\CSharp\System\Windows\Media3D\Generated\EmissiveMaterial.cs (5)
131Debug.Assert(!channel.IsOutOfBandChannel); 132Debug.Assert(!targetResource.GetHandle(channel).IsNull); 215Debug.Assert(!skipOnChannelCheck || _duceResource.IsOnChannel(channel)); 263Debug.Assert(_duceResource.IsOnChannel(channel)); 374Debug.Assert(s_Brush == null || s_Brush.IsFrozen,
Core\CSharp\System\Windows\Media3D\Generated\GeneralTransform3DCollection.cs (3)
113Debug.Assert(_collection.Count == 0); 785Debug.Assert(list != null, "list may not be null."); 884Debug.Assert(_index == -2, "expected -2, got " + _index + "\n");
Core\CSharp\System\Windows\Media3D\Generated\GeneralTransform3DGroup.cs (1)
209Debug.Assert(s_Children == null || s_Children.IsFrozen,
Core\CSharp\System\Windows\Media3D\Generated\GeometryModel3D.cs (8)
124Debug.Assert(!channel.IsOutOfBandChannel); 125Debug.Assert(!targetResource.GetHandle(channel).IsNull); 174Debug.Assert(!channel.IsOutOfBandChannel); 175Debug.Assert(!targetResource.GetHandle(channel).IsNull); 224Debug.Assert(!channel.IsOutOfBandChannel); 225Debug.Assert(!targetResource.GetHandle(channel).IsNull); 323Debug.Assert(!skipOnChannelCheck || _duceResource.IsOnChannel(channel)); 395Debug.Assert(_duceResource.IsOnChannel(channel));
Core\CSharp\System\Windows\Media3D\Generated\MaterialCollection.cs (2)
820Debug.Assert(list != null, "list may not be null."); 919Debug.Assert(_index == -2, "expected -2, got " + _index + "\n");
Core\CSharp\System\Windows\Media3D\Generated\MaterialGroup.cs (11)
144Debug.Assert(!channel.IsOutOfBandChannel); 145Debug.Assert(!targetResource.GetHandle(channel).IsNull); 157Debug.Assert(resource != null); 168Debug.Assert(resource != null); 236Debug.Assert(!skipOnChannelCheck || _duceResource.IsOnChannel(channel)); 306Debug.Assert(_duceResource.IsOnChannel(channel)); 355Debug.Assert(!channel.IsOutOfBandChannel); 356Debug.Assert(!thisResource.GetHandle(channel).IsNull); 383Debug.Assert(!channel.IsOutOfBandChannel); 384Debug.Assert(!thisResource.GetHandle(channel).IsNull); 476Debug.Assert(s_Children == null || s_Children.IsFrozen,
Core\CSharp\System\Windows\Media3D\Generated\MatrixCamera.cs (2)
174Debug.Assert(!skipOnChannelCheck || _duceResource.IsOnChannel(channel)); 233Debug.Assert(_duceResource.IsOnChannel(channel));
Core\CSharp\System\Windows\Media3D\Generated\MatrixTransform3D.cs (2)
152Debug.Assert(!skipOnChannelCheck || _duceResource.IsOnChannel(channel)); 192Debug.Assert(_duceResource.IsOnChannel(channel));
Core\CSharp\System\Windows\Media3D\Generated\MeshGeometry3D.cs (6)
234Debug.Assert(!skipOnChannelCheck || _duceResource.IsOnChannel(channel)); 336Debug.Assert(_duceResource.IsOnChannel(channel)); 459Debug.Assert(s_Positions == null || s_Positions.IsFrozen, 463Debug.Assert(s_Normals == null || s_Normals.IsFrozen, 467Debug.Assert(s_TextureCoordinates == null || s_TextureCoordinates.IsFrozen, 471Debug.Assert(s_TriangleIndices == null || s_TriangleIndices.IsFrozen,
Core\CSharp\System\Windows\Media3D\Generated\Model3D.cs (3)
124Debug.Assert(!channel.IsOutOfBandChannel); 125Debug.Assert(!targetResource.GetHandle(channel).IsNull); 361Debug.Assert(s_Transform == null || s_Transform.IsFrozen,
Core\CSharp\System\Windows\Media3D\Generated\Model3DCollection.cs (2)
820Debug.Assert(list != null, "list may not be null."); 919Debug.Assert(_index == -2, "expected -2, got " + _index + "\n");
Core\CSharp\System\Windows\Media3D\Generated\Model3DGroup.cs (11)
144Debug.Assert(!channel.IsOutOfBandChannel); 145Debug.Assert(!targetResource.GetHandle(channel).IsNull); 157Debug.Assert(resource != null); 168Debug.Assert(resource != null); 236Debug.Assert(!skipOnChannelCheck || _duceResource.IsOnChannel(channel)); 322Debug.Assert(_duceResource.IsOnChannel(channel)); 372Debug.Assert(!channel.IsOutOfBandChannel); 373Debug.Assert(!thisResource.GetHandle(channel).IsNull); 400Debug.Assert(!channel.IsOutOfBandChannel); 401Debug.Assert(!thisResource.GetHandle(channel).IsNull); 493Debug.Assert(s_Children == null || s_Children.IsFrozen,
Core\CSharp\System\Windows\Media3D\Generated\OrthographicCamera.cs (2)
152Debug.Assert(!skipOnChannelCheck || _duceResource.IsOnChannel(channel)); 247Debug.Assert(_duceResource.IsOnChannel(channel));
Core\CSharp\System\Windows\Media3D\Generated\PerspectiveCamera.cs (2)
152Debug.Assert(!skipOnChannelCheck || _duceResource.IsOnChannel(channel)); 247Debug.Assert(_duceResource.IsOnChannel(channel));
Core\CSharp\System\Windows\Media3D\Generated\Point3DCollection.cs (2)
807Debug.Assert(list != null, "list may not be null."); 906Debug.Assert(_index == -2, "expected -2, got " + _index + "\n");
Core\CSharp\System\Windows\Media3D\Generated\PointLight.cs (2)
133Debug.Assert(!skipOnChannelCheck || _duceResource.IsOnChannel(channel)); 228Debug.Assert(_duceResource.IsOnChannel(channel));
Core\CSharp\System\Windows\Media3D\Generated\QuaternionRotation3D.cs (2)
155Debug.Assert(!skipOnChannelCheck || _duceResource.IsOnChannel(channel)); 202Debug.Assert(_duceResource.IsOnChannel(channel));
Core\CSharp\System\Windows\Media3D\Generated\RotateTransform3D.cs (5)
153Debug.Assert(!channel.IsOutOfBandChannel); 154Debug.Assert(!targetResource.GetHandle(channel).IsNull); 271Debug.Assert(!skipOnChannelCheck || _duceResource.IsOnChannel(channel)); 338Debug.Assert(_duceResource.IsOnChannel(channel)); 449Debug.Assert(s_Rotation == null || s_Rotation.IsFrozen,
Core\CSharp\System\Windows\Media3D\Generated\ScaleTransform3D.cs (2)
280Debug.Assert(!skipOnChannelCheck || _duceResource.IsOnChannel(channel)); 357Debug.Assert(_duceResource.IsOnChannel(channel));
Core\CSharp\System\Windows\Media3D\Generated\SpecularMaterial.cs (5)
131Debug.Assert(!channel.IsOutOfBandChannel); 132Debug.Assert(!targetResource.GetHandle(channel).IsNull); 237Debug.Assert(!skipOnChannelCheck || _duceResource.IsOnChannel(channel)); 286Debug.Assert(_duceResource.IsOnChannel(channel)); 402Debug.Assert(s_Brush == null || s_Brush.IsFrozen,
Core\CSharp\System\Windows\Media3D\Generated\SpotLight.cs (2)
196Debug.Assert(!skipOnChannelCheck || _duceResource.IsOnChannel(channel)); 309Debug.Assert(_duceResource.IsOnChannel(channel));
Core\CSharp\System\Windows\Media3D\Generated\Transform3DCollection.cs (2)
820Debug.Assert(list != null, "list may not be null."); 919Debug.Assert(_index == -2, "expected -2, got " + _index + "\n");
Core\CSharp\System\Windows\Media3D\Generated\Transform3DGroup.cs (11)
144Debug.Assert(!channel.IsOutOfBandChannel); 145Debug.Assert(!targetResource.GetHandle(channel).IsNull); 157Debug.Assert(resource != null); 168Debug.Assert(resource != null); 236Debug.Assert(!skipOnChannelCheck || _duceResource.IsOnChannel(channel)); 306Debug.Assert(_duceResource.IsOnChannel(channel)); 355Debug.Assert(!channel.IsOutOfBandChannel); 356Debug.Assert(!thisResource.GetHandle(channel).IsNull); 383Debug.Assert(!channel.IsOutOfBandChannel); 384Debug.Assert(!thisResource.GetHandle(channel).IsNull); 476Debug.Assert(s_Children == null || s_Children.IsFrozen,
Core\CSharp\System\Windows\Media3D\Generated\TranslateTransform3D.cs (2)
205Debug.Assert(!skipOnChannelCheck || _duceResource.IsOnChannel(channel)); 264Debug.Assert(_duceResource.IsOnChannel(channel));
Core\CSharp\System\Windows\Media3D\Generated\Vector3DCollection.cs (2)
807Debug.Assert(list != null, "list may not be null."); 906Debug.Assert(_index == -2, "expected -2, got " + _index + "\n");
Core\CSharp\System\Windows\Media3D\Geometry3D.cs (1)
83Debug.Assert(facesToHit != FaceType.None,
Core\CSharp\System\Windows\Media3D\HitTestParameters3D.cs (4)
71Debug.Assert(!HasModelTransformMatrix, 121Debug.Assert(HasWorldTransformMatrix, 154Debug.Assert(HasModelTransformMatrix, 194Debug.Assert(HasHitTestProjectionMatrix,
Core\CSharp\System\Windows\Media3D\Matrix3D.cs (11)
1049Debug.Assert(IsDistinguishedIdentity); 1061Debug.Assert(IsDistinguishedIdentity); 1077Debug.Assert(IsDistinguishedIdentity); 1203Debug.Assert(!IsDistinguishedIdentity); 1204Debug.Assert(IsAffine); 1220Debug.Assert(!IsDistinguishedIdentity); 1221Debug.Assert(IsAffine); 1232Debug.Assert(!(det < Determinant || det > Determinant), 1319Debug.Assert(!(det < Determinant || det > Determinant), 1412Debug.Assert( 1430Debug.Assert(IsDistinguishedIdentity == value,
Core\CSharp\System\Windows\Media3D\MeshGeometry3D.cs (7)
175Debug.Assert(hitTestableFaces != FaceType.None, 419Debug.Assert(!double.IsInfinity(pz / pw) && !double.IsNaN(pz / pw), 424Debug.Assert(dist > 0, "Distance is negative: " + dist); 505Debug.Assert(!double.IsInfinity(pz / pw) && !double.IsNaN(pz / pw), 541Debug.Assert(_cachedBounds.IsEmpty, 586Debug.Fail("Cached bounds are invalid. Caller needs to check for IsEmpty and call UpdateCachedBounds."); 590Debug.Fail("Cached bounds are invalid. We missed a call to SetCachedBoundsDirty.");
Core\CSharp\System\Windows\Media3D\Quaternion.cs (1)
544Debug.Assert(!(cosOmega < -1.0) && !(cosOmega > 1.0),
Core\CSharp\System\Windows\Media3D\Rect3D.cs (1)
66Debug.Assert(size.IsEmpty == IsEmpty);
Core\CSharp\System\Windows\Media3D\Viewport2DVisual3D.cs (9)
352Debug.Assert((newValue == null || newValue.InheritanceContext == null), 361Debug.Assert((newValue == null || newValue.InheritanceContext == null), 368Debug.Assert((newValue == null || newValue.InheritanceContext == null), 604Debug.Assert(Geometry == null || Geometry is MeshGeometry3D); 632Debug.Assert(Geometry == null || Geometry is MeshGeometry3D); 660Debug.Assert(Geometry == null || Geometry is MeshGeometry3D); 787Debug.Assert( (viewport2DVisual3D.InternalBitmapCacheBrush.InternalTarget == null 796Debug.Assert( (viewport2DVisual3D.InternalBitmapCacheBrush.InternalTarget == null 816Debug.Assert((viewport2DVisual3D.Visual == null || viewport2DVisual3D.Visual.InheritanceContext == null),
Core\CSharp\System\Windows\Media3D\Viewport3DVisual.cs (11)
266Debug.Assert(!e.IsASubPropertyChange, 344Debug.Assert(child != null); 345Debug.Assert(child.InternalVisualParent == null); 395Debug.Assert(child != null); 396Debug.Assert(child.InternalVisualParent == this); 647Debug.Fail("Cached bbox subgraph is incorrect!"); 658Debug.Assert( 678Debug.Assert( 732Debug.Assert(IsOnChannel(channel)); 780Debug.Assert(!CheckFlagsAnd(channel, VisualProxyFlags.IsContentNodeConnected), 821Debug.Assert(IsOnChannel(channel));
Core\CSharp\System\Windows\Media3D\Visual3D.cs (23)
254Debug.Assert(child != null); 255Debug.Assert(child.InternalVisualParent == null); 302Debug.Assert(child != null); 303Debug.Assert(child.InternalVisualParent == this); 475Debug.Assert(VisualTreeHelper.GetParent(this) != null, "If oldParent is null, current parent should != null."); 974Debug.Assert(InternalVisualParent == newParent); 982Debug.Assert(InternalVisualParent == newParent); 1082Debug.Assert(boundsAreEqual, errorString); 1104Debug.Assert(model != null); 1236Debug.Assert((flags & VisualProxyFlags.IsContentNodeConnected) == 0, 1284Debug.Assert(!CheckFlagsAnd(channel, VisualProxyFlags.IsContentConnected)); 1285Debug.Assert(IsOnChannel(channel)); 1482Debug.Assert(IsOnChannel(channel)); 1483Debug.Assert(!CheckFlagsAnd(channel, VisualProxyFlags.IsContentNodeConnected)); 1613Debug.Assert(child.InheritanceContext == this, 1686Debug.Assert(ancestor != null); 1837Debug.Assert(ancestor != null); 1874Debug.Assert(_2DParent.GetValue(this) == null, 1882Debug.Assert(parent2D == null || parent2D is Viewport3DVisual, 2089Debug.Assert(!e.CheckFlagsOr(VisualFlags.ShouldPostRender), 2091Debug.Assert(!e.CheckFlagsOr(VisualFlags.NodeIsCyclicBrushRoot), 2103Debug.Assert((viewport == null) == (e.InternalVisualParent == null), 2141Debug.Assert(_inheritanceContext.GetValue(this) == UseParentAsContext,
Core\CSharp\System\Windows\Media3D\Visual3DCollection.cs (7)
515Debug.Assert(InternalGetItem(i).ParentIndex == i - 1, 539Debug.Assert(InternalGetItem(i).ParentIndex == i + 1, 573Debug.Assert(_owner != null, "How did an Visual3DCollection get constructed without an owner?"); 581Debug.Assert(!duplicates.ContainsKey(visual), "How did the visual get re-inserted?"); 584Debug.Assert(visual.InternalVisualParent == _owner, "Why isn't our child's parent pointer the same as the collection owner?"); 585Debug.Assert(visual.ParentIndex == i, 634Debug.Assert(list != null, "list may not be null.");
Core\CSharp\System\Windows\Navigation\BaseUriHelper.cs (2)
201Debug.Assert(uri != null && uri.IsAbsoluteUri && SecurityHelper.AreStringTypesEqual(uri.Scheme, PackUriHelper.UriSchemePack) && IsPackApplicationUri(uri)); 218Debug.Assert(String.Compare(partName, uri.GetComponents(UriComponents.Path, UriFormat.UriEscaped), StringComparison.OrdinalIgnoreCase) == 0);
Core\CSharp\System\Windows\PresentationSource.cs (1)
627Debug.Assert(InputElement.IsUIElement3D(uie) || InputElement.IsUIElement(uie));
Core\CSharp\System\Windows\QueryContinueDragEventArgs.cs (1)
49Debug.Assert(false, "Invalid dragDropKeyStates");
Core\CSharp\System\Windows\ReverseInheritProperty.cs (1)
203Debug.Assert(originChangedAction != null);
Core\CSharp\System\Windows\UIElement.cs (9)
271Debug.Assert(MeasureRequest == null, "can't be clean and still have MeasureRequest"); 304Debug.Assert(ArrangeRequest == null, "can't be clean and still have MeasureRequest"); 1916Debug.Assert(routedEvent != null, "RoutedEvent must not be null"); 1956Debug.Assert(routedEvent != null, "RoutedEvent must not be null"); 3147Debug.Assert(intersectionDetail != IntersectionDetail.NotCalculated); 3240Debug.Assert(_proxy.IsOnChannel(channel)); 3310Debug.Assert(!CheckFlagsAnd(channel, VisualProxyFlags.IsContentConnected)); 3311Debug.Assert(_proxy.IsOnChannel(channel)); 4195Debug.Assert(value == Visibility.Visible || value == Visibility.Hidden || value == Visibility.Collapsed);
Core\CSharp\System\Windows\UIElement3D.cs (1)
1361Debug.Assert(value == Visibility.Visible || value == Visibility.Hidden || value == Visibility.Collapsed);
Graphics\include\exports.cs (23)
134Debug.Assert((cbData == 0) || ((Int64)(IntPtr)pbFrom) % 4 == 0); 135Debug.Assert((cbData == 0) || ((Int64)(IntPtr)pbTo) % 4 == 0); 136Debug.Assert(cbData % 4 == 0); 137Debug.Assert(cbData >= 0); 625Debug.Assert(!handle.IsNull); 661Debug.Assert(!handle.IsNull); 1087Debug.Assert(channel != null); 1107Debug.Assert(channel != null); 1298Debug.Assert(_others.Count > 0); 1324Debug.Assert(index == 0); 1560Debug.Assert(index <= 1); 1638Debug.Assert(index == 0); 1677Debug.Assert(channel != null); 1702Debug.Assert(sourceChannel != null); 1707Debug.Assert(found); 1714Debug.Assert(!(_map.Get(targetChannel, out duplicate))); 1740Debug.Assert(channel != null); 1745Debug.Assert(found); 1808Debug.Assert(channel != null); 1813Debug.Assert(found); 2147Debug.Assert(!hCompositionNode.IsNull); 2178Debug.Assert(!hCompositionNode.IsNull); 2386Debug.Assert(!hCompositionNode.IsNull);
Shared\MS\Internal\AppDomainShutdownMonitor.cs (3)
37Debug.Assert(listener.Target != null); 38Debug.Assert(listener.Target is IAppDomainShutdownListener); 51Debug.Assert(listener.Target == null || listener.Target is IAppDomainShutdownListener);
Shared\MS\Internal\CharacterBuffer.cs (2)
269Debug.Assert(characterOffset >= 0 && characterOffset < _characterArray.Length, "Invalid character index"); 385Debug.Assert(characterOffset >= 0 && characterOffset < _string.Length, "Invalid character index");
Shared\MS\Internal\GenericEnumerator.cs (1)
103Debug.Assert(_position >= 0);
Shared\MS\Internal\Ink\BitStream.cs (2)
30Debug.Assert(buffer != null); 43Debug.Assert(buffer != null);
Shared\MS\Internal\PartialList.cs (1)
46Debug.Assert(initialIndex >= 0 && initialIndex + count <= list.Count);
Shared\MS\Internal\PriorityQueue.cs (2)
98Debug.Assert(_count > 0); 140Debug.Assert(_count != 0);
Shared\MS\Internal\SafeSecurityHelper.cs (1)
467Debug.Assert(target != null);
Shared\System\Windows\Media\TypeConverterHelper.cs (1)
74Debug.Assert(inputString is Uri);
PresentationFramework (2164)
src\Framework\MS\Internal\Annotations\Anchoring\AttachedAnnotation.cs (8)
74Debug.Assert(manager != null, "LocatorManager can not be null"); 75Debug.Assert(annotation != null, "Annotation can not be null"); 76Debug.Assert(anchor != null, "Anchor can not be null"); 77Debug.Assert(attachedAnchor != null, "AttachedAnchor can not be null"); 244Debug.Assert(attachedAnchor != null, "AttachedAnchor can not be null"); 245Debug.Assert(attachmentLevel > AttachmentLevel.Unresolved && attachmentLevel <= AttachmentLevel.Incomplete, 260Debug.Assert(_selectionProcessor != null, SR.Get(SRID.NoProcessorForSelectionType, attachedAnchor.GetType())); 270Debug.Assert(_attachmentLevel != AttachmentLevel.Full, "Should only set fully resolved anchor if attachment level is not full.");
src\Framework\MS\Internal\Annotations\Anchoring\DataIdProcessor.cs (2)
425Debug.Assert(node != null, "DependencyObject can not be null"); 446Debug.Assert(d != null, "DependencyObject can not be null");
src\Framework\MS\Internal\Annotations\Anchoring\FixedPageProcessor.cs (1)
335Debug.Assert(page >= 0, "page can not be negative");
src\Framework\MS\Internal\Annotations\Anchoring\FixedTextSelectionProcessor.cs (3)
126Debug.Assert(numOfPages >= 0, "start page number is bigger than the end page number"); 311Debug.Assert(tv != null); 628Debug.Assert((start != null) && (end != null), "null start/end TextPointer on a non empty page");
src\Framework\MS\Internal\Annotations\Anchoring\LocatorManager.cs (13)
346Debug.Assert(attachedAnchor != null, "AttachedAnchor cannot be null if attachmentLevel is not Unresolved."); 397Debug.Assert(processor != null, "SubtreeProcessor can not be null"); 684Debug.Assert(startNode != null, "startNode can not be null"); 796Debug.Assert(node != null, "node can not be null"); 863Debug.Assert(data != null, "dataBlob is either null or not of ProcessingTreeState type"); 868Debug.Assert(processor != null, "SubtreeProcessor can not be null"); // There is always a default processor 890Debug.Assert(data != null, "dataBlob is either null or not of ProcessingTreeState type"); 894Debug.Assert(processor != null, "SubtreeProcessor can not be null"); 929Debug.Assert(locator != null, "locator can not be null"); 930Debug.Assert(startNode != null, "startNode can not be null"); 966Debug.Assert(offset >= 0 && offset < realLocator.Parts.Count, "offset out of range"); 1137Debug.Assert(locator != null, "locator can not be null"); 1138Debug.Assert(data.LocatorPartIndex >= 0 && data.LocatorPartIndex < locator.Parts.Count,
src\Framework\MS\Internal\Annotations\Anchoring\PathNode.cs (5)
235Debug.Assert(node != null, "node can not be null"); 290Debug.Assert(node != null, "node can not be null"); 329Debug.Assert(path != null, "path can not be null"); 330Debug.Assert(branch != null, "branch can not be null"); 334Debug.Assert(path.Node.Equals(branch.Node), "path.Node is not equal to branch.Node");
src\Framework\MS\Internal\Annotations\Anchoring\TextSelectionProcessor.cs (2)
409Debug.Assert(target != null); 479Debug.Assert(startNode != null);
src\Framework\MS\Internal\Annotations\Anchoring\TextViewSelectionProcessor.cs (1)
241Debug.Assert(textView != null);
src\Framework\MS\Internal\Annotations\AnnotationMap.cs (1)
90Debug.Assert(list != null, "there should be an attached annotation list for the annotationId: " + annotationId.ToString());
src\Framework\MS\Internal\Annotations\Component\AdornerPresentationContext.cs (1)
446Debug.Assert((adorners != null) && (adorner != null), "null adorners list or adorner");
src\Framework\MS\Internal\Annotations\Component\AnnotationComponentManager.cs (9)
65Debug.Assert(attachedAnnotation != null, "AttachedAnnotation should not be null"); 82Debug.Assert(attachedAnnotation != null, "AttachedAnnotation should not be null"); 150Debug.Assert(attachedAnnotation != null, "AttachedAnnotation should not be null"); 153Debug.Assert(annotatedElement != null, "the annotatedElement should inherit from UIElement"); 173Debug.Assert(annotatedElement != null, "the annotatedElement should inherit from UIElement"); 217Debug.Assert(attachedAnnotation != null, "attachedAnnotation should not be null"); 218Debug.Assert(previousAttachedAnchor != null, "previousAttachedAnchor should not be null"); 278Debug.Assert(attachedAnnotation != null, "attachedAnnotation should not be null"); 279Debug.Assert(component != null, "component should not be null");
src\Framework\MS\Internal\Annotations\Component\AnnotationHighlightLayer.cs (21)
84Debug.Assert(start != null, "start pointer is null"); 85Debug.Assert(end != null, "end pointer is null"); 86Debug.Assert(start.CompareTo(end) <= 0, "end pointer before start"); 123Debug.Assert(highlightRange != null, "null range data"); 356Debug.Assert(highlightRange != null, " null highlight range"); 358Debug.Assert((rangeSegments != null) && (rangeSegments.Count > 0), "invalid rangeSegments"); 369Debug.Assert(highlightSegment != null, "null highlight segment"); 393Debug.Assert(rangeEnumerator.Current.IsNull || !next || 533Debug.Assert(false, "Mismatched segment data"); 657Debug.Assert(start != null, "start pointer is null"); 658Debug.Assert(end != null, "end pointer is null"); 659Debug.Assert(owners != null, "null owners list"); 660Debug.Assert(owners.Count > 0, "empty owners list"); 662Debug.Assert(owners[i] != null, "null owner"); 814Debug.Assert((ps1 != null) && (ps2 != null) && (ps1.CompareTo(ps2) <= 0), "invalid splitting points"); 889Debug.Assert(res.Count == 2, "unexpected resulting segment count after split"); 945Debug.Assert(textViews != null, "geometry text view not found"); 965Debug.Assert((view != null) && (parentView != null), "null text view"); 1007Debug.Assert(!_segment.IsNull, "null TextSegment"); 1130Debug.Assert(TopOwner != null, "invalid TopOwner"); 1132Debug.Assert(parentView != null, "geometry parent text view not found");
src\Framework\MS\Internal\Annotations\Component\MArkedHighlightComponent.cs (26)
385Debug.Assert(anchor != null, "undefined anchor"); 386Debug.Assert(marker.Data != null || marker.Data == Geometry.Empty, "undefined geometry"); 390Debug.Assert(geometry != null, "unexpected geometry type"); 391Debug.Assert(geometry.Children.Count == 3, "unexpected geometry children count"); 458Debug.Assert(_uiParent != null, "No selection container"); 500Debug.Assert(textContainer != null, "TextAnchor does not belong to a TextContainer"); 654Debug.Assert(componentsRegister != null, "The selection is not registered"); 680Debug.Assert(anchor != null, "wrong attachedAnchor"); 914Debug.Assert(selection != null, "Unexpected sender of Changed event"); 924Debug.Assert(components != null, "No SN registered for this selection"); 932Debug.Assert(components[i].HighlightAnchor != null, "Missing highlight anchor component"); 953Debug.Assert(sender != null, "undefined sender"); 980Debug.Assert(pos != null, "null text pointer"); 994Debug.Assert((components != null) && (components.Count > 0), "invalid component registry"); 1021Debug.Assert(selectionHandler != null, "SelectionHandler handler can not be null"); 1022Debug.Assert(mouseMoveHandler != null, "MouseMoveHandler handler can not be null"); 1035Debug.Assert(component != null, "component is null"); 1036Debug.Assert(_components != null, "_components are null"); 1071Debug.Assert(component != null, "component is null"); 1072Debug.Assert(_components != null, "_components are null"); 1127Debug.Assert(first != null, "first component is null"); 1128Debug.Assert((first.AttachedAnnotations != null) && (first.AttachedAnnotations.Count > 0), "first AttachedAnchor is null"); 1129Debug.Assert(second != null, "second component is null"); 1130Debug.Assert((second.AttachedAnnotations != null) && (second.AttachedAnnotations.Count > 0), "second AttachedAnchor is null"); 1135Debug.Assert(firstAnchor != null, " first TextAnchor is null"); 1136Debug.Assert(secondAnchor != null, " second TextAnchor is null");
src\Framework\MS\Internal\Annotations\Storage\StoreAnnotationsMap.cs (2)
56Debug.Assert(authorChanged != null && anchorChanged != null && cargoChanged != null, 82Debug.Assert(FindAnnotation(annotation.Id) == null, "annotation not found");
src\Framework\MS\Internal\AppModel\ApplicationProxyInternal.cs (6)
382Debug.WriteLine("SetFocus() on RootBrowserWindow failed."); 441Debug.Assert(Application.IsShuttingDown); 785Debug.Assert(Application.Current != null, "BrowserJournalingError: Application object should already be created"); 805Debug.Assert(journal[index].Id == (int)journaledObject, "BrowserJournalingError: Index retrieved from journal stream does not match index of journal entry"); 898Debug.Assert(!Application.IsApplicationObjectShuttingDown); 928Debug.Assert(((PackageDocument)_document.Value).Package ==
src\Framework\MS\Internal\AppModel\AssemblyFilter.cs (1)
87Debug.Fail("Environment.Exit() failed.");
src\Framework\MS\Internal\AppModel\IconHelper.cs (1)
378Debug.Assert(nBytesCount > 0, "The N-Byte has to be greater than 0!");
src\Framework\MS\Internal\AppModel\Journaling.cs (16)
108Debug.Assert(_contentId == 0 || _contentId == value, 136Debug.Assert(value.JEGroupState == this); 137Debug.Assert(_groupExitEntry == null || _groupExitEntry.ContentId == value.ContentId); 232Debug.Assert(this.KeepAliveRoot == contentObject); // set by ctor; shouldn't change 239Debug.Assert(navMode == NavigationMode.Back || navMode == NavigationMode.Forward); 240Debug.Assert(this.KeepAliveRoot != null); 394Debug.Assert(endingPF.ParentPageFunctionId == Guid.Empty, 430Debug.Assert(pageFunction != null && pageFunction.KeepAlive); 475Debug.Assert(navMode == NavigationMode.Back || navMode == NavigationMode.Forward); 480Debug.Assert(pf != null); 512Debug.Assert(!pageFunction.KeepAlive); 587Debug.Assert(navMode == NavigationMode.Back || navMode == NavigationMode.Forward); 594Debug.Assert(ns != null, "Fragment navigation won't work when the INavigator doesn't have a NavigationService."); 600Debug.Assert(pageFunction != null); 696Debug.Assert(contentObject.GetType().AssemblyQualifiedName == this._typeName.Value, 852Debug.Assert(_markupUri != null, "_markupUri in JournalEntryPageFunctionUri should be set.");
src\Framework\MS\Internal\AppModel\JournalNavigationScope.cs (6)
295Debug.Assert(journal != null); 329Debug.Fail("Tried to navigate to a null JournalEntry."); 334Debug.Fail("Tried to navigate to a non-navigable journal entry."); 339Debug.Assert(navigationService != null, "NavigationService cannot be null for journal navigations"); 444Debug.Assert(_journal == null && value != null, 479Debug.Assert(sender == _journal);
src\Framework\MS\Internal\AppModel\ReturnEventSaver.cs (1)
134Debug.Assert(caller != null, "Caller should not be null");
src\Framework\MS\Internal\AppModel\RootBrowserWindow.cs (2)
292Debug.Assert(topWindow != IntPtr.Zero); 690Debug.Assert(sink.KeyboardInputSite == null);
src\Framework\MS\Internal\AppModel\XappLauncher.cs (5)
131Debug.Assert(!_isInAsynchronousOperation && !IsCanceledOrShuttingDown); 383Debug.Assert(_isInAsynchronousOperation); 857Debug.Assert(!_canceled); 1006Debug.Assert(!_canceled); 1019Debug.Assert(!(_canceled && _isInAsynchronousOperation));
src\Framework\MS\Internal\Commands\CommandHelpers.cs (3)
104Debug.Assert(controlType != null); 105Debug.Assert(command != null); 106Debug.Assert(executedRoutedEventHandler != null);
src\Framework\MS\Internal\Controls\ActiveXContainer.cs (2)
80Debug.Assert(_host != null, "gotta have the avalon activex host"); 279Debug.Assert(_siteUIActive == null, "Object did not call OnUIDeactivate");
src\Framework\MS\Internal\Controls\ActiveXSite.cs (2)
243Debug.Fail(t.ToString()); 425Debug.Fail(t.ToString());
src\Framework\MS\Internal\Controls\CustomCategoryAttribute.cs (1)
18Debug.Assert("Content".Equals(name, StringComparison.Ordinal)
src\Framework\MS\Internal\Controls\InkCanvasFeedbackAdorner.cs (1)
162Debug.Assert(_frameSize != new Size(0, 0));
src\Framework\MS\Internal\Controls\InkCanvasInnerCanvas.cs (2)
43Debug.Assert(inkCanvas != null); 289Debug.Assert(Children.Contains(hitElement), "The hit element should be a child of InnerCanvas.");
src\Framework\MS\Internal\Controls\InkCanvasSelectionAdorner.cs (1)
44Debug.Assert(adornedElement is InkCanvasInnerCanvas,
src\Framework\MS\Internal\Controls\ModelTreeEnumerator.cs (6)
152Debug.Assert(contentControl != null, "contentControl should be non-null."); 172Debug.Assert(headeredContentControl != null, "headeredContentControl should be non-null."); 173Debug.Assert(header != null, "Header should be non-null. If Header was null, the base ContentControl enumerator should have been used."); 232Debug.Assert(headeredItemsControl != null, "headeredItemsControl should be non-null."); 233Debug.Assert(items != null, "items should be non-null."); 234Debug.Assert(header != null, "header should be non-null. If Header was null, the base ItemsControl enumerator should have been used.");
src\Framework\MS\Internal\Controls\StickyNote\StickyNoteAnnotations.cs (14)
95Debug.Assert(annotation != null); 137Debug.Assert((token & AllValues) != 0); 625Debug.Assert(false); 640Debug.Assert(cargo != null); 664Debug.Assert(false); 712Debug.Assert(false); 739Debug.Assert(false, "The annotation data does match with the current content control in StickyNote"); 822Debug.Assert(snc.IsExpanded); 830Debug.Assert(snc.IsExpanded); 1276Debug.Assert(_attachedAnnotation != null && _attachedAnnotation.Annotation == args.Annotation); 1290Debug.Assert(_attachedAnnotation != null && _attachedAnnotation.Annotation == args.Annotation); 1393Debug.Assert(((IAnnotationComponent)this).AnnotatedElement != null, "undefined annotated element"); 1420Debug.Assert(adornerTransform != null, "transform to AnnotatedElement is null"); 1587Debug.Assert(_attachedAnnotation != null, "This property should never be acccessed from outside of CAF");
src\Framework\MS\Internal\Controls\StickyNote\StickyNoteContentControl.cs (4)
212Debug.Assert(node != null && !IsEmpty); 239Debug.Assert(node != null); 384Debug.Assert(node != null && !IsEmpty); 406Debug.Assert(node != null, "Try to load data from an invalid node");
src\Framework\MS\Internal\Controls\StickyNote\StickyNoteHelper.cs (2)
104Debug.Assert(!helper.IsLocked(flag)); 114Debug.Assert(_helper.IsLocked(_flag));
src\Framework\MS\Internal\Controls\TemplatedAdorner.cs (3)
54Debug.Assert(adornedElement != null, "adornedElement should not be null"); 55Debug.Assert(adornerTemplate != null, "adornerTemplate should not be null"); 145Debug.Assert(_child != null, "_child should not be null");
src\Framework\MS\Internal\Controls\WebBrowserEvent.cs (7)
72Debug.Assert(parent != null, "WebBrowser control required for hooking webbrowser events"); 91Debug.Assert(url == null || url is string, "invalid url type"); 92Debug.Assert(targetFrameName == null || targetFrameName is string, "invalid targetFrameName type"); 93Debug.Assert(headers == null || headers is string, "invalid headers type"); 230Debug.Assert(url == null || url is string, "invalid url type"); 248Debug.Assert(psi != null, "The Document does not implement IPersistStreamInit"); 286Debug.Assert(url == null || url is string, "invalid url type");
src\Framework\MS\Internal\Data\BindingWorker.cs (1)
37Debug.Assert((int)Feature.LastFeatureId <= 32, "UncommonValueTable supports only 32 Ids");
src\Framework\MS\Internal\Data\CollectionViewGroupInternal.cs (2)
528Debug.Assert(subgroup != null); 550Debug.Assert(subgroup != null);
src\Framework\MS\Internal\Data\CollectionViewGroupRoot.cs (2)
160Debug.Assert(System.Windows.Controls.ItemsControl.EqualsEx(item, ProtectedItems[index]), "RemoveSpecialItem finds inconsistent data"); 648Debug.Assert(false, "Failed to find item in expected subgroup after Move");
src\Framework\MS\Internal\Data\CompositeCollectionView.cs (2)
431Debug.Assert(startingIndex >= 0, "Source composite collection failed to supply an index"); 476Debug.Assert(args.Action == NotifyCollectionChangedAction.Remove);
src\Framework\MS\Internal\Data\DataExtensionMethods.cs (1)
41Debug.Assert(false, "Unsupported list passed to Search");
src\Framework\MS\Internal\Data\DefaultValueConverter.cs (1)
481Debug.Assert(sourceType != targetType);
src\Framework\MS\Internal\Data\DisplayMemberTemplateSelector.cs (1)
30Debug.Assert(!(String.IsNullOrEmpty(displayMemberPath) && String.IsNullOrEmpty(stringFormat)));
src\Framework\MS\Internal\Data\LiveShapingBlock.cs (1)
97Debug.Assert(index < size, "FindPosition called with item not in its block");
src\Framework\MS\Internal\Data\LiveShapingList.cs (1)
266Debug.Assert(sdc.Count >= _compInfos.Length, "SortDescriptions don't match LivePropertyInfos");
src\Framework\MS\Internal\Data\PropertyPathWorker.cs (1)
621Debug.Assert(0<=k && k<_arySVS.Length && _arySVS[k].collectionView == collectionView, "bad parameters to UpdateSourceValueState");
src\Framework\MS\Internal\Data\RBNode.cs (4)
426Debug.Assert(successor != null && successor.Size < MaxSize, "InsertAt: successor should have room"); 447Debug.Assert(succsucc.Size == MaxSize, "InsertAt: outer nodes should be full"); 525Debug.Assert(index >= node.LeftSize + node.Size, "InsertNode: index should fall between nodes"); 578Debug.Assert(!deleteHere || node.Size == 0, "DeleteNode: Deleted node should be empty");
src\Framework\MS\Internal\Data\StaticPropertyChangedEventManager.cs (6)
93Debug.Assert(false, "Should never get here"); 101Debug.Assert(false, "Should never get here"); 163Debug.Assert(handler != null && type != null && propertyName != null, 188Debug.Assert(handler != null && type != null && propertyName != null, 409Debug.Assert((String)de.Key != AllListenersKey, "special key should not appear"); 497Debug.Assert(_toRemove.Count == 0, "to-remove list should be empty");
src\Framework\MS\Internal\Data\ValueChangedEventManager.cs (3)
201Debug.Assert(_toRemove.Count == 0, "to-remove list should be empty"); 309Debug.Assert(listener != null && source != null && pd != null, 317Debug.Assert(listener != null && source != null && pd != null,
src\Framework\MS\Internal\Data\ViewManager.cs (1)
242Debug.Assert(cvs != null, "Required CVS key is missing");
src\Framework\MS\Internal\Data\XDeferredAxisSource.cs (1)
82Debug.Assert(aryMembers.Length == 1, "XLinq changed XDeferredAxis to have more than one indexer");
src\Framework\MS\Internal\Data\XmlBindingWorker.cs (2)
43Debug.Assert(_xpath != null); 445Debug.Assert(ContextNode != null);
src\Framework\MS\Internal\DataStreams.cs (1)
342Debug.Assert(state != null);
src\Framework\MS\Internal\Documents\Application\DocumentApplicationJournalEntry.cs (1)
86Debug.Assert(docViewer != null, "PUIDocumentApplicationDocumentViewer not found.");
src\Framework\MS\Internal\Documents\ColumnResult.cs (1)
196Debug.Assert(_paragraphs != null && _paragraphs.Count > 0);
src\Framework\MS\Internal\Documents\ContentElementCollection.cs (5)
44Debug.Assert(owner != null); 185Debug.Assert(Items[item.Index] == item); 321Debug.Assert(collection != null); 722Debug.Assert(BelongsToOwner(item) && Items[item.Index] == item); 732Debug.Assert(BelongsToOwner(Items[i + 1]));
src\Framework\MS\Internal\Documents\HostedElements.cs (6)
88Debug.Assert(_currentTextSegment == 0); 105Debug.Assert(((ITextPointer)_currentPosition).CompareTo(_textSegments[_currentTextSegment].Start) >= 0 && 116Debug.Assert(((ITextPointer)_currentPosition).CompareTo(_textSegments[_currentTextSegment].Start) >= 0); 195Debug.Assert(_currentPosition.GetAdjacentElementFromOuterPosition(LogicalDirection.Forward) is IInputElement); 199Debug.Assert(_currentPosition.GetAdjacentElement(LogicalDirection.Forward) is IInputElement); 205Debug.Assert(false, "Invalid state in HostedElements.cs");
src\Framework\MS\Internal\Documents\PageCache.cs (1)
756Debug.Assert(changes != null, "Attempt to fire PageCacheChangedEvent with null change set.");
src\Framework\MS\Internal\Documents\RowCache.cs (1)
1107Debug.Assert(false, "Requested to update a non-existent row.");
src\Framework\MS\Internal\Documents\TableColumnCollectionInternal.cs (8)
49Debug.Assert(Items[index] == null); 68Debug.Assert(BelongsToOwner(Items[i])); 118Debug.Assert(BelongsToOwner(Items[i])); 143Debug.Assert(item != null && item.Index == -1); 144Debug.Assert(Items[index] == null); 180Debug.Assert(item != null); 298Debug.Assert(BelongsToOwner(Items[i])); 306Debug.Assert(BelongsToOwner(Items[i + count]));
src\Framework\MS\Internal\Documents\TableTextElementCollectionInternal.cs (9)
71Debug.Assert(BelongsToOwner(Items[i])); 246Debug.Assert(BelongsToOwner(Items[i])); 267Debug.Assert(item != null && item.Index == -1); 268Debug.Assert(Items[index] == null); 296Debug.Assert(BelongsToOwner(item) && Items[item.Index] == item); 310Debug.Assert(BelongsToOwner(Items[i + 1])); 352Debug.Assert(false, "Garbage in logical tree."); 379Debug.Assert(BelongsToOwner(Items[i])); 396Debug.Assert(BelongsToOwner(item) && Items[item.Index] == item);
src\Framework\MS\Internal\Documents\TextBoxView.cs (1)
1225System.Diagnostics.Debug.Assert(_host != null && _host.TextContainer != null && _host.TextContainer.Highlights != null,
src\Framework\MS\Internal\Documents\TextParagraphView.cs (9)
174Debug.Assert(lines != null && lines.Count > 0); 180Debug.Assert(false); 295Debug.Assert(lines != null && lines.Count > 0); 299Debug.Assert(lineIndex >= 0 && lineIndex < lines.Count); 354Debug.Assert(lines != null && lines.Count > 0, "Line array is empty."); 358Debug.Assert(lineIndex < lines.Count); 557Debug.Assert(lines != null && lines.Count > 0); 594Debug.Assert(lines != null && lines.Count > 0); 721Debug.Assert(lines != null && lines.Count > 0);
src\Framework\MS\Internal\Documents\UndoManager.cs (3)
134Debug.Assert(((UndoManager)undoManager)._scope == null); 172Debug.Assert(((UndoManager)undoManager)._scope == scope); 308Debug.Assert(false);
src\Framework\MS\Internal\Globalization\BamlResourceContent.cs (1)
120Debug.Assert(match.Value.Length > 0 && match.Value[0] == BamlConst.EscapeChar);
src\Framework\MS\Internal\Globalization\BamlResourceSerializer.cs (3)
62Debug.Assert(output != null, "The output stream given is null"); 63Debug.Assert(tree != null && tree.Root != null, "The tree to be serialized is null."); 84Debug.Assert(elementNode != null);
src\Framework\MS\Internal\Globalization\BamlTreeMap.cs (3)
53Debug.Assert(tree!= null, "Baml Tree is empty"); 54Debug.Assert(localizer!= null, "BamlLocalizer is null"); 581Debug.Assert(node.NodeType == BamlNodeType.StartElement);
src\Framework\MS\Internal\Globalization\BamlTreeNode.cs (4)
46Debug.Assert(root != null, "Baml tree root is null!"); 47Debug.Assert(size > 0, "Baml tree size is less than 1"); 571Debug.Assert(value.Category != LocalizationCategory.Ignore && value.Category != LocalizationCategory.Inherit); 706Debug.Assert(value.Category != LocalizationCategory.Ignore && value.Category != LocalizationCategory.Inherit);
src\Framework\MS\Internal\Globalization\BamlTreeUpdater.cs (3)
32Debug.Assert(tree != null && tree.Root != null, "Empty Tree!"); 33Debug.Assert(treeMap != null, "Empty map!"); 34Debug.Assert(dictionary != null, "Empty dictionary");
src\Framework\MS\Internal\Globalization\LocalizableResourceBuilder.cs (2)
452Debug.Assert(inheritableAttribute != null); 522Debug.Assert(false, "Can't process localizability attribute on nodes other than Element, Property and LiteralContent.");
src\Framework\MS\Internal\Globalization\LocalizationComments.cs (1)
362Debug.Assert(enumPrefix != null && enumNames != null);
src\Framework\MS\Internal\Helper.cs (7)
418Debug.Assert( fe != null ); 618Debug.Assert(targetDependencyObject != null, "DependencyProperties can only be set on DependencyObjects"); 665Debug.Assert(targetMember is PropertyInfo || targetMember is MethodInfo, 678Debug.Assert(parameterInfos.Length == 2, "The signature of a static settor must contain two parameters"); 862Debug.Assert(item != null); 1280Debug.Assert(virtualizingElement != null, "Must have a virtualizingElement to clear"); 1358Debug.Assert(VisualTreeHelper.IsAncestorOf(pathEndElement, pathStartElement), "pathEndElement should be an ancestor of pathStartElement");
src\Framework\MS\Internal\Ink\ClipboardProcessor.cs (6)
93Debug.Assert(dataObject != null && _preferredClipboardData!= null); 144Debug.Assert(inkCanvasSelection.SelectedStrokes.Count == orderedStrokes.Count); 188Debug.Assert(false , "CopySelectData: InkCanvas should have a selection!"); 202Debug.Assert(dataObject != null && _preferredClipboardData!= null); 273Debug.Assert(_preferredClipboardData != null); 282Debug.Assert(value != null);
src\Framework\MS\Internal\Ink\EditingCoordinator.cs (22)
100Debug.Assert(ActiveEditingBehavior == SelectionEditor, 193Debug.Assert(currentBehavior is StylusEditingBehavior, 215Debug.Assert(currentBehavior is StylusEditingBehavior, 271Debug.Assert(behavior != null); 329Debug.Assert(_activationStack.Count == 1, "The behavior stack has to contain one behavior."); 375Debug.Assert(behavior == ActiveEditingBehavior); 385Debug.Assert(behavior == LassoSelectionBehavior || behavior == SelectionEditingBehavior, 396Debug.Assert(behavior != LassoSelectionBehavior && behavior != SelectionEditingBehavior, 465Debug.Assert((_capturedStylus != null && _capturedMouse == null) 624Debug.Assert(newEditingBehavior != null); 825Debug.Assert(stylusEditingBehavior != null || ActiveEditingBehavior == null, 908Debug.Assert(ActiveEditingBehavior == null || ActiveEditingBehavior is IStylusEditing, 985Debug.Assert(inputDevice != null, "A null device is passed in."); 986Debug.Assert(stylusEditingBehavior != null, "stylusEditingBehavior cannot be null."); 987Debug.Assert(!IsInMidStroke, "The previous device hasn't been released yet."); 1037Debug.Assert(!resetDynamicRenderer, "The dynamic renderer shouldn't be reset for Mouse"); 1073Debug.Assert(IsInMidStroke || !releaseDevice, "The captured device has been release unexpectly."); 1115Debug.Assert(_capturedStylus == null || _capturedMouse == null, "InkCanvas cannot capture both stylus and mouse at the same time."); 1249Debug.Assert(false, "Unknown behavior"); 1286Debug.Assert(false, "Unknown behavior"); 1294Debug.Assert(!IsInMidStroke, "ChangeEditingBehavior cannot be called in a mid-stroke"); 1295Debug.Assert(_activationStack.Count <= 1, "The behavior stack has to contain at most one behavior when user is not editing.");
src\Framework\MS\Internal\Ink\EraserBehavior.cs (8)
93Debug.Assert(EditingCoordinator.IsInMidStroke, "SwitchToMode should only be called in a mid-stroke"); 111Debug.Assert(_cachedEraseMode != mode); 156Debug.Assert(false, "Unknown InkCanvasEditingMode!"); 165Debug.Assert(newEraseMode == InkCanvasEditingMode.EraseByPoint 189Debug.Assert(_cachedPointEraserCursor != null, "_cachedPointEraserCursor shouldn't be null."); 357Debug.Assert(null != e.HitStroke); 395Debug.Assert(null != e.HitStroke, "e.HitStroke cannot be null"); 412Debug.Assert(eraseResult != null, "eraseResult cannot be null");
src\Framework\MS\Internal\Ink\InkCanvasSelection.cs (11)
150Debug.Assert( _inkCanvas.EditingCoordinator.UserIsEditing == true ); 151Debug.Assert(activeSelectionHitResult != InkCanvasSelectionHitResult.None, "activeSelectionHitResult cannot be InkCanvasSelectionHitResult.None."); 161Debug.Assert(VisualTreeHelper.GetParent(feedbackAdorner) == null, 176Debug.Assert(VisualTreeHelper.GetParent(_inkCanvas.FeedbackAdorner) 194Debug.Assert(VisualTreeHelper.GetParent(feedbackAdorner) == adornerLayer, 217Debug.Assert(strokes != null && elements != null); 503Debug.Assert(false, "The updatedElement has to be the same type as the originalElement."); 623Debug.Assert(false, "An unexpected single selected Element"); 784Debug.Assert( SelectedElements.Count != 0, 902Debug.Assert(_inkCanvas.SelectionAdorner.Visibility == Visibility.Visible, 909Debug.Assert(_inkCanvas.SelectionAdorner.Visibility == Visibility.Collapsed,
src\Framework\MS\Internal\Ink\InkCollectionBehavior.cs (3)
138Debug.Assert(EditingCoordinator.IsInMidStroke, "SwitchToMode should only be called in a mid-stroke"); 197Debug.Assert(false, "Unknown InkCanvasEditingMode!"); 353Debug.Assert(_strokeDrawingAttributes != null, "_strokeDrawingAttributes can not be null, did we not see a down?");
src\Framework\MS\Internal\Ink\LassoHelper.cs (2)
176System.Diagnostics.Debug.Assert(null != points); 177System.Diagnostics.Debug.Assert((0 <= percentIntersect) && (100 >= percentIntersect));
src\Framework\MS\Internal\Ink\LassoSelectionBehavior.cs (11)
80Debug.Assert(EditingCoordinator.IsInMidStroke, "SwitchToMode should only be called in a mid-stroke"); 108Debug.Assert(false, "Cannot switch from Select to Select in mid-stroke"); 121Debug.Assert(false, "Unknown InkCanvasEditingMode!"); 133Debug.Assert(stylusPoints.Count != 0, "An empty stylusPoints has been passed in."); 284Debug.Assert(tappedElement == null); 290Debug.Assert(tappedStroke == null); 379System.Diagnostics.Debug.Assert(null != _lassoHelper); 396Debug.Assert(canvas != null); 397Debug.Assert(childElement != null); 399Debug.Assert(canvas.CheckAccess()); 599Debug.Assert(!_disableLasso && _lassoHelper == null, "StartLasso is called unexpectedly.");
src\Framework\MS\Internal\Ink\PenCursorManager.cs (2)
71Debug.Assert(DoubleUtil.IsZero(tranform.OffsetX) && DoubleUtil.IsZero(tranform.OffsetY), "The EraserShape cannot be translated."); 72Debug.Assert(tranform.HasInverse, "The transform has to be invertable.");
src\Framework\MS\Internal\Ink\SelectionEditingBehavior.cs (3)
80Debug.Assert(_hitResult != InkCanvasSelectionHitResult.None); 339Debug.Assert(false); 393Debug.Assert(EditingCoordinator.UserIsEditing == false, "Unexpect UserIsEditng state." );
src\Framework\MS\Internal\Ink\StrokeCollectionDefaultValueFactory.cs (1)
45Debug.Assert(property.PropertyType == typeof(StrokeCollection),
src\Framework\MS\Internal\Ink\XamlClipboardData.cs (1)
122Debug.Assert(setString.Length > 0);
src\Framework\MS\Internal\IO\Packaging\ByteStream.cs (3)
54Debug.Assert(stream != null); 60Debug.Assert(_access == FileAccess.Read); 136Debug.Assert(_length > 0);
src\Framework\MS\Internal\IO\Packaging\ManagedFilter.cs (2)
79System.Diagnostics.Debug.Assert(_propType == PropSpecType.Name, "ManagedPropSpec.PropName - PropName only meaningful if PropType is type string"); 101System.Diagnostics.Debug.Assert(_propType == PropSpecType.Id, "ManagedPropSpec.PropId - PropId only meaningful if PropType is numeric");
src\Framework\MS\Internal\IO\Packaging\PackageFilter.cs (7)
466Debug.Assert(false); 475Debug.Assert(false); 566Debug.Assert(contentType != null && contentType.ToString().Length > 0); 592Debug.Assert(dottedExtensionName != null); 620Debug.Assert(pathWithGaps != null && stopGaps != null); 629Debug.Assert(stopGaps.Length > nextStopGapToUse); 637Debug.Assert(stopGaps.Length == nextStopGapToUse);
src\Framework\MS\Internal\IO\Packaging\XamlFilter.cs (8)
299Debug.Assert(bufferCharacterCount >= 0); 365Debug.Assert(_fixedPageContentExtractor != null); 400Debug.Assert(_contextStack.Count == 0); 406Debug.Assert(_topLevelReader != null); 413Debug.Assert(false); 516Debug.Assert(topOfStack.HasIndexableContent); 778Debug.Assert(_xamlReader != null); 800Debug.Assert(String.CompareOrdinal(_xamlReader.LocalName, _fixedPageName) == 0);
src\Framework\MS\Internal\IO\Packaging\XmlFixedPageInfo.cs (1)
42Debug.Assert(_pageNode != null);
src\Framework\MS\Internal\IO\Packaging\XmlGlyphRunInfo.cs (1)
47Debug.Assert(_glyphsNode != null
src\Framework\MS\Internal\LayoutDump.cs (5)
469Debug.Assert(dpv != null, "Dump function has to match element type."); 485Debug.Assert(text != null, "Dump function has to match element type."); 518Debug.Assert(fdsv != null, "Dump function has to match element type."); 544Debug.Assert(fdView != null, "Dump function has to match element type."); 584Debug.Assert(flowDocumentPage != null, "Dump function has to match page type.");
src\Framework\MS\Internal\Navigation\JournalEntryStack.cs (1)
124Debug.Assert(_current != null, "If we are returning true, our current cannot be null");
src\Framework\MS\Internal\PtsHost\BaseParaClient.cs (2)
88Debug.Assert(_paraHandle.Value == IntPtr.Zero || _paraHandle.Value == pfspara); 124Debug.Assert(oldParaClient._visual != null);
src\Framework\MS\Internal\PtsHost\BaseParagraph.cs (1)
185Debug.Assert(ParagraphEndCharacterPosition >= startPosition);
src\Framework\MS\Internal\PtsHost\CellParaClient.cs (4)
96Debug.Assert(calculatedColumns != null 388Debug.Assert(tableParaClient != null); 391Debug.Assert( calculatedColumns != null 405Debug.Assert(0 <= durCellWidth);
src\Framework\MS\Internal\PtsHost\CellParagraph.cs (6)
77Debug.Assert(Cell.Index != -1 && Cell.ColumnIndex != -1, 83Debug.Assert(Cell.Table != null); 149Debug.Assert(Cell.Index != -1 && Cell.ColumnIndex != -1, 152Debug.Assert(Cell.Table != null); 178Debug.Assert(Cell.Index != -1 && Cell.ColumnIndex != -1, 181Debug.Assert(Cell.Table != null);
src\Framework\MS\Internal\PtsHost\ColumnPropertiesGroup.cs (1)
46internal double ColumnWidth { get { Debug.Assert(!double.IsNaN(_columnWidth)); return _columnWidth; } }
src\Framework\MS\Internal\PtsHost\ContainerParagraph.cs (12)
239Debug.Assert(_ur.ChangeType == PTS.FSKCHANGE.fskchInside); // Inconsistent UpdateRecord data 307Debug.Assert(_ur == null); // UpdateRecord has been already created. 370Debug.Assert(StructuralCache.CurrentFormatContext.FinitePage || _ur != null); // For bottomless case UpdateRecord needs to be created in UpdGetFirstChangeInSegment. 375Debug.Assert(_ur == null); 500Debug.Assert(iArea == 0); 673Debug.Assert(iArea == 0); 758Debug.Assert(pmcsclientOut == IntPtr.Zero); 810Debug.Assert(iArea == 0); 895Debug.Assert(pmcsclientOut == IntPtr.Zero); 949Debug.Assert(ParagraphEndCharacterPosition >= startPosition); 1090Debug.Assert(textPointer is TextPointer); 1216Debug.Assert(ur.Next.FirstPara == null || ur.Next.FirstPara.Next == null);
src\Framework\MS\Internal\PtsHost\DtrList.cs (1)
319Debug.Assert(_dtrs.Length > 0);
src\Framework\MS\Internal\PtsHost\FigureParaClient.cs (4)
458Debug.Assert(visualChildren.Count == 1 && visualChildren[0] is ContainerVisual); 479Debug.Assert(fskupd != PTS.FSKUPDATE.fskupdNoChange); 493Debug.Assert(visualChildren.Count == 1 && visualChildren[0] is SectionVisual); 679Debug.Assert(arrayColumnDesc.Length == 1);
src\Framework\MS\Internal\PtsHost\FigureParagraph.cs (2)
331Debug.Assert(false, "Tight wrap is not currently supported."); 455Debug.Assert(ParagraphEndCharacterPosition >= startPosition);
src\Framework\MS\Internal\PtsHost\FloaterBaseParagraph.cs (1)
130Debug.Assert(false, "Tight wrap is not currently supported.");
src\Framework\MS\Internal\PtsHost\FloaterParaClient.cs (4)
462Debug.Assert(visualChildren.Count == 1 && visualChildren[0] is ContainerVisual); 483Debug.Assert(fskupd != PTS.FSKUPDATE.fskupdNoChange); 497Debug.Assert(visualChildren.Count == 1 && visualChildren[0] is SectionVisual); 685Debug.Assert(arrayColumnDesc.Length == 1);
src\Framework\MS\Internal\PtsHost\FloaterParagraph.cs (5)
264Debug.Assert(pmcsclientOut == IntPtr.Zero); 519Debug.Assert(pmcsclientOut == IntPtr.Zero); 538Debug.Assert(pmcsclientOut == IntPtr.Zero); 624Debug.Assert(ParagraphEndCharacterPosition >= startPosition); 852Debug.Assert(false, "Unknown type of anchor.");
src\Framework\MS\Internal\PtsHost\FlowDocumentPage.cs (8)
324Debug.Assert(child != null); 474Debug.Assert(pageDetails.u.complex.cSections == 1); // Only one section is supported right now. 490Debug.Assert(sectionDetails.u.withpagenotes.cEndnoteColumns == 0); // Footnotes are not supported yet. 494Debug.Assert(sectionDetails.u.withpagenotes.cSegmentDefinedColumnSpanAreas == 0); 495Debug.Assert(sectionDetails.u.withpagenotes.cHeightDefinedColumnSpanAreas == 0); 532Debug.Assert(false); // Complex columns are not supported yet. 954Debug.Assert(e != null); 957Debug.Assert(_structuralCache.TextContainer is TextContainer);
src\Framework\MS\Internal\PtsHost\Line.cs (6)
76Debug.Assert(_line != null, "Line has been already disposed."); 365Debug.Assert(!DoubleUtil.IsNaN(_trackWidth), "Track width must be set for measure pass."); 425Debug.Assert(DoubleUtil.GreaterThanOrClose(rect.Width, 0), "Negative inline object's width."); 681Debug.Assert(dcp >= 0 && (dcp + cch <= _line.Length)); 701Debug.Assert(cchGlyphRuns > 0 && glyphRunsCollection.Count > 0); 1027Debug.Assert(runBounds.Count == 1, "Expecting exactly one TextRunBounds for a single text position.");
src\Framework\MS\Internal\PtsHost\LineBase.cs (2)
151Debug.Assert(element != null, "Cannot use ITextContainer that does not provide TextElement instances."); 273Debug.Assert(element != null, "Element should be here.");
src\Framework\MS\Internal\PtsHost\ListMarkerSourceInfo.cs (1)
349Debug.Assert(number >= 0 && number <= 9);
src\Framework\MS\Internal\PtsHost\PageVisual.cs (2)
76Debug.Assert(vc.Count <= 1); 82Debug.Assert(vc.Count <= 1);
src\Framework\MS\Internal\PtsHost\Pts.cs (4)
66Debug.Assert(ptsContext != null, "Null argument 'ptsContext' - required for return value validation."); 101Debug.Assert(ptsContext != null, "Null argument 'ptsContext' - required for return value validation."); 168Debug.Assert(false); 218Debug.Assert(false, "Unknown WrapDirection value.");
src\Framework\MS\Internal\PtsHost\PtsHelper.cs (3)
652Debug.Assert(sectionDetails.u.withpagenotes.cSegmentDefinedColumnSpanAreas == 0); 653Debug.Assert(sectionDetails.u.withpagenotes.cHeightDefinedColumnSpanAreas == 0); 1008Debug.Assert(cColumns > 0, "At least one column is required.");
src\Framework\MS\Internal\PtsHost\PtsHost.cs (24)
421Debug.Assert(cnms == 1); // Only one section is supported right now. 617Debug.Assert(false, "PTS.GetSegmentDefinedColumnSpanAreaInfo is not implemented."); 633Debug.Assert(false, "PTS.GetHeightDefinedColumnSpanAreaInfo is not implemented."); 921Debug.Assert(false, "PTS.GetNumberEndnoteColumns is not implemented."); 937Debug.Assert(false, "PTS.GetEndnoteColumnInfo is not implemented."); 948Debug.Assert(false, "PTS.GetFootnoteSeparators is not implemented."); 957Debug.Assert(false, "PTS.FFootnoteBeneathText is not implemented."); 966Debug.Assert(false, "PTS.GetNumberFootnoteColumns is not implemented."); 982Debug.Assert(false, "PTS.GetFootnoteColumnInfo is not implemented."); 991Debug.Assert(false, "PTS.GetFootnoteSegment is not implemented."); 1009Debug.Assert(false, "PTS.GetFootnotePresentationAndRejectionOrder is not implemented."); 1018Debug.Assert(false, "PTS.FAllowFootnoteSeparation is not implemented."); 1326Debug.Assert(false, "PTS.GetFootnotes is not implemented."); 1345Debug.Assert(false, "PTS.FormatDropCap is not implemented."); 1367Debug.Assert(false, "PTS.GetDropCapPolygons is not implemented."); 1375Debug.Assert(false, "PTS.DestroyDropCap is not implemented."); 1791Debug.Assert(false, "PTS.SnapGridVertical is not implemented."); 1892Debug.Assert(false, "PTS.UpdGetDropCapChange is not implemented."); 2001Debug.Assert(false, "PTS.GetOptimalLineDcpCache is not implemented."); 2701Debug.Assert(false); 3140Debug.Assert(false, "PTS.ObjGetFootnoteInfo is not implemented."); 3150Debug.Assert(false); 3384Debug.Assert(false); 3500Debug.Assert(false);
src\Framework\MS\Internal\PtsHost\PtsPage.cs (12)
181Debug.Assert(breakRecord == null || !_section.StructuralCache.DestroyStructure, "Cannot format from dirty break record unless StructuralCache.DestroyStructure is not set."); 1016Debug.Assert(sectionDetails.u.withpagenotes.cSegmentDefinedColumnSpanAreas == 0); 1017Debug.Assert(sectionDetails.u.withpagenotes.cHeightDefinedColumnSpanAreas == 0); 1070Debug.Assert(sectionDetails.u.withpagenotes.cSegmentDefinedColumnSpanAreas == 0); 1071Debug.Assert(sectionDetails.u.withpagenotes.cHeightDefinedColumnSpanAreas == 0); 1157Debug.Assert(visualChildren.Count == 1 && visualChildren[0] is ContainerVisual); 1246Debug.Assert(sectionDetails.u.withpagenotes.cSegmentDefinedColumnSpanAreas == 0); 1247Debug.Assert(sectionDetails.u.withpagenotes.cHeightDefinedColumnSpanAreas == 0); 1469Debug.Assert(sectionDetails.u.withpagenotes.cSegmentDefinedColumnSpanAreas == 0); 1470Debug.Assert(sectionDetails.u.withpagenotes.cHeightDefinedColumnSpanAreas == 0); 1536Debug.Assert(sectionDetails.u.withpagenotes.cSegmentDefinedColumnSpanAreas == 0); 1537Debug.Assert(sectionDetails.u.withpagenotes.cHeightDefinedColumnSpanAreas == 0);
src\Framework\MS\Internal\PtsHost\RowParagraph.cs (3)
206Debug.Assert(cCells == Row.FormatCellCount); 275Debug.Assert (_spannedCells[j] != null); 294Debug.Assert(Row.Index - cell.RowIndex + 1 == cell.RowSpan);
src\Framework\MS\Internal\PtsHost\SubpageParaClient.cs (3)
383Debug.Assert(visualChildren.Count == 1 && visualChildren[0] is ContainerVisual); 404Debug.Assert(fskupd != PTS.FSKUPDATE.fskupdNoChange); 418Debug.Assert(visualChildren.Count == 1 && visualChildren[0] is SectionVisual);
src\Framework\MS\Internal\PtsHost\SubpageParagraph.cs (4)
214Debug.Assert(fSuppressTopSpace == 1, "Top space should be always suppressed at the top of broken paragraph."); 482Debug.Assert(pmcsclientOut == IntPtr.Zero); 650Debug.Assert(pmcsclientOut == IntPtr.Zero); 698Debug.Assert(ParagraphEndCharacterPosition >= startPosition);
src\Framework\MS\Internal\PtsHost\TableParaClient.cs (24)
77Debug.Assert( Table != null 349Debug.Assert( TableParagraph.Table != null 398Debug.Assert( TableParagraph.Table != null 475Debug.Assert(TableParagraph.Table != null 656Debug.Assert( TableParagraph.Table != null 888Debug.Assert( TableParagraph.Table != null 965Debug.Assert( TableParagraph.Table != null 1025Debug.Assert( TableParagraph.Table != null 1112Debug.Assert( TableParagraph.Table != null 1213Debug.Assert( TableParagraph.Table != null 1241Debug.Assert(false); 1263Debug.Assert(Table != null); 1289Debug.Assert(Table != null); 1481Debug.Assert(TableParagraph == (TableParagraph)(PtsContext.HandleToObject(tableObjDetails.fsnmTable))); 1511Debug.Assert(tableDetails.cRows == cRowsActual); 1565Debug.Assert(tableRowDetails.cCells == cCellsActual); 1699Debug.Assert( cellParaClient.Visual != null 1833Debug.Assert( cellParaClient.Visual != null 2100Debug.Assert(false, "Unsupported unit type"); 2168Debug.Assert(_calculatedColumns[i].UserWidth.GridUnitType == GridUnitType.Auto || _calculatedColumns[i].UserWidth.GridUnitType == GridUnitType.Star || _calculatedColumns[i].UserWidth.GridUnitType == GridUnitType.Pixel, "Unexpected GridUnitType"); 2171Debug.Assert(0 <= _calculatedColumns[i].DurMinWidth && 0 <= _calculatedColumns[i].DurMaxWidth); 2226Debug.Assert(0 < iP || DoubleUtil.IsZero(iP)); 2496Debug.Assert(_calculatedColumns[i].UserWidth.IsAbsolute); 2520Debug.Assert(_calculatedColumns[i].DurMinWidth <= _calculatedColumns[i].DurMaxWidth);
src\Framework\MS\Internal\PtsHost\TableParagraph.cs (3)
320Debug.Assert(Table.RowGroups.Count > 0); 336Debug.Assert(currentRowGroup.Rows[nextRowIndex].Index != -1, 353Debug.Assert(Rows[0].Index != -1,
src\Framework\MS\Internal\PtsHost\TextFormatterHost.cs (6)
46Debug.Assert(Context != null, "TextFormatter host is not initialized."); 47Debug.Assert(textSourceCharacterIndex >= 0, "Character index must be non-negative."); 62Debug.Assert(Context != null, "TextFormatter host is not initialized."); 63Debug.Assert(textSourceCharacterIndexLimit >= 0, "Character index must be non-negative."); 76Debug.Assert(Context != null, "TextFormatter host is not initialized."); 77Debug.Assert(textSourceCharacterIndex>= 0, "Character index must be non-negative.");
src\Framework\MS\Internal\PtsHost\TextParaClient.cs (42)
149Debug.Assert(textDetails.fsktd == PTS.FSKTEXTDETAILS.fsktdCached); 150Debug.Assert(false, "Should not get here. ParaCache is not currently used."); 186Debug.Assert(!((TextParagraph) Paragraph).HasFiguresFloatersOrInlineObjects()); 266Debug.Assert(textDetails.fsktd == PTS.FSKTEXTDETAILS.fsktdCached); 267Debug.Assert(false, "Should not get here. ParaCache is not currently used."); 298Debug.Assert(Paragraph.Element as ContentElement != e); 366Debug.Assert(textDetails.fsktd == PTS.FSKTEXTDETAILS.fsktdCached); 367Debug.Assert(false, "Should not get here. ParaCache is not currently used."); 428Debug.Assert(textDetails.fsktd == PTS.FSKTEXTDETAILS.fsktdCached); 429Debug.Assert(false, "Should not get here. ParaCache is not currently used."); 819Debug.Assert(textDetails.fsktd == PTS.FSKTEXTDETAILS.fsktdCached); 820Debug.Assert(false, "Should not get here. ParaCache is not currently used."); 909Debug.Assert(textDetails.fsktd == PTS.FSKTEXTDETAILS.fsktdCached); 910Debug.Assert(false, "Should not get here. ParaCache is not currently used."); 951Debug.Assert(position is TextPointer); 982Debug.Assert(textDetails.fsktd == PTS.FSKTEXTDETAILS.fsktdCached); 983Debug.Assert(false, "Should not get here. ParaCache is not currently used."); 1011Debug.Assert(position is TextPointer); 1042Debug.Assert(textDetails.fsktd == PTS.FSKTEXTDETAILS.fsktdCached); 1043Debug.Assert(false, "Should not get here. ParaCache is not currently used."); 1218Debug.Assert(textDetails.fsktd == PTS.FSKTEXTDETAILS.fsktdCached); 1219Debug.Assert(false, "Should not get here. ParaCache is not currently used."); 1551Debug.Assert(textDetails.fsktd == PTS.FSKTEXTDETAILS.fsktdCached); 1552Debug.Assert(false, "Should not get here. ParaCache is not currently used."); 1575Debug.Assert(!PTS.ToBoolean(textDetails.fLinesComposite)); 1655Debug.Assert(insertionIndex >= 0 && insertionIndex <= lineVisuals.Count); 2855Debug.Assert(index > 0); 2989Debug.Assert(index == 0); 2990Debug.Assert(elIndex == 0); 3004Debug.Assert(index > 0); 3029Debug.Assert(elIndex == arrayLineElement.Length - 1); 3030Debug.Assert(index == arrayLineDesc.Length - 1); 3154Debug.Assert(index > 0); 3202Debug.Assert(backspaceCaretPosition != null); 3255Debug.Assert(index == 0); 3256Debug.Assert(elIndex == 0); 3270Debug.Assert(index > 0); 3634Debug.Assert(!PTS.ToBoolean(textDetails.fLinesComposite)); 3752Debug.Assert(_lineIndexFirstVisual == lineIndexFirstVisible); 3781Debug.Assert(visualChildren.Count == (lineIndexFirstInvisible - lineIndexFirstVisible)); 4218Debug.Assert(localEnd > localStart); 4432Debug.Assert(localEnd > localStart);
src\Framework\MS\Internal\PtsHost\TextParagraph.cs (1)
160Debug.Assert(iArea == 0);
src\Framework\MS\Internal\PtsHost\TextParaLineResult.cs (4)
61Debug.Assert(false); 77Debug.Assert(false); 90Debug.Assert(false); 106Debug.Assert(false);
src\Framework\MS\Internal\PtsHost\UpdateRecord.cs (1)
45Debug.Assert(Next != null); // This is the last UR, cannot merge with next.
src\Framework\MS\Internal\PtsTable\CalculatedColumn.cs (1)
58Debug.Assert(0 <= durMinWidth && durMinWidth <= durMaxWidth);
src\Framework\MS\Internal\PtsTable\RowSpanVector.cs (5)
145Debug.Assert(0 <= _index && _index < _size); 153Debug.Assert(0 <= _index && _index < _size); 186Debug.Assert(_entries[i].Cell != null); 187Debug.Assert(i >= j); 253Debug.Assert( _entries.Length > 0
src\Framework\MS\Internal\SystemDataHelper.cs (1)
88Debug.Assert(false, "Could not find Null field or property for SqlNullable type");
src\Framework\MS\Internal\Text\ComplexLine.cs (12)
72Debug.Assert(run != null, "TextRun has not been created."); 73Debug.Assert(run.Length > 0, "TextRun has to have positive length."); 88Debug.Assert(dcp >= 0); 163Debug.Assert(runs != null, "Cannot retrieve runs collection."); 186Debug.Assert(DoubleUtil.GreaterThanOrClose(rect.Width, 0), "Negative inline object's width."); 238Debug.Assert(runs != null, "Cannot retrieve runs collection."); 343Debug.Assert(position.GetPointerContext(LogicalDirection.Forward) == TextPointerContext.Text, "TextPointer does not point to characters."); 391Debug.Assert(position.GetPointerContext(LogicalDirection.Forward) == TextPointerContext.ElementStart, "TextPointer does not point to element start edge."); 397Debug.Assert(element != null, "Cannot use ITextContainer that does not provide TextElement instances."); 483Debug.Assert(position.GetPointerContext(LogicalDirection.Forward) == TextPointerContext.ElementEnd, "TextPointer does not point to element end edge."); 488Debug.Assert(element != null, "Element should be here."); 533Debug.Assert(position.GetPointerContext(LogicalDirection.Forward) == TextPointerContext.EmbeddedElement, "TextPointer does not point to embedded object.");
src\Framework\MS\Internal\Text\DynamicPropertyReader.cs (5)
47Debug.Assert(element != null); 59Debug.Assert(element != null); 77Debug.Assert(element != null); 236Debug.Assert(element != null); 261Debug.Assert(!position.IsNull);
src\Framework\MS\Internal\Text\Line.cs (7)
119Debug.Assert(_line != null, "Rendering line that has not been measured yet."); 126Debug.Assert(line.HasCollapsed, "Line has not been collapsed"); 319Debug.Assert(collapsedLine.HasCollapsed, "Line has not been collapsed"); 323Debug.Assert(collapsedRanges.Count == 1, "Multiple collapsed ranges are not supported."); 355Debug.Assert(collapsedLine.HasCollapsed, "Line has not been collapsed"); 486Debug.Assert(runBounds.Count == 1, "Expecting exactly one TextRunBounds for a single text position."); 509Debug.Assert(paraProperties.TextTrimming != TextTrimming.None, "Text trimming must be enabled.");
src\Framework\MS\Internal\Text\LineMetrics.cs (2)
119get { Debug.Assert((_packedData & HasBeenUpdatedMask) != 0); return _width; } 134get { Debug.Assert((_packedData & HasBeenUpdatedMask) != 0); return _start; }
src\Framework\MS\Internal\Text\SimpleLine.cs (3)
42Debug.Assert(dcp >= 0, "Character index must be non-negative."); 82Debug.Assert(dcp >= 0, "Character index must be non-negative."); 133Debug.Assert(content != null);
src\Framework\MS\Internal\Text\TextLineResult.cs (4)
61Debug.Assert(false); 73Debug.Assert(false); 84Debug.Assert(false); 96Debug.Assert(false);
src\Framework\MS\Internal\Text\TextProperties.cs (1)
264Debug.Assert(element != null);
src\Framework\MS\Internal\Text\TypographyProperties.cs (3)
110Debug.Assert((uint)PropertyId.PropertyCount <= 32); 783Debug.Assert((uint)propertyId < (uint)PropertyId.PropertyCount, "Invalid typography property id"); 799Debug.Assert((uint)propertyId < (uint)PropertyId.PropertyCount, "Invalid typography property id");
src\Framework\MS\Internal\Utility\SponsorHelper.cs (1)
33Debug.Assert(lease != null && timespan != null, "Lease and TimeSpan arguments cannot be null");
src\Framework\MS\Internal\WeakHashtable.cs (1)
59Debug.Assert(!key.GetType().IsValueType, "WeakHashtable doesn't support value-type keys. Use WeakObjectHashtable instead.");
src\Framework\MS\Win32\UxThemeWrapper.cs (1)
408Debug.Assert(themeState.IsActive, "Queried ThemeColor while UxTheme is not active.");
src\Framework\System\Windows\Annotations\AnnotationHelper.cs (1)
646Debug.Assert((textSegments != null) && (textSegments.Count > 0), "Invalid selection TextSegments");
src\Framework\System\Windows\Annotations\Storage\XmlStreamStore.cs (2)
868Debug.Assert(knownNamespace != null, "null knownNamespace"); 887Debug.Assert(name != null, "null compatible namespace");
src\Framework\System\Windows\Application.cs (10)
142Debug.Assert(_appInstance == null, "_appInstance must be null here."); 638Debug.Assert(stream != null, "stream should not be null."); 639Debug.Assert(pc != null, "pc should not be null."); 842Debug.Assert( ((stream != null) && (sooPart == null)) != true, "When stream is not null, sooPart cannot be null either"); 1638Debug.Assert(CheckAccess(), "This should only be called on the Application thread"); 1703Debug.Assert(CheckAccess() == true, "DoShutdown can only be called on the Dispatcer thread"); 1888Debug.Assert(ihs != null, "IHostService in RootBrowserWindow cannot be null"); 1890Debug.Assert(appWin != null, "appWin must be non-null"); 1891Debug.Assert(appWin is RootBrowserWindow, "appWin must be a RootBrowserWindow"); 2258Debug.Assert(!uri.IsAbsoluteUri || BaseUriHelper.IsPackApplicationUri(uri));
src\Framework\System\Windows\Automation\Peers\DataGridAutomationPeer.cs (1)
203Debug.Assert(false);
src\Framework\System\Windows\Automation\Peers\DateTimeAutomationPeer.cs (1)
672Debug.Assert((int)owningButton.GetValue(Grid.RowProperty) > 0);
src\Framework\System\Windows\Automation\Peers\ItemAutomationPeer.cs (1)
657System.Diagnostics.Debug.Assert(Object.Equals(item, Item), "ItemPeer reuse for an unequal item is not supported");
src\Framework\System\Windows\Automation\Peers\ItemsControlAutomationPeer.cs (1)
647Debug.Assert(false,"it must not add already present Item");
src\Framework\System\Windows\BroadcastEventHelper.cs (9)
22Debug.Assert(d is FrameworkElement || d is FrameworkContentElement); 43Debug.Assert(d is FrameworkElement || d is FrameworkContentElement); 47Debug.Assert(loadedPending.Length == 3); 70Debug.Assert(d is FrameworkElement || d is FrameworkContentElement); 91Debug.Assert(d is FrameworkElement || d is FrameworkContentElement); 95Debug.Assert(unloadedPending.Length == 3); 168Debug.Assert(loadedPending != null && loadedPending.Length == 3, 205Debug.Assert(unloadedPending != null && unloadedPending.Length == 3, 511Debug.Assert( fo.IsFE );
src\Framework\System\Windows\Controls\AVElementHelper.cs (1)
65Debug.Assert((element != null), "Element is null");
src\Framework\System\Windows\Controls\Calendar.cs (14)
214Debug.Assert(c != null); 270Debug.Assert(c != null); 331Debug.Assert(c != null); 388Debug.Assert(c != null); 419Debug.Assert(false); 546Debug.Assert(c != null); 632Debug.Assert(c != null); 930Debug.Assert(false); 949Debug.Assert(false); 989Debug.Assert(false); 1022Debug.Assert(false); 1094Debug.Assert(false); 1196Debug.Assert(this.DisplayMode == CalendarMode.Year); 1209Debug.Assert(this.DisplayMode == CalendarMode.Decade);
src\Framework\System\Windows\Controls\CalendarBlackoutDatesCollection.cs (2)
116Debug.Assert(dayInterval != 0); 333Debug.Assert(day != null);
src\Framework\System\Windows\Controls\ComboBox.cs (5)
642Debug.Assert(_editableTextBoxSite == sender); 1215Debug.Assert(_autoScrollTimer == null, "IsMouseCaptured went from true to true"); 1575Debug.Assert((increment > 0 && startIndex <= stopIndex) || (increment < 0 && startIndex >= stopIndex), "Infinite loop detected"); 1738Debug.Assert(!comboBox.CheckAccess() || Mouse.Captured != comboBox, "On the dispatcher thread, ComboBox should not have capture after closing the dropdown"); 1786Debug.Assert(!CheckAccess() || Mouse.Captured != this, "On the dispatcher thread, ComboBox should not have capture after closing the dropdown");
src\Framework\System\Windows\Controls\ContentPresenter.cs (3)
1016Debug.Assert(tc.CanConvertTo(typeof(UIElement))); 1087Debug.Assert(!(content is String) && !(content is UIElement)); // these are handled by different templates 1126Debug.Assert(!(tc != null && tc.CanConvertTo(typeof(UIElement)))); // this is handled by a different template
src\Framework\System\Windows\Controls\ContextMenu.cs (1)
493Debug.Assert(_parentPopup == null, "_parentPopup should be null");
src\Framework\System\Windows\Controls\DataGrid.cs (17)
1653Debug.Assert(info != null, "info is null."); 1654Debug.Assert(column != null, "column is null."); 1763Debug.Assert(_isDraggingSelection, "DoAutoScroll should only be called when dragging selection."); 3574Debug.Assert(CanUserAddRows, "AddNewItem called when the end-user cannot add new rows."); 3575Debug.Assert(!IsAddingNewItem, "AddNewItem called when a pending add is taking place."); 5288Debug.Assert(!IsUpdatingSelectedCells); 5294Debug.Assert(IsUpdatingSelectedCells); 5375Debug.Fail("Unknown SelectionUnit encountered."); 6422Debug.Assert(RelativeMousePosition != RelativeMousePositions.Over, "The mouse is not supposed to be over the DataGrid."); 7139Debug.Assert(sortColumn != null, "column should not be null"); 7297Debug.Assert(e.NewItems.Count == 1, "SortDescriptionCollection should handle one element at a time"); 7308Debug.Assert(e.OldItems.Count == 1, "SortDescriptionCollection should handle one element at a time"); 7328Debug.Assert(e.OldItems.Count == 1 && e.NewItems.Count == 1, "SortDescriptionCollection should handle one element at a time"); 7442Debug.Assert(e.NewItems.Count == 1, "GroupDescriptionCollection should handle one element at a time"); 7450Debug.Assert(e.OldItems.Count == 1, "GroupDescriptionCollection should handle one element at a time"); 7461Debug.Assert(e.OldItems.Count == 1 && e.NewItems.Count == 1, "GroupDescriptionCollection should handle one element at a time"); 7887Debug.Assert(dataGrid != null || columnCollection != null, "Both dataGrid and columnCollection cannot not be null at the same time");
src\Framework\System\Windows\Controls\DataGridAutoGeneratingColumnEventArgs.cs (1)
111Debug.Assert(
src\Framework\System\Windows\Controls\DataGridCell.cs (5)
92Debug.Assert(_owner == null || _owner == ownerRow, "_owner should be null before PrepareCell is called or the same value as the ownerRow."); 140Debug.Assert(_owner == ownerRow, "_owner should be the same as the DataGridRow that is clearing the cell."); 579Debug.Assert(!IsEditing, "Should not call BeginEdit when IsEditing is true."); 595Debug.Assert(IsEditing, "Should not call CancelEdit when IsEditing is false."); 609Debug.Assert(IsEditing, "Should not call CommitEdit when IsEditing is false.");
src\Framework\System\Windows\Controls\DataGridCellInfo.cs (9)
66Debug.Assert(item != null, "item should not be null."); 67Debug.Assert(column != null, "column should not be null."); 68Debug.Assert(owner != null, "owner should not be null."); 77Debug.Assert(info != null, "item should not be null."); 78Debug.Assert(column != null, "column should not be null."); 79Debug.Assert(owner != null, "owner should not be null."); 91Debug.Assert(item == DependencyProperty.UnsetValue, "This should only be used to make an Unset CellInfo."); 117Debug.Assert(owner != null, "owner should not be null."); 129Debug.Assert(owner != null, "owner should not be null.");
src\Framework\System\Windows\Controls\DataGridCellsPanel.cs (18)
174Debug.Assert(blockList != null, "RealizedColumnsBlockList shouldn't be null at this point."); 641Debug.Assert(!children.Contains(child), "we incorrectly identified a recycled container"); 656Debug.Assert(child == InternalChildren[childIndex], "Wrong child was generated"); 686Debug.Assert(container != null, "Null container was generated"); 722Debug.Assert(children[visualTreeIndex] != null, "MoveVisualChild interprets a null destination as 'move to end'"); 783Debug.Assert(false, "We should have found a child"); 1078Debug.Assert(columnIndex < columnCount, "columnIndex should be less than column count"); 1153Debug.Assert(startIndex >= 0); 1154Debug.Assert(children == _realizedChildren, "the given child list must be the _realizedChildren list when recycling"); 1345Debug.Assert( 1351Debug.Assert( 1428Debug.Assert(i >= arrangeState.FrozenColumnCount, "Frozen cells should have been realized or not visible"); 1462Debug.Assert(child != null, "child cannot be null."); 1477Debug.Assert(cell.Column != null, "column cannot be null."); 1582Debug.Assert(children.Count > blockElementCount, "Element count from blocks can't be less than total children count"); 1623Debug.Assert(columnIndex <= block.EndIndex, "Missing children for index in block list"); 1985Debug.Assert(ParentDataGrid != null, "ParentDataGrid should not be null"); 2103Debug.Assert((itemCount == itemUICount) || (itemUICount == 0), "Both ItemUICount and ItemCount should be equal or ItemUICount should be 0.");
src\Framework\System\Windows\Controls\DataGridColumn.cs (3)
596Debug.Assert(Width.IsStar); 909Debug.Assert(d is DataGridColumn, "d should be a DataGridColumn"); 1164Debug.Assert(itemProperty != null && itemProperty.PropertyType != null, "itemProperty and/or its PropertyType member cannot be null");
src\Framework\System\Windows\Controls\DataGridColumnCollection.cs (18)
26Debug.Assert(dataGridOwner != null, "We should have a valid DataGrid"); 233Debug.Assert(displayIndex >= 0 && displayIndex < DisplayIndexMap.Count, "displayIndex should have already been validated"); 331Debug.Assert(newDisplayIndex >= 0 && newDisplayIndex < Count, "The new DisplayIndex should have already been validated"); 364Debug.Assert(oldDisplayIndex != newDisplayIndex, "A column's display index must have changed for us to call OnColumnDisplayIndexChanged"); 365Debug.Assert(oldDisplayIndex >= 0 && oldDisplayIndex < Count, "The old DisplayIndex should be valid"); 416Debug.Assert( 419Debug.Assert(IsUpdatingDisplayIndex == false, "We don't add new columns as part of a display index update operation"); 476Debug.Assert(DisplayIndexMap.Count == 0, "DisplayIndexMap should be empty until first measure call."); 549Debug.Assert(assignedDisplayIndexMap.ContainsKey(displayIndex)); 560Debug.Assert( 563Debug.Assert(IsUpdatingDisplayIndex == false, "We don't remove columns as part of a display index update operation"); 568Debug.Assert(DisplayIndexMap.Count > Count, "Columns were just removed: the display index map shouldn't have yet been updated"); 604Debug.Assert(oldColumns.Count == 1 && newColumns.Count == 1, "Multi replace isn't possible with ObservableCollection"); 693Debug.Assert(removedDisplayIndex >= 0); 732Debug.Assert(Count == DisplayIndexMap.Count, "Display Index map is of the wrong size"); 735Debug.Assert(DisplayIndexMap[i] >= 0 && DisplayIndexMap[i] < Count, "DisplayIndex map entry doesn't point to a valid column"); 736Debug.Assert(ColumnFromDisplayIndex(i).DisplayIndex == i, "DisplayIndex map doesn't match column indices"); 903Debug.Assert(
src\Framework\System\Windows\Controls\DataGridColumnHeaderCollection.cs (2)
51Debug.Assert(e.Property == DataGridColumn.HeaderProperty, "We only want to know about the header property changing"); 52Debug.Assert(_columns.Contains(column));
src\Framework\System\Windows\Controls\DataGridHelper.cs (2)
244Debug.Assert((cell is DataGridCell) || (cell is DataGridColumnHeader), "provideColumn should be one of the cell or header containers."); 308Debug.Assert((cell is DataGridCell) || (cell is DataGridColumnHeader), "provideColumn should be one of the cell or header containers.");
src\Framework\System\Windows\Controls\DataGridHyperlinkColumn.cs (1)
295Debug.Assert(e.RoutedEvent == Keyboard.PreviewKeyDownEvent, "We should only reach here on the PreviewKeyDown event because the TextBox within is expected to handle the preview event and hence trump the successive KeyDown event.");
src\Framework\System\Windows\Controls\DataGridLengthConverter.cs (1)
275Debug.Assert(
src\Framework\System\Windows\Controls\DataGridRow.cs (3)
231Debug.Assert(stateCode != DATAGRIDROW_stateNullCode); 444Debug.Assert(_owner == null || _owner == owningDataGrid, "_owner should be null before PrepareRow is called or the same as the owningDataGrid."); 485Debug.Assert(_owner == owningDataGrid, "_owner should be the same as the DataGrid that is clearing the row.");
src\Framework\System\Windows\Controls\DataGridTextColumn.cs (1)
273Debug.Assert(e.RoutedEvent == Keyboard.PreviewKeyDownEvent, "We should only reach here on the PreviewKeyDown event because the TextBox within is expected to handle the preview event and hence trump the successive KeyDown event.");
src\Framework\System\Windows\Controls\DatePicker.cs (11)
210Debug.Assert(dp != null); 256Debug.Assert(dp != null); 321Debug.Assert(dp != null); 339Debug.Assert(dp != null); 366Debug.Assert(dp != null); 427Debug.Assert(dp != null); 523Debug.Assert(dp != null); 575Debug.Assert(dp != null); 943Debug.Assert(c != null); 944Debug.Assert(args != null); 966Debug.Assert(e.AddedItems.Count < 2);
src\Framework\System\Windows\Controls\DateTimeHelper.cs (1)
181Debug.Assert(DateTime.Compare(start, end) < 1);
src\Framework\System\Windows\Controls\DefinitionBase.cs (6)
333Debug.Assert(value >= -1 && _parentIndex != value); 716Debug.Assert(sharedSizeGroup != null); 732Debug.Assert(_registry.Contains(key)); 749Debug.Assert(sharedSizeScope != null && sharedSizeGroupId != null); 762Debug.Assert(!_registry.Contains(member)); 846Debug.Assert( _userSize.GridUnitType == GridUnitType.Auto
src\Framework\System\Windows\Controls\Frame.cs (22)
473Debug.Assert(_ownJournalScope != null); 477Debug.Fail("UsesOwnJournal->Automatic transition should be blocked by CoerceJournalOwnership()."); 485Debug.Assert(_ownJournalScope == null); 527Debug.Assert(_journalOwnership == (JournalOwnership)GetValue(JournalOwnershipProperty)); 651Debug.Assert(sender == this && _ownJournalScope != null); 657Debug.Assert(sender == this && _ownJournalScope != null); 664Debug.Assert(sender == this && _ownJournalScope != null); 670Debug.Assert(sender == this && _ownJournalScope != null); 677Debug.Assert(sender == this && _ownJournalScope != null); 696Debug.Assert(sender == this && _ownJournalScope != null); 701Debug.Assert(sender == this && _ownJournalScope != null); 708Debug.Assert(sender == this && _ownJournalScope != null); 771Debug.Assert(d as Frame != null && ((Frame)d).NavigationService != null); 844Debug.Assert(canGoFwd == (bool)GetValue(CanGoForwardProperty)); 859Debug.Assert(canGoBack == (bool)GetValue(CanGoBackProperty)); 1018Debug.Assert(backStack == GetValue(BackStackProperty)); 1030Debug.Assert(fwdStack == GetValue(ForwardStackProperty)); 1192Debug.Assert(GetValue(BackStackProperty) == _ownJournalScope.BackStack); 1235Debug.Assert(JournalEntry.GetType().IsSerializable); 1265Debug.Assert(_journalOwnership == JournalOwnership.OwnsJournal); 1361Debug.Assert(_ownJournalScope == null ^ _journalOwnership == JournalOwnership.OwnsJournal); 1394Debug.Assert(_ownJournalScope == null ^ _journalOwnership == JournalOwnership.OwnsJournal);
src\Framework\System\Windows\Controls\Grid.cs (22)
486Debug.Assert(DefinitionsU.Length > 0 && DefinitionsV.Length > 0); 746Debug.Assert(DefinitionsU.Length > 0 && DefinitionsV.Length > 0); 994Debug.Assert(0 <= cell.ColumnIndex && cell.ColumnIndex < DefinitionsU.Length); 995Debug.Assert(0 <= cell.RowIndex && cell.RowIndex < DefinitionsV.Length); 1093Debug.Assert(ExtData.DefinitionsU != null && ExtData.DefinitionsU.Length > 0); 1140Debug.Assert(ExtData.DefinitionsV != null && ExtData.DefinitionsV.Length > 0); 1188Debug.Assert(false); 1454Debug.Assert(0 < count && 0 <= start && (start + count) <= definitions.Length); 1481Debug.Assert(0 < count && 0 <= start && (start + count) <= definitions.Length); 1509Debug.Assert(1 < count && 0 <= start && (start + count) <= definitions.Length); 1542Debug.Assert( minSize <= preferredSize 1573Debug.Assert(tempDefinitions[i].UserSize.IsAuto); 1582Debug.Assert(!tempDefinitions[i].UserSize.IsAuto); 1590Debug.Assert(_IsZero(sizeToDistribute)); 1610Debug.Assert(!tempDefinitions[i].UserSize.IsAuto); 1621Debug.Assert(tempDefinitions[i].UserSize.IsAuto); 1630Debug.Assert(_IsZero(sizeToDistribute)); 1651Debug.Assert( !double.IsInfinity(totalRemainingSize) 2160Debug.Assert(!definitions[i].IsShared || !definitions[i].UserSize.IsStar); 2234Debug.Assert(nonStarIndex == starDefinitionsCount); 2453Debug.Assert(!def.IsShared, "*-defs cannot be shared"); 4109Debug.Assert(grid != null);
src\Framework\System\Windows\Controls\GridSplitter.cs (4)
425Debug.Assert(_decorator != null); 448Debug.Assert(_decorator != null); 637Debug.Assert(_resizeData == null, "_resizeData is not null, DragCompleted was not called"); 871Debug.Assert(_resizeData != null, "_resizeData should not be null when calling MoveSplitter");
src\Framework\System\Windows\Controls\GridViewColumn.cs (1)
428Debug.Assert(false, "Invalid value for ActualWidth.");
src\Framework\System\Windows\Controls\GridViewColumnCollection.cs (3)
145Debug.Assert(IsImmutable != true, "IsImmutable is true before BlockWrite"); 154Debug.Assert(IsImmutable != false, "IsImmutable is flase before UnblockWrite"); 245Debug.Assert(oldIndex != newIndex, "oldIndex==newIndex when perform move action.");
src\Framework\System\Windows\Controls\GridViewColumnCollectionChangedEventArgs.cs (12)
50Debug.Assert(action == NotifyCollectionChangedAction.Add || action == NotifyCollectionChangedAction.Remove, 52Debug.Assert(changedItem != null, "changedItem can't be null"); 53Debug.Assert(index >= 0, "index must >= 0"); 54Debug.Assert(actualIndex >= 0, "actualIndex must >= 0"); 65Debug.Assert(newItem != null, "newItem can't be null"); 66Debug.Assert(oldItem != null, "oldItem can't be null"); 67Debug.Assert(index >= 0, "index must >= 0"); 68Debug.Assert(actualIndex >= 0, "actualIndex must >= 0"); 79Debug.Assert(changedItem != null, "changedItem can't be null"); 80Debug.Assert(index >= 0, "index must >= 0"); 81Debug.Assert(oldIndex >= 0, "oldIndex must >= 0"); 82Debug.Assert(actualIndex >= 0, "actualIndex must >= 0");
src\Framework\System\Windows\Controls\GridViewColumnHeader.cs (4)
297Debug.Assert(false, "Method ShouldSerializeProperty is called on an internally generated GridViewColumnHeader."); 434Debug.Assert(flag != Flags.None && ignoreFlag != Flags.None, "Invalid parameter dp."); 775Debug.Assert(stream != null, "stream is null"); 816Debug.Assert(gripperCursor != null, "gripper cursor is null");
src\Framework\System\Windows\Controls\GridViewHeaderRowPresenter.cs (16)
306Debug.Assert(_paddingHeader != null, "padding header is null"); 316Debug.Assert(_indicator != null, "_indicator is null"); 317Debug.Assert(_floatingHeader != null, "_floatingHeader is null"); 390Debug.Assert(_paddingHeader != null, "padding header is null"); 459Debug.Assert(_draggingSrcHeader != null, "_draggingSrcHeader is null"); 642Debug.Assert(column != null); 860Debug.Assert(index >= 0 && index < InternalChildren.Count, "Error index when GetVisualIndex"); 943Debug.Assert(false, "Head is container for itself, but parent is neither GridViewHeaderRowPresenter nor null."); 993Debug.Assert(header != null || index != -1); 1077Debug.Assert(header != null); 1086Debug.Assert(header != null); 1195Debug.Assert(header != null, "Cannot instantiate GridViewColumnHeader in AddFloatingHeader"); 1208Debug.Assert(srcHeader != null, "srcHeader is null"); 1209Debug.Assert(_floatingHeader != null, "floating header is null"); 1375Debug.Assert(index >= 0 && index < HeadersPositionList.Count, "wrong index"); 1568Debug.Assert(Columns != null, "Columns is null in OnHeaderDragCompleted");
src\Framework\System\Windows\Controls\GridViewRowPresenter.cs (3)
289Debug.Assert(column != null); 582Debug.Assert(column != null, "column shouldn't be null"); 659Debug.Assert(cell is TextBlock, "cells are either TextBlocks or ContentPresenters");
src\Framework\System\Windows\Controls\InkCanvas.cs (18)
590Debug.Assert(e.Property == InkCanvas.RightProperty || e.Property == InkCanvas.BottomProperty, 1076Debug.Assert(e != null, "EventArg can not be null"); 1307Debug.Assert(e != null, "EventArg can not be null"); 1367Debug.Assert(e != null, "EventArg can not be null"); 1424Debug.Assert(e != null, "EventArg can not be null"); 1461Debug.Assert(e != null, "EventArg can not be null"); 1495Debug.Assert(e != null, "EventArg can not be null"); 1534Debug.Assert(e != null, "EventArg can not be null"); 1616Debug.Assert(e != null, "EventArg can not be null"); 1649Debug.Assert(e != null, "EventArg can not be null"); 1686Debug.Assert(e != null, "EventArg can not be null"); 1719Debug.Assert(e != null, "EventArg can not be null"); 2390System.Diagnostics.Debug.Assert(_dynamicallySelectedStrokes.Contains(s)); 2461Debug.Assert(strokes != null 2703System.Diagnostics.Debug.Assert(object.ReferenceEquals(sender, DefaultDrawingAttributes)); 2803Debug.Assert(removeSelectedStrokes || removeSelectedElements, "At least either Strokes or Elements should be removed!"); 2842Debug.Assert(inkCanvas != null); 2921Debug.Assert(inkCanvas != null);
src\Framework\System\Windows\Controls\InkPresenter.cs (5)
468Debug.Assert(newStrokes != null, "Cannot set a null to InkPresenter"); 491System.Diagnostics.Debug.Assert(sender == this.Strokes); 499Debug.Assert(addedStrokes != null, "The added StrokeCollection cannot be null."); 541System.Diagnostics.Debug.Assert(stroke != null); 550System.Diagnostics.Debug.Assert(stroke != null);
src\Framework\System\Windows\Controls\ItemCollection.cs (17)
733Debug.Assert(_deferLevel == 0 || _collectionView == null || _deferInnerRefresh != null); 736Debug.Assert(_deferLevel != 0 || _deferInnerRefresh == null); 1575Debug.Assert(_isInitializing == false); 1583Debug.Assert(_isInitializing == true); 1930Debug.Assert(sender == _collectionView); 1936Debug.Assert(sender == _collectionView); 1963Debug.Assert(_collectionView != null); 1974Debug.Assert(_collectionView == null || _deferInnerRefresh != null); 2204Debug.Assert(e.NewStartingIndex >= 0); 2215Debug.Assert(e.OldStartingIndex >= 0); 2223Debug.Assert(e.OldStartingIndex >= 0); 2233Debug.Assert(e.OldStartingIndex >= 0); 2313Debug.Assert(IsShapingActive, "Shaping storage not available"); 2350Debug.Assert(!value, "Shaping storage not available"); 2382Debug.Assert(IsShapingActive, "Shaping storage not available"); 2415Debug.Assert(IsShapingActive, "Shaping storage not available"); 2448Debug.Assert(IsShapingActive, "Shaping storage not available");
src\Framework\System\Windows\Controls\ItemContainerGenerator.cs (5)
288Debug.Assert(false, "Unexpected reentrant call to ICG.Remove"); 334Debug.Assert(!_recyclableContainers.Contains(container), "trying to add a container to the collection twice"); 2389Debug.Assert(ItemsControl.EqualsEx(item, ItemsInternal[index]), "Event contains the wrong index"); 2464Debug.Assert(false, "unexpected reentrant call to OnItemAdded"); 2652Debug.Assert(false, "unexpected reentrant call to OnItemMoved");
src\Framework\System\Windows\Controls\ItemsControl.cs (3)
2633Debug.Assert(ScrollHost != null, "This operation to adjust the offset along an edge is only possible when there is a ScrollHost available"); 2794Debug.Assert(direction == FocusNavigationDirection.Up || direction == FocusNavigationDirection.Down, "Can only get the first item on a page using North or South"); 3102Debug.Assert(direction == FocusNavigationDirection.Up ||
src\Framework\System\Windows\Controls\ListBox.cs (1)
578Debug.Assert(_autoScrollTimer == null, "IsMouseCaptured went from true to true");
src\Framework\System\Windows\Controls\MenuItem.cs (6)
1791Debug.Assert(IsSelected, "When IsSubmenuOpen = true, IsSelected should be true as well"); 1979Debug.Assert(IsHighlighted, "MenuItem got Key.Enter but was not highlighted -- focus did not follow highlight?"); 2249Debug.Assert(Role == MenuItemRole.TopLevelHeader || Role == MenuItemRole.TopLevelItem, "MenuItem was not top-level"); 2289Debug.Assert(!parentMenu.OpenOnMouseEnter || parentMenu.IsMenuMode, "OpenOnMouseEnter can only be true when IsMenuMode is true"); 2646Debug.Assert(timer != null, "timer should not be null."); 2647Debug.Assert(!timer.IsEnabled, "timer should not be running.");
src\Framework\System\Windows\Controls\MultipleCopiesCollection.cs (9)
33Debug.Assert(item != null, "item should not be null."); 34Debug.Assert(count >= 0, "count should not be negative."); 54Debug.Assert( 61Debug.Assert( 68Debug.Assert( 75Debug.Assert( 120Debug.Assert(RepeatCount == newCount, "We should have properly updated the RepeatCount"); 203Debug.Assert((index >= 0) && (index < RepeatCount), "Index out of range"); 294Debug.Assert(_item != null, "_item should be non-null.");
src\Framework\System\Windows\Controls\Page.cs (2)
758Debug.Assert( p != null, "DependencyObject must be of type Page." ); 803Debug.Assert(_currentIws != null, "_currentIws cannot be null here. Caller should always verify it");
src\Framework\System\Windows\Controls\Panel.cs (9)
580Debug.Assert(_itemContainerGenerator == null, "Attempted to connect to a generator when Panel._itemContainerGenerator is non-null."); 603Debug.Assert(_itemContainerGenerator != null, "Attempted to disconnect from a generator when Panel._itemContainerGenerator is null."); 624Debug.Assert(IsItemsHost, "Should be invoked only on an ItemsHost panel"); 684Debug.Assert(_itemContainerGenerator != null, "Encountered a null _itemContainerGenerator while receiving an ItemsChanged from a generator."); 723Debug.Assert(_itemContainerGenerator != null, "Encountered a null _itemContainerGenerator while receiving an Add action from a generator."); 752Debug.Assert(itemCount == containerCount, "Panel expects Replace to affect only realized containers"); 753Debug.Assert(_itemContainerGenerator != null, "Encountered a null _itemContainerGenerator while receiving an Replace action from a generator."); 763Debug.Assert(e != null && !isNewlyRealized, "Panel expects Replace to affect only realized containers"); 782Debug.Assert(_itemContainerGenerator != null, "Encountered a null _itemContainerGenerator while receiving an Move action from a generator.");
src\Framework\System\Windows\Controls\PasswordTextNavigator.cs (9)
34Debug.Assert(offset >= 0 && offset <= container.SymbolCount, "Bad PasswordTextPointer offset!"); 58Debug.Assert(!_isFrozen, "Can't reposition a frozen pointer!"); 303Debug.Assert(false); 429Debug.Assert(!_isFrozen, "Can't reposition a frozen pointer!"); 470Debug.Assert(!_isFrozen, "Can't reposition a frozen pointer!"); 476Debug.Assert(false, "Bad distance!"); 496Debug.Assert(!_isFrozen, "Can't reposition a frozen pointer!"); 514Debug.Assert(!_isFrozen, "Can't reposition a frozen pointer!"); 515Debug.Assert(false, "No scoping element!");
src\Framework\System\Windows\Controls\Primitives\BulletDecorator.cs (2)
155Debug.Assert(child1 != null, "First child should be non-null."); 156Debug.Assert(child2 != null, "Second child should be non-null.");
src\Framework\System\Windows\Controls\Primitives\CalendarItem.cs (11)
232Debug.Assert(false); 397Debug.Assert(mode != CalendarMode.Month); 469Debug.Assert(false); 551Debug.Assert(e != null); 569Debug.Assert(b != null); 685Debug.Assert(selectedDate != null); 930Debug.Assert(this.Owner.DisplayMode == CalendarMode.Year); 1060Debug.Assert(childButton != null); 1251Debug.Assert(childButton != null); 1298Debug.Assert(childButton != null); 1308Debug.Assert(this.Owner.DisplayDateInternal != null);
src\Framework\System\Windows\Controls\Primitives\DataGridCellsPresenter.cs (1)
355Debug.Assert(
src\Framework\System\Windows\Controls\Primitives\DataGridColumnHeader.cs (6)
109Debug.Assert(column != null, "This header must have been generated with for a particular column"); 110Debug.Assert(column.Header == item, "The data item for a ColumnHeader is the Header property of a column"); 329Debug.Assert(header != null, "Header should not be null"); 472Debug.Assert(Column != null, "column can't be null if we got a notification for this property change"); 482Debug.Assert(Column != null, "column can't be null if we got a notification for this property change"); 568Debug.Assert(Column != null, "column can't be null if we got a notification for this property change");
src\Framework\System\Windows\Controls\Primitives\DataGridColumnHeadersPresenter.cs (11)
232Debug.Assert(column != null, "We shouldn't have generated this column header if we don't have a column."); 268Debug.Assert(HeaderCollection != null, "This is a helper method for preparing and clearing a container; if it's called we must have a valid ItemSource"); 710Debug.Assert(ParentDataGrid != null, "ParentDataGrid is null"); 757Debug.Assert(_draggingSrcColumnHeader != null, "Dragging header is null"); 769Debug.Assert(_columnHeaderDragIndicator != null, "Drag indicator is null"); 770Debug.Assert(_draggingSrcColumnHeader != null, "Dragging header is null"); 788Debug.Assert(_draggingSrcColumnHeader != null, "Dragging header is null"); 800Debug.Assert(_columnHeaderDropLocationIndicator != null, "Drag indicator is null"); 801Debug.Assert(_draggingSrcColumnHeader != null, "Dragging header is null"); 818Debug.Assert(ParentDataGrid != null, "ParentDataGrid is null"); 934Debug.Assert(ParentDataGrid != null, "ParentDataGrid is null");
src\Framework\System\Windows\Controls\Primitives\DataGridRowHeader.cs (1)
495Debug.Assert(stateCode != DATAGRIDROWHEADER_stateNullCode);
src\Framework\System\Windows\Controls\Primitives\DatePickerTextBox.cs (3)
155Debug.Assert( 168Debug.Assert(e.NewValue is bool); 195Debug.Assert(datePickerTextBox != null, "The source is not an instance of a DatePickerTextBox!");
src\Framework\System\Windows\Controls\Primitives\MenuBase.cs (5)
246Debug.Assert(menu.HasPushedMenuMode); 819Debug.Assert(CheckAccess(), "IsMenuMode requires context access"); 915Debug.Assert(_pushedMenuMode == null); 917Debug.Assert(_pushedMenuMode != null); 932Debug.Assert(_pushedMenuMode != null);
src\Framework\System\Windows\Controls\Primitives\Popup.cs (12)
189Debug.Assert(popup != null, "Popup must be non-null"); 190Debug.Assert(placementTarget != null, "Placement target must be non-null."); 216Debug.Assert(popup != null, "Popup must be non-null"); 217Debug.Assert(placementTarget != null, "Placement target must be non-null."); 900Debug.Assert(!bindTreatMousePlacementAsBottomProperty || child is ToolTip, "child must be a Tooltip to bind TreatMousePlacementAsBottomProperty"); 1107Debug.Assert( Mouse.Captured == _popupRoot.Value, "_cacheValid[(int)CacheBits.CaptureEngaged] == true but Mouse.Captured != _popupRoot"); 1400Debug.Assert(popup != null, "popup should be non-null."); 1401Debug.Assert(child != null, "child should be non-null."); 1424Debug.Assert(child != null, "child should be non-null"); 1938Debug.Assert(CheckAccess(), "AsyncReposition not called on the dispatcher thread."); 2504Debug.Assert(i >= 0 && i < GetNumberOfCombinations(placement)); 3419Debug.Assert(!IsChildPopup || (IsChildPopup && !transparent), "Child popups cannot be transparent");
src\Framework\System\Windows\Controls\Primitives\ResizeGrip.cs (1)
79Debug.Assert(rg != null, "DependencyObject must be of type ResizeGrip.");
src\Framework\System\Windows\Controls\Primitives\ScrollContentPresenter.cs (2)
812Debug.Assert(IsScrollClient); 847Debug.Assert(IsScrollClient);
src\Framework\System\Windows\Controls\Primitives\Selector.cs (22)
603Debug.Assert(String.IsNullOrEmpty(path) || path == "/InnerText"); 1057Debug.Assert(CanSelectMultiple, "CanSelectMultiple should be true when calling SelectAllImpl"); 1453Debug.Assert(!SelectionChange.IsActive, "SelectionChange is already active -- use SelectionChange.Select or Unselect"); 1528Debug.Assert(!((SelectedIndex >= 0) && (_selectedItems.Count == 0)), "SelectedIndex >= 0 implies _selectedItems nonempty"); 1556Debug.Assert(IsSynchronizedWithCurrentItemPrivate); 1584Debug.Assert(IsSynchronizedWithCurrentItemPrivate); 1627Debug.Assert(SelectionChange.IsActive, "SelectionChange.IsActive should be true"); 1709Debug.Assert(SelectionChange.IsActive, "SelectionChange.IsActive should be true"); 2096Debug.Assert(SelectionChange.IsActive, "SelectionChange.IsActive should be true"); 2228Debug.Assert(String.IsNullOrEmpty(path) || path == "/InnerText"); 2327Debug.Assert(_owner.CheckAccess()); 2328Debug.Assert(!_active, SR.Get(SRID.SelectionChangeActive)); 2340Debug.Assert(_owner.CheckAccess()); 2341Debug.Assert(_active, "There must be a selection change active when you call SelectionChange.End()"); 2375Debug.Assert(_toSelect.Count <= 1, "_toSelect.Count was > 1"); 2550Debug.Assert(_owner.CheckAccess()); 2551Debug.Assert(_active, SR.Get(SRID.SelectionChangeNotActive)); 2552Debug.Assert(info != null, "parameter info should not be null"); 2607Debug.Assert(_owner.CheckAccess()); 2608Debug.Assert(_active, SR.Get(SRID.SelectionChangeNotActive)); 2609Debug.Assert(info != null, "info should not be null"); 2646Debug.Assert(_owner.CheckAccess());
src\Framework\System\Windows\Controls\Primitives\Thumb.cs (1)
255Debug.Assert(false,"Got MouseLeftButtonDown event while dragging!");
src\Framework\System\Windows\Controls\Primitives\ToolBarOverflowPanel.cs (1)
105Debug.Assert(childrenIndex == childrenCount, "ToolBarOverflowPanel.Children count mismatch after transferring children from GeneratedItemsCollection.");
src\Framework\System\Windows\Controls\Primitives\ToolBarPanel.cs (4)
152Debug.Assert(children[childrenIndex] == child, "InternalChildren is out of sync with _generatedItemsCollection."); 199Debug.Assert(children[childrenIndex] == child, "InternalChildren is out of sync with _generatedItemsCollection."); 468Debug.Assert(itemCount == containerCount, "ToolBarPanel expects Replace to affect only realized containers"); 478Debug.Assert(e != null && !isNewlyRealized, "ToolBarPanel expects Replace to affect only realized containers");
src\Framework\System\Windows\Controls\Primitives\Track.cs (6)
402Debug.Assert(_visualChildren == null || _visualChildren[1] == null, "Child[1] should be null if Child[0] == null)"); 403Debug.Assert(_visualChildren == null || _visualChildren[2] == null, "Child[2] should be null if Child[0] == null)"); 408Debug.Assert(_visualChildren[2] == null, "Child[2] should be null if Child[1] == null)"); 610Debug.Assert(decreaseButtonLength >= 0.0 && decreaseButtonLength <= remainingTrackLength, "decreaseButtonLength is outside bounds"); 611Debug.Assert(increaseButtonLength >= 0.0 && increaseButtonLength <= remainingTrackLength, "increaseButtonLength is outside bounds"); 625Debug.Assert(DoubleUtil.GreaterThanOrClose(offset, 0.0), "Invalid offest (negative value).");
src\Framework\System\Windows\Controls\ScrollViewer.cs (4)
1354Debug.Assert(!MeasureDirty); 1781Debug.Assert(_panningInfo != null); 1915Debug.Assert(_panningInfo != null); 2437Debug.Assert(DoubleUtil.GreaterThanOrClose(_xSize, 0.0) && DoubleUtil.GreaterThanOrClose(_ySize, 0.0), "Negative size for scrolling viewport. Bad IScrollInfo implementation.");
src\Framework\System\Windows\Controls\SelectedCellsChangedEventArgs.cs (2)
66Debug.Assert(_addedCells.IsReadOnly, "_addedCells should have ended up as read-only."); 67Debug.Assert(_removedCells.IsReadOnly, "_removedCells should have ended up as read-only.");
src\Framework\System\Windows\Controls\SelectedDatesCollection.cs (3)
415Debug.Assert(false); 433Debug.Assert(!_isAddingRange); 439Debug.Assert(_isAddingRange);
src\Framework\System\Windows\Controls\SoundPlayerAction.cs (2)
159Debug.Assert(m_player.IsLoadCompleted); 244Debug.Assert(m_player.IsLoadCompleted);
src\Framework\System\Windows\Controls\Stack.cs (2)
820Debug.Assert(measureElement.IsScrolling); 845Debug.Assert(logicalOffset == 0 || (logicalOffset > 0 && logicalOffset < children.Count));
src\Framework\System\Windows\Controls\TextBlock.cs (27)
1504Debug.Assert(lineCount == LineCount); 1620Debug.Assert(lineCount == LineCount); 1776Debug.Assert(lineCount == LineCount); 1883Debug.Assert(lineCount == LineCount); 1888Debug.Assert(lineIndex < lineCount); 1899Debug.Assert(lineCount == LineCount); 1901Debug.Assert(lineIndex < lineCount); 1927Debug.Assert(lineBounds.Count > 0); 2056Debug.Assert(_complexContent != null, "Inline objects are supported only in complex content."); 2086Debug.Assert(((InlineObject)inlineObjects[index]).Element == inlineObject.Element, "InlineObject cache is out of sync."); 2152Debug.Assert(lineCount == LineCount); 2294Debug.Assert(lineCount == LineCount); 2567Debug.Assert(lineIndex > 0); 2570Debug.Assert(dcp >= 0); 2585Debug.Assert(lineIndex < lineCount - 1); 2695Debug.Assert(lineIndex > 0); 2698Debug.Assert(dcp >= 0); 3055Debug.Assert(sender == _complexContent.TextContainer, "Received text change for foreign TextContainer."); 3405Debug.Assert(IsLayoutDataValid); 3406Debug.Assert(CheckFlags(Flags.RequiresAlignment)); 3424Debug.Assert(lineCount == LineCount); 3435Debug.Assert(DoubleUtil.AreClose(lineHeight, lineMetrics.Height), "Line height is out of sync."); 3598Debug.Assert(lineCount == LineCount); 3635Debug.Assert(e != null); 3638Debug.Assert(_complexContent.TextContainer is TextContainer); 3909Debug.Assert(owner != null); 3910Debug.Assert(textContainer != null);
src\Framework\System\Windows\Controls\TextSearch.cs (3)
321Debug.Assert(String.IsNullOrEmpty(matchedText) == false, "matchedText cannot be null or empty"); 322Debug.Assert(String.IsNullOrEmpty(newText) == false, "newText cannot be null or empty"); 323Debug.Assert(matchedText.StartsWith(newText, ignoreCase, cultureInfo), "matchedText should start with newText");
src\Framework\System\Windows\Controls\ToolTip.cs (1)
507Debug.Assert(_parentPopup == null, "_parentPopup should be null");
src\Framework\System\Windows\Controls\VirtualizedCellInfoCollection.cs (30)
29Debug.Assert(owner != null, "owner must not be null."); 42Debug.Assert(owner != null, "owner must not be null."); 92Debug.Assert(IsValidCell(cell), "The cell should be valid."); 93Debug.Assert(!Contains(cell), "VirtualizedCellInfoCollection does not support duplicate items."); 478Debug.Assert(left >= 0, "left must be positive."); 479Debug.Assert(top >= 0, "top must be positive."); 480Debug.Assert(width >= 0, "width must be positive."); 481Debug.Assert(height >= 0, "height must be positive."); 498Debug.Assert(value >= 0, "Value must be positive."); 512Debug.Assert(value >= 0, "Value must be positive."); 526Debug.Assert(value >= _left, "Right must be greater than or equal to Left."); 540Debug.Assert(value >= _top, "Bottom must be greater than or equal to Top."); 554Debug.Assert(value >= 0, "Value must be positive."); 568Debug.Assert(value >= 0, "Value must be positive."); 794Debug.Assert(!IsEmpty, "Don't call GetBoundingRegion when IsEmpty is true."); 826Debug.Assert(left <= right, "left should be less than or equal to right."); 827Debug.Assert(top <= bottom, "top should be less than or equal to bottom."); 837Debug.Assert(rowCount > 0, "rowCount should be greater than 0."); 838Debug.Assert(columnCount > 0, "columnCount should be greater than 0."); 982Debug.Assert(rowIndex >= 0); 1010Debug.Assert(rowIndex >= 0); 1049Debug.Assert(rowIndex >= 0); 1065Debug.Assert(oldIndex >= 0); 1066Debug.Assert(newIndex >= 0); 1155Debug.Assert(columnIndex >= 0); 1198Debug.Assert(columnIndex >= 0); 1237Debug.Assert(columnIndex >= 0); 1256Debug.Assert(oldIndex >= 0); 1257Debug.Assert(newIndex >= 0); 1641Debug.Assert(list != null, "list should not be null.");
src\Framework\System\Windows\Controls\VirtualizingStackPanel.cs (71)
408Debug.Assert(!IsPixelBased && IsScrolling && 485Debug.Assert(IsScrolling, "setting offset on non-scrolling panel"); 611Debug.Assert(IsScrolling, "setting offset on non-scrolling panel"); 800Debug.Assert(AnchorOperationField.GetValue(this) == null, "There is already a pending AnchorOperation."); 832Debug.Assert(_scrollData._firstContainerInViewport != null, "Must have an anchor element"); 858Debug.Assert(AnchorOperationField.GetValue(this) != null, "anchor state is inconsistent"); 889Debug.Assert(currFirstContainerInViewport != null, "Cannot find container in viewport"); 984Debug.Assert(DoubleUtil.AreClose(actualOffset, 0) || DoubleUtil.AreClose(actualOffset, _scrollData._extent.Width - _scrollData._viewport.Width), "The actual offset should already be at the beginning or the end."); 1003Debug.Assert(DoubleUtil.AreClose(actualOffset, 0) || DoubleUtil.AreClose(actualOffset, _scrollData._extent.Height - _scrollData._viewport.Height), "The actual offset should already be at the beginning or the end."); 1116Debug.Assert(!IsPixelBased || !findTopContainer, "find 'top' container only makes sense when item-scrolling"); 1665Debug.Assert(IsVirtualizing && InRecyclingMode, "We should only modify the visual order when in recycling mode"); 2355Debug.Assert(!adjustToChangeInFirstItem || foundFirstItemInViewport, "This loop should only happen twice at most"); 3650Debug.Assert(args.Action == NotifyCollectionChangedAction.Reset && args.ItemCount == 1); 3803Debug.Assert(info != null, "Expected state from previous measure not found"); 3895Debug.Assert(IsScrolling && IsVirtualizing, "Only check viewport on scrolling panel when virtualizing"); 4295Debug.Assert(retryCount >=0, "retry MeasureCaches too often"); 4640Debug.Assert(cacheUnit != VirtualizationCacheLengthUnit.Page, "Page cacheUnit is not expected here."); 4876Debug.Assert(IsScrolling, "The scrolling panel is the only one that should extend the viewport"); 4934Debug.Assert(virtualizationInfoProvider != null, "This method should only be invoked for a virtualizing owner"); 4935Debug.Assert(cacheUnit != VirtualizationCacheLengthUnit.Page, "Page after cache size is not expected here."); 5562Debug.Assert(itemIndex < items.Count, "index out of range"); 5642Debug.Assert(IsVirtualizing, "We should only need to extend the viewport beyond the generated items when virtualizing"); 5976Debug.Assert(!containerSize.IsEmpty, "We can't estimate an empty size"); 5992Debug.Assert(!IsVSP45Compat, "this method should not be called in VSP45Compat mode"); 6060Debug.Assert(!containerSize.IsEmpty, "We can't estimate an empty size"); 6272Debug.Assert(parentItemStorageProvider != null || container != null, 6315Debug.Assert(!IsVSP45Compat, "SetItemsHostInset should not be called in VSP45-compat mode"); 6351Debug.Assert(false, "SetInset should only be called for a container"); 6456Debug.Assert(false, "Unexpected container type: " + name); 6497Debug.Assert(cacheUnit != VirtualizationCacheLengthUnit.Page, "Page cacheUnit is not expected here."); 6702Debug.Assert(virtualizingChild != null, "This method should only be invoked for a virtualizing child"); 7140Debug.Assert(DoubleUtil.AreClose(pixelSizeInViewport + pixelSizeBeforeViewport + pixelSizeAfterViewport, childPixelSize.Width), "The computed sizes within and outside the viewport should add up to the childPixelSize."); 7232Debug.Assert(DoubleUtil.AreClose(pixelSizeInViewport + pixelSizeBeforeViewport + pixelSizeAfterViewport, childPixelSize.Height), "The computed sizes within and outside the viewport should add up to the childPixelSize."); 7327Debug.Assert(IsVSP45Compat, "this method should only be called in VSP45Compat mode"); 7333Debug.Assert(evaluateAreContainersUniformlySized || !computedAreContainersUniformlySized, "AreContainersUniformlySized starts off true and can only be flipped to false."); 7479Debug.Assert(!IsVSP45Compat, "this method should not be called in VSP45Compat mode"); 7485Debug.Assert(evaluateAreContainersUniformlySized || !computedAreContainersUniformlySized, "AreContainersUniformlySized starts off true and can only be flipped to false."); 7754Debug.Assert(itemStorageProvider != null || item == this, "An item storage provider must be available."); 7755Debug.Assert(item != null, "An item must be available."); 7779Debug.Assert(itemStorageProvider != null || item == this, "An item storage provider must be available."); 7780Debug.Assert(item != null, "An item must be available."); 7823Debug.Assert(itemStorageProvider != null || item == this, "An item storage provider must be available."); 7824Debug.Assert(item != null, "An item must be available."); 7881Debug.Assert(itemStorageProvider != null || item == this, "An item storage provider must be available."); 7882Debug.Assert(item != null, "An item must be available."); 8600Debug.Assert(container != null, "Null container was generated"); 8645Debug.Assert(children[visualTreeIndex] != null, "MoveVisualChild interprets a null destination as 'move to end'"); 8770Debug.Assert(!children.Contains(child), "we incorrectly identified a recycled container"); 8813Debug.Assert(args.ItemUICount == args.ItemCount, "Both ItemUICount and ItemCount should be equal or ItemUICount should be 0."); 8823Debug.Assert(child != null, "Null child was generated"); 8824Debug.Assert(!newlyRealized, "newlyRealized should be false after Replace"); 8853Debug.Assert((itemCount == itemUICount) || (itemUICount == 0), "Both ItemUICount and ItemCount should be equal or ItemUICount should be 0."); 8894Debug.Assert(IsVirtualizing, "Can't clean up containers if not virtualizing"); 8895Debug.Assert(itemsControl != null, "We can't cleanup if we aren't the itemshost"); 9040Debug.Assert(InRecyclingMode, "This method only applies to recycling mode"); 9059Debug.Assert(IsVirtualizing && InRecyclingMode, "Realized children only exist when recycling"); 9060Debug.Assert(_realizedChildren != null, "Realized children must exist to verify it"); 9074Debug.Assert(!_realizedChildren.Contains(child), "_realizedChildren should not contain recycled containers"); 9080Debug.Assert(_realizedChildren[position.Index] == child, "_realizedChildren is corrupt!"); 9092Debug.Assert(_realizedChildren.Count == children.Count, "Realized and visual children must match"); 9096Debug.Assert(_realizedChildren[i] == children[i], "Realized and visual children must match"); 9128Debug.Assert(false, "We should have found a child"); 9200Debug.Assert(_cleanupDelay != null); 9221Debug.Assert(_cleanupOperation != null); 9245Debug.Assert(!InRecyclingMode, "This method only applies to standard virtualization"); 9310Debug.Assert(startIndex >= 0 && count > 0); 9311Debug.Assert(children == _realizedChildren, "the given child list must be the _realizedChildren list when recycling"); 9416Debug.Assert(_scrollData._scrollOwner != null, "Scrolling an unconnected VSP"); 9461Debug.Assert(IsScrolling, "ScrollData must only be set on a scrolling panel."); 10315Debug.Assert(IsScrolling, "ScrollData must only be set on a scrolling panel."); 12084Debug.Assert(tracer != null, "Trace called when not tracing");
src\Framework\System\Windows\Controls\WebBrowser.cs (2)
720Debug.Assert(clsid.ToString("D") == CLSID.WebBrowser); 772Debug.Assert(_axIWebBrowser2 != null);
src\Framework\System\Windows\Data\BindingBase.cs (1)
75Debug.Assert((int)Feature.LastFeatureId <= 32, "UncommonValueTable supports only 32 Ids");
src\Framework\System\Windows\Data\BindingExpression.cs (1)
2146Debug.Assert(NeedsValidation, "check NeedsValidation before calling this");
src\Framework\System\Windows\Data\BindingExpressionBase.cs (3)
130Debug.Assert((int)Feature.LastFeatureId <= 32, "UncommonValueTable supports only 32 Ids"); 1692Debug.Assert(RootBindingExpression == this, "Only call this with a root binding"); 2531Debug.Assert((_flags & PrivateFlags.iPropagationMask) != PrivateFlags.iPropDefault,
src\Framework\System\Windows\Data\BindingGroup.cs (3)
1351Debug.Assert(_bindingExpressions.Count == 0, "Unexpected Reset event"); 1355Debug.Assert(false, "Unexpected change event"); 1796Debug.Assert(bindingExpression != null, "do not ask for source value from a [Multi,Priority]Binding");
src\Framework\System\Windows\Data\BindingListCollectionView.cs (5)
595Debug.Assert(_newItemIndex != -2 && newItem == _newItem, "AddNew did not raise expected events"); 628Debug.Assert(_newItemIndex == -2 && _newItem == NoNewItem, "unexpected call to BeginAddNew"); 746Debug.Assert(true); 1935Debug.Assert(_newItem == InternalList[index], "unexpected item while committing AddNew"); 1994Debug.Assert(item == InternalList[index], "unexpected item while committing AddNew");
src\Framework\System\Windows\Data\CollectionView.cs (1)
1837Debug.Assert(changeLog != null && changeLog.Count > 0, "don't defer when there's no work");
src\Framework\System\Windows\Data\ListCollectionView.cs (6)
783Debug.Assert(_newItemIndex != -2 && System.Windows.Controls.ItemsControl.EqualsEx(newItem, _newItem), "AddNew did not raise expected events"); 808Debug.Assert(_newItemIndex == -2 && _newItem == NoNewItem, "unexpected call to BeginAddNew"); 1719Debug.Assert(false, "Cannot update collection view from outside UIContext without index in event args"); 2471Debug.Assert(view != null, "lazyGetCollectionView should not return null"); 3154Debug.Assert(list.VerifyLiveSorting(lsi), "live sorting failed"); 3164Debug.Assert(list.VerifyLiveSorting(null), "live sorting not resotred");
src\Framework\System\Windows\Data\MultiBinding.cs (2)
119Debug.Assert(false, "Unexpected BindingMode value"); 142Debug.Assert(false, "Unexpected UpdateSourceTrigger value");
src\Framework\System\Windows\Data\MultiBindingExpression.cs (2)
192Debug.Assert(ParentMultiBinding.Converter != null || !String.IsNullOrEmpty(EffectiveStringFormat), 880Debug.Assert(NeedsValidation, "check NeedsValidation before calling this");
src\Framework\System\Windows\Data\ObjectDataProvider.cs (4)
166Debug.Assert((_objectInstance == null) ? (_objectType == null) : (_objectType == _objectInstance.GetType())); 353Debug.Assert(_mode != SourceMode.FromType); 454Debug.Assert(_objectType != null); 523Debug.Assert(_objectType != null);
src\Framework\System\Windows\Data\PriorityBindingExpression.cs (2)
204Debug.Assert(MutableBindingExpressions.Count == 0, "expect to encounter empty BindingExpression collection when attaching MultiBinding"); 461Debug.Assert(NeedsValidation, "check NeedsValidation before calling this");
src\Framework\System\Windows\Data\RelativeSource.cs (3)
176Debug.Assert(_mode == RelativeSourceMode.FindAncestor); 214Debug.Assert((!IsUninitialized) || (_mode == RelativeSourceMode.FindAncestor)); 278Debug.Assert(IsUninitialized);
src\Framework\System\Windows\Data\XmlDataProvider.cs (2)
288Debug.Assert(_domSetDocument == null, "Should not be possible to be using Source and user-set Doc at the same time."); 772Debug.Assert(doc != null);
src\Framework\System\Windows\DataTrigger.cs (1)
191Debug.Assert( TriggerConditions != null && TriggerConditions.Length == 1,
src\Framework\System\Windows\DescendentsWalker.cs (1)
96Debug.Assert( false, "Tree walk priority should be Visual first or Logical first - but this instance of DescendentsWalker has an invalid priority setting that's neither of the two." );
src\Framework\System\Windows\Documents\AdornerLayer.cs (5)
437Debug.Assert(adornerInfos != null, "No adorners found for element in AdornerLayer._zOrderMap"); 472Debug.Assert(adornerInfos != null, "No adorners found for element in AdornerLayer._zOrderMap"); 549Debug.Assert(adornerInfo != null, "Adorner should not be null"); 654Debug.Assert(adorner != null); 727Debug.Assert(element != null);
src\Framework\System\Windows\Documents\ChildDocumentBlock.cs (4)
53Debug.Assert(childContainer != null); 60Debug.Assert(docRef != null); 78Debug.Assert(newBlock != null); 133Debug.Assert(ChildContainer.Highlights.GetLayer(typeof(TextSelection)) == null);
src\Framework\System\Windows\Documents\ColumnResizeAdorner.cs (2)
46Debug.Assert(scope != null); 146Debug.Assert(_adornerLayer == null, "Attempt to overwrite existing AdornerLayer!");
src\Framework\System\Windows\Documents\CompositionAdorner.cs (4)
61Debug.Assert(textView != null && textView.RenderScope != null); 366Debug.Assert(_adornerLayer == null, "Attempt to overwrite existing AdornerLayer!"); 591Debug.Assert(start.CompareTo(startLinePointer) <= 0, "The start pointer is positioned after the composition start line pointer!"); 614Debug.Assert(endLinePointer.CompareTo(textSegment.End) == 0, "The end line pointer is positioned after the composition text range end pointer!");
src\Framework\System\Windows\Documents\DocumentSequence.cs (9)
274Debug.Assert(innerDP != null); 298Debug.Assert(innerDP != null); 595Debug.Assert(docRef != null); 602Debug.Assert(paginator != null); 610Debug.Assert(paginator != null); 1094Debug.Assert(documentSequence != null); 1095Debug.Assert(documentPaginator != null); 1096Debug.Assert(documentPage != null); 1207Debug.Assert(false);
src\Framework\System\Windows\Documents\DocumentSequenceHighlightLayer.cs (2)
59Debug.Assert(false, "This method is not implemented and not expected to be called."); 82Debug.Assert(ranges.Count > 0);
src\Framework\System\Windows\Documents\DocumentSequenceTextContainer.cs (13)
49Debug.Assert(parent != null); 50Debug.Assert(parent is FixedDocumentSequence); 237Debug.Assert(_start != null); 250Debug.Assert(_end != null); 405Debug.Assert(docRef != null); 459Debug.Assert(false, "should never be here"); 521Debug.Assert(_parent != null); 670Debug.Assert(sender != null); 671Debug.Assert(args != null); 672Debug.Assert(args.Ranges != null); 721Debug.Assert(args.Ranges.Count > 0 && ((TextSegment)args.Ranges[0]).Start.CompareTo(((TextSegment)args.Ranges[0]).End) < 0); 1015Debug.Assert(parentTextPointer != null); 1038Debug.Assert(parentChangePosition != null);
src\Framework\System\Windows\Documents\DocumentSequenceTextPointer.cs (12)
42Debug.Assert(childBlock != null); 43Debug.Assert(childPosition != null); 61Debug.Assert(!_isFrozen, "Can't reposition a frozen pointer!"); 457Debug.Assert(!_isFrozen, "Can't reposition a frozen pointer!"); 486Debug.Assert(!_isFrozen, "Can't reposition a frozen pointer!"); 506Debug.Assert(!_isFrozen, "Can't reposition a frozen pointer!"); 573Debug.Assert(_childTp != null); 914Debug.Assert(direction == LogicalDirection.Backward); 959Debug.Assert(tp != null); 971Debug.Assert(thisTp.ChildBlock.ChildContainer == tp.ChildBlock.ChildContainer); 1015Debug.Assert(xGapAwareCompareTo(tp1, tp2) <= 0); 1109Debug.Assert(false, "invalid TextPointerContext");
src\Framework\System\Windows\Documents\FixedDocument.cs (11)
363Debug.Assert(page != null); 692Debug.Assert(IsValidPageIndex(index)); 738Debug.Assert(fp != null); 1075Debug.Assert(sender != null); 1076Debug.Assert(args != null); 1077Debug.Assert(args.Ranges != null); 1080Debug.Assert(args.Ranges.Count > 0 && ((TextSegment)args.Ranges[0]).Start.CompareTo(((TextSegment)args.Ranges[0]).End) < 0); 1148Debug.Assert(!highlightTransitionPosition.IsNull, "Highlight start not followed by highlight end!"); 1164Debug.Assert(!highlightTransitionPosition.IsNull, "Highlight start not followed by highlight end!"); 1208Debug.Assert(pageNo >= 0 && pageNo<PageCount); 1401Debug.Assert(panel != null && page != null);
src\Framework\System\Windows\Documents\FixedElement.cs (2)
204Debug.Assert(_object == null && e._type == ElementType.Object); 267Debug.Assert(false);
src\Framework\System\Windows\Documents\FixedFindEngine.cs (13)
41Debug.Assert(start != null); 42Debug.Assert(end != null); 43Debug.Assert( ((start is DocumentSequenceTextPointer) && (end is DocumentSequenceTextPointer)) || 45Debug.Assert(findPattern != null); 54Debug.Assert(paginator != null); 94Debug.Assert(firstSearchPageStart != null); 95Debug.Assert(firstSearchPageEnd != null); 129Debug.Assert(fixedDoc != null); 316Debug.Assert(endAsFTP != null); 336Debug.Assert(startAsFTP != null); 348Debug.Assert(doc != null); 349Debug.Assert(translatedPageNo >= 0 && translatedPageNo < doc.PageCount); 374Debug.Assert(pageStream != null);
src\Framework\System\Windows\Documents\FixedFlowMap.cs (2)
144Debug.Assert(fp >= 0 && fp < _flowOrder.Count); 176Debug.Assert(flowOld.Type == FlowNodeType.Virtual || flowNew != null);
src\Framework\System\Windows\Documents\FixedHighlight.cs (3)
46Debug.Assert(element != null && beginOffset >= 0 && endOffset >= 0); 146Debug.Assert(_gBeginOffset >= 0); 147Debug.Assert(_gEndOffset <= chrct);
src\Framework\System\Windows\Documents\FixedNode.cs (5)
89Debug.Assert(childLevels >= 1); 105Debug.Assert(childPath != null); 144Debug.Assert(path != null && path.Length >= 2); // At least a page index and an element index 354Debug.Assert(level < _path.Length); 365Debug.Assert(_path.Length >= 2);
src\Framework\System\Windows\Documents\FixedPage.cs (4)
637Debug.Assert(dpo != null, "GetLinkUri shouldn't be called for non-DependencyObjects."); 894Debug.Assert(e != null); 930Debug.Assert(currentLevelIndex >= 0 && currentLevelIndex <= ((Canvas)element).Children.Count); 1061Debug.Assert(currentChildrens != null);
src\Framework\System\Windows\Documents\FixedPageStructure.cs (6)
45Debug.Assert(pageIndex >= 0); 121Debug.Assert(_lineResults != null); 159Debug.Assert(_lineResults != null); 213Debug.Assert(flowStart != null && flowStart.Type != FlowNodeType.Virtual); 214Debug.Assert(flowEnd != null && flowEnd.Type != FlowNodeType.Virtual); 686Debug.Assert(_fixedSOMPageConstructor != null);
src\Framework\System\Windows\Documents\FixedSOMContainer.cs (7)
43Debug.Assert(compared != null); 44Debug.Assert(This != null); 52Debug.Assert(compareHor != SpatialComparison.None); 53Debug.Assert(compareVer != SpatialComparison.None); 109Debug.Assert(false); 116Debug.Assert(false); 233Debug.Assert(container != null);
src\Framework\System\Windows\Documents\FixedSOMGroup.cs (5)
45Debug.Assert(compared != null); 56Debug.Assert(compareHor != SpatialComparison.None); 57Debug.Assert(compareVer != SpatialComparison.None); 108Debug.Assert(false); 115Debug.Assert(false);
src\Framework\System\Windows\Documents\FixedSOMImage.cs (1)
75Debug.Assert(path.Fill is ImageBrush);
src\Framework\System\Windows\Documents\FixedSOMLineCollection.cs (2)
65Debug.Assert(point1.X == point2.X); 71Debug.Assert(point1.Y == point2.Y);
src\Framework\System\Windows\Documents\FixedSOMPageConstructor.cs (12)
64Debug.Assert(stroke || fill, "should not be a nop"); 203Debug.Assert(false, "It should not be called"); 232Debug.Assert(fixedPage != null); 246Debug.Assert(_fixedPage != null); 251Debug.Assert(obj != null); 382Debug.Assert(obj is Image || obj is Path); 412Debug.Assert(glyphs != null); 587Debug.Assert (fixedBlock.SemanticBoxes.Count > 0); 642Debug.Assert(textRunRect.Height != 0 && fixedBlock.LineHeight != 0); 1019Debug.Assert(false); 1146Debug.Assert(currentPageElement != null); 1156Debug.Assert(nextPageElement != null);
src\Framework\System\Windows\Documents\FixedSOMSemanticBox.cs (3)
100Debug.Assert(o != null); 110Debug.Assert(compareHor != SpatialComparison.None && compareVer != SpatialComparison.None); 306Debug.Assert(false);
src\Framework\System\Windows\Documents\FixedSOMTable.cs (2)
175Debug.Assert(row != null); 191Debug.Assert(row != null);
src\Framework\System\Windows\Documents\FixedSOMTextRun.cs (1)
49Debug.Assert(otherRun != null);
src\Framework\System\Windows\Documents\FixedTextBuilder.cs (23)
202Debug.Assert(!_IsBoundaryPage(pageIndex)); 220Debug.Assert(page != null); 221Debug.Assert(page.IsInitialized); 390Debug.Assert(fn.Type == FlowNodeType.Start); 483Debug.Assert(pStart.CompareTo(pEnd) < 0); 522Debug.Assert(fixes.Length == 1); 599Debug.Assert(flowNode.Type == FlowNodeType.Run); 603Debug.Assert(flowNode.Type == FlowNodeType.Run); 604Debug.Assert(fixes != null); 817Debug.Assert(pathPrefix != null); 840Debug.Assert(prevRun != null); 841Debug.Assert(currentRun != null); 1022Debug.Assert(pathPrefix == null); 1023Debug.Assert(level1Index >= 0); 1033Debug.Assert(newPathPrefix != null); 1104Debug.Assert(false); 1309Debug.Assert(false); 1332Debug.Assert(e is Image); 1430Debug.Assert(elem is FixedPage || elem is Canvas); 1582Debug.Assert(false); 1696Debug.Assert(run.EndIndex - run.StartIndex == run.Text.Length); 1773Debug.Assert(uiElement != null); 1794Debug.Assert(newLineResult != null);
src\Framework\System\Windows\Documents\FixedTextContainer.cs (8)
54Debug.Assert(parent != null && parent is FixedDocument); 206Debug.Assert(_start != null); 219Debug.Assert(_end != null); 401Debug.Assert(res); 417Debug.Assert(highlights != null); 535Debug.Assert(_fixedTextBuilder != null); 544Debug.Assert(_containerElement != null); 627Debug.Assert(start.CompareTo(end) <= 0);
src\Framework\System\Windows\Documents\FixedTextPointer.cs (5)
400Debug.Assert(!_isFrozen, "Can't reposition a frozen pointer!"); 403Debug.Assert(!_isFrozen, "Can't reposition a frozen pointer!"); 433Debug.Assert(!_isFrozen, "Can't reposition a frozen pointer!"); 444Debug.Assert(!_isFrozen, "Can't reposition a frozen pointer!"); 698Debug.Assert(!_isFrozen, "Can't reposition a frozen pointer!");
src\Framework\System\Windows\Documents\FixedTextView.cs (12)
130Debug.Assert(pos != null); 178Debug.Assert(ftp != null); 256Debug.Assert(startPosition != null && this.Contains(startPosition)); 257Debug.Assert(endPosition != null && this.Contains(endPosition)); 422Debug.Assert(pos != null); 481Debug.Assert(false); 879 Debug.Assert(itp != null); 977Debug.Assert(hitGlyphs != null); 1029Debug.Assert(charStart - charCount == 1); 1040Debug.Assert(charEnd - charCount == 1); 1147Debug.Assert(symbolType == TextPointerContext.Text || symbolType == TextPointerContext.EmbeddedElement); 1221Debug.Assert(!textPointer.IsFrozen, "Can't reposition a frozen pointer!");
src\Framework\System\Windows\Documents\FlowNode.cs (2)
58Debug.Assert( (type != FlowNodeType.Run) || ((int)cookie != 0)); 103Debug.Assert(_fp != fn._fp || (_fp == fn._fp) && (_scopeId == fn._scopeId));
src\Framework\System\Windows\Documents\FlowPosition.cs (12)
46Debug.Assert(!FlowNode.IsNull(node)); 138Debug.Assert(flow != null); 185Debug.Assert(dir == LogicalDirection.Forward || dir == LogicalDirection.Backward); 193Debug.Assert(GetPointerContext(dir) == TextPointerContext.Text); 210Debug.Assert(GetPointerContext(dir) == TextPointerContext.Text); 251Debug.Assert(type == FlowNodeType.Object || type == FlowNodeType.Noop || type == FlowNodeType.Start || type == FlowNodeType.End); 382Debug.Assert(this._OverlapAwareCompare(pEnd) < 0); 435Debug.Assert(dir == LogicalDirection.Backward); 593Debug.Assert(dir == LogicalDirection.Backward); 643Debug.Assert(dir == LogicalDirection.Backward); 733Debug.Assert(flow != null); 761Debug.Assert(this._flowNode.Equals(flow._flowNode));
src\Framework\System\Windows\Documents\Glyphs.cs (4)
81Debug.Assert(_glyphRunProperties != null); 255Debug.Assert(glyphRunProperties.glyphIndices != null); 279Debug.Assert(0 <= nibble && nibble <= 15); 358Debug.Assert(parsedGlyphs.Count == glyphCount);
src\Framework\System\Windows\Documents\HighlightVisual.cs (4)
179Debug.Assert(highlights != null); 248Debug.Assert(bg != null); 254Debug.Assert(highlightGeometry != null); 272Debug.Assert(highlightGeometry != null);
src\Framework\System\Windows\Documents\Hyperlink.cs (1)
588Debug.Assert(targetUri != null);
src\Framework\System\Windows\Documents\ImmComposition.cs (3)
368Debug.Assert(oldSource == null || newSource == null, 376Debug.Assert((oldSource == null) || (oldSource == _source)); 411Debug.Assert(newSource == _source);
src\Framework\System\Windows\Documents\NullTextContainer.cs (3)
186Debug.Assert(_start != null); 199Debug.Assert(_end != null); 259Debug.Assert(false, "Unexpected call to NullTextContainer.set_TextView!");
src\Framework\System\Windows\Documents\NullTextNavigator.cs (14)
52Debug.Assert(position is NullTextPointer || position is NullTextPointer); 68Debug.Assert(position is NullTextPointer || position is NullTextPointer); 201Debug.Assert(distance == 0); 230Debug.Assert(!_isFrozen, "Can't reposition a frozen pointer!"); 240Debug.Assert(!_isFrozen, "Can't reposition a frozen pointer!"); 252Debug.Assert(!_isFrozen, "Can't reposition a frozen pointer!"); 254Debug.Assert(distance == 0, "Single possible position in this empty container"); 264Debug.Assert(!_isFrozen, "Can't reposition a frozen pointer!"); 274Debug.Assert(!_isFrozen, "Can't reposition a frozen pointer!"); 276Debug.Assert(false, "No scoping element!"); 284Debug.Assert(false, "NullTextPointer does not expect layout dependent method calls!"); 293Debug.Assert(false, "NullTextPointer does not expect layout dependent method calls!"); 318Debug.Assert(false); // must never call this 326Debug.Assert(false); // must never call this
src\Framework\System\Windows\Documents\PageContentAsyncResult.cs (2)
67Debug.Assert(source == null || source.IsAbsoluteUri); 106get { Debug.Assert(false); return null; }
src\Framework\System\Windows\Documents\RtfToXamlLexer.cs (1)
424Debug.Assert(false);
src\Framework\System\Windows\Documents\RtfToXamlReader.cs (39)
2754Debug.Assert(HasBorder); 5204Debug.Assert(dnRow != null); // Need row 5205Debug.Assert(dnRow != null && !dnRow.IsPending); // Row props attached when row is closed 5206Debug.Assert(dnRow != null && dnRow.FormatState.RowFormat != null); 5654Debug.Assert(Type == DocumentNodeType.dnTable); 5983Debug.Assert(value >= 0); 5984Debug.Assert(!IsPending); 6045Debug.Assert(value == null || !value.IsPending); 6314Debug.Assert(nUnfilledRowIndex != 0); 6406Debug.Assert(nStart + nChild < Count); 6491Debug.Assert(Count == 0 || (nStart >= 0 && nStart < Count)); 6502Debug.Assert(nStart + nChild < Count); 6520Debug.Assert(nAt + dn.ChildCount <= nEnd); 6521Debug.Assert(!dn.IsTerminated); 6530Debug.Assert(dnChild.ChildCount == 0 && dnChild.IsTerminated); 6552Debug.Assert(Count == 0 || (nStart >= 0 && nStart < Count)); 6563Debug.Assert(nStart + nChild < Count); 6581Debug.Assert(nAt + dn.ChildCount <= nEnd); 6582Debug.Assert(!dn.IsTerminated); 6594Debug.Assert(dnChild.ChildCount == 0 && dnChild.IsTerminated); 6619Debug.Assert(Count == 0 || (index >= 0 && index < Count)); 6620Debug.Assert(index + nChildCount < Count); 6649Debug.Assert(Count == 0 || (index >= 0 && index < Count)); 6691Debug.Assert(EntryAt(i).ClosedParent != null); 6694Debug.Assert(nAt + dn.ChildCount < Count); 6698Debug.Assert(dnPa.IsPending || (nAt > dnPa.Index && nAt <= dnPa.Index + dnPa.ChildCount)); 6716Debug.Assert(dnPa != null && dnPa.Type == DocumentNodeType.dnTable); 6719Debug.Assert(dnPa != null && dnPa.Type == DocumentNodeType.dnTableBody); 6722Debug.Assert(dnPa != null && dnPa.Type == DocumentNodeType.dnRow); 6725Debug.Assert(dnPa != null && dnPa.Type == DocumentNodeType.dnList); 6991Debug.Assert(false); 7168Debug.Assert(_fMain); 7215Debug.Assert(dnPa.LastChildIndex >= nAt + nExcise - 1); 8293Debug.Assert(dn.ChildCount == 0); 8324Debug.Assert(dn.ChildCount == 0); 9961Debug.Assert(nInsertAt >= 0 && nChildren > 0 && nInsertAt + nChildren - 1 < dna.Count); 11172Debug.Assert(dna.Count > 0 && dna.EntryAt(dna.Count - 1).Type == DocumentNodeType.dnParagraph); 11387Debug.Assert(!dnPara.IsTerminated); 11610Debug.Assert(!dnTop.IsTerminated);
src\Framework\System\Windows\Documents\RubberbandSelector.cs (2)
421Debug.Assert(range.first != null && range.second != null); 576Debug.Assert(end >= begin);
src\Framework\System\Windows\Documents\Table.cs (2)
441Debug.Assert(table != null); 493Debug.Assert(_currentChildType != ChildrenTypes.BeforeFirst);
src\Framework\System\Windows\Documents\TableCell.cs (1)
413Debug.Assert(value >= -1 && _parentIndex != value);
src\Framework\System\Windows\Documents\TableColumn.cs (1)
178Debug.Assert (value >= -1 && _parentIndex != value);
src\Framework\System\Windows\Documents\TableRow.cs (5)
212Debug.Assert(rowSpanVector != null); 239Debug.Assert(i <= firstAvailableIndex); 259Debug.Assert(_spannedCells != null); 269Debug.Assert(_cells.Count <= _formatCellCount); 325Debug.Assert(value >= -1 && _parentIndex != value);
src\Framework\System\Windows\Documents\TableRowGroup.cs (1)
276Debug.Assert(value >= -1 && _parentIndex != value);
src\Framework\System\Windows\Documents\TextServicesHost.cs (7)
81Debug.Assert(Thread.CurrentThread.GetApartmentState() == ApartmentState.STA, "OnRegisterTextStore must be called on STA thread"); 319Debug.Assert(_registeredtextstorecount > 0, "Overrelease TextStore!"); 341Debug.Assert(CheckAccess(), "OnDispatcherShutdownFinished called on bad thread!"); 342Debug.Assert(_isDispatcherShutdownFinished == false, "Was this dispather finished???"); 374Debug.Assert(CheckAccess(), "RegisterTextStore called on bad thread!"); 379Debug.Assert(_isDispatcherShutdownFinished == false, "Was this dispather finished?"); 380Debug.Assert(_registeredtextstorecount == 0, "TextStore was registered without ThreadMgr?");
src\Framework\System\Windows\Documents\XamlToRtfWriter.cs (3)
233Debug.Assert(openLists.Count > 0); 407Debug.Assert(openLists.Count > 0); 438Debug.Assert(openLists.Count > 0);
src\Framework\System\Windows\EventTrigger.cs (1)
310Debug.Assert( eventTrigger._routedEventHandler == null && eventTrigger._source == null);
src\Framework\System\Windows\FrameworkContentElement.cs (7)
658Debug.Assert(entry.Value == DependencyProperty.UnsetValue); 1493Debug.Assert((uint)InternalFlags.InheritanceBehavior0 == 0x08); 1494Debug.Assert((uint)InternalFlags.InheritanceBehavior1 == 0x10); 1495Debug.Assert((uint)InternalFlags.InheritanceBehavior2 == 0x20); 1508Debug.Assert((uint)InternalFlags.InheritanceBehavior0 == 0x08); 1509Debug.Assert((uint)InternalFlags.InheritanceBehavior1 == 0x10); 1510Debug.Assert((uint)InternalFlags.InheritanceBehavior2 == 0x20);
src\Framework\System\Windows\FrameworkElement.cs (19)
1187Debug.Assert(startNode.IsValid || unlinkedParent != null, 1398Debug.Assert(fo.IsValid, 1487Debug.Assert(target != null, "Don't call FindTemplateResource with a null target object"); 1493Debug.Assert(fo.IsValid, "Don't call FindTemplateResource with a target object that is neither a FrameworkElement nor a FrameworkContentElement"); 1931Debug.Assert(entry.Value == DependencyProperty.UnsetValue,"FrameworkElement.GetRawValue should never fall through with a value != DependencyProperty.UnsetValue. We're supposed to return as soon as we found something."); 1943Debug.Assert( IsTemplatedParentAnFE ); 2351Debug.Assert( foTemplatedParent.IsFE ); 2358Debug.Assert(templatedParentTemplate != null , 2547Debug.Assert(fceParent == null, "Nearest framework parent via the visual tree has to be an FE. It cannot be an FCE"); 2617Debug.Assert((uint)InternalFlags.InheritanceBehavior0 == 0x08); 2618Debug.Assert((uint)InternalFlags.InheritanceBehavior1 == 0x10); 2619Debug.Assert((uint)InternalFlags.InheritanceBehavior2 == 0x20); 2632Debug.Assert((uint)InternalFlags.InheritanceBehavior0 == 0x08); 2633Debug.Assert((uint)InternalFlags.InheritanceBehavior1 == 0x10); 2634Debug.Assert((uint)InternalFlags.InheritanceBehavior2 == 0x20); 2991Debug.Assert(fe != null || fce != null); 3033Debug.Assert( feTemplatedParent != null ); 4103Debug.Assert(sourceTransform != null); 4112Debug.Assert(_transform != null);
src\Framework\System\Windows\FrameworkElementFactory.cs (5)
714Debug.Assert( treeNodeFO.IsValid || (treeNodeVisual3D != null), 747Debug.Assert( _frameworkTemplate != null ); 823Debug.Assert( _frameworkTemplate != null ); 1207Debug.Assert(_frameworkTemplate != null, "ContentPresenter is an FE and can only have a FrameworkTemplate"); 1250Debug.Assert(_frameworkTemplate != null, "GridViewRowPresenter is an FE and can only have a FrameworkTemplate");
src\Framework\System\Windows\FrameworkTemplate.cs (7)
67Debug.Assert(templatedParent != null, 451Debug.Assert(!_sealed, "call this method before template is sealed"); 777Debug.Assert(fo.TemplatedParent == templatedParent); 843Debug.Assert(false, "We do not have support for DynamicResource within unshared template content"); 976Debug.Assert(templateReader != null, "PlayXaml returned null"); 1090Debug.Assert(false, "Unknown enum value"); 1169Debug.Assert(!(rootElement is FrameworkElement) ||
src\Framework\System\Windows\Generated\FrameworkContentElement.cs (1)
1179Debug.Assert(value == true,
src\Framework\System\Windows\Generated\FrameworkElement.cs (1)
1216Debug.Assert(value == true,
src\Framework\System\Windows\Input\KeyboardNavigation.cs (20)
553Debug.Assert(adornedElement != null, "adornedElement should not be null"); 554Debug.Assert(focusVisualStyle != null, "focusVisual should not be null"); 568Debug.Assert(adornedElement != null, "adornedElement should not be null"); 569Debug.Assert(adornedElementParent != null, "adornedElementParent should not be null"); 570Debug.Assert(contentHostParent != null, "contentHostParent should not be null"); 571Debug.Assert(contentHostParent is Visual, "contentHostParent should be Visual"); 572Debug.Assert(focusVisualStyle != null, "focusVisual should not be null"); 1043Debug.Assert(currentElement != null, "currentElement should not be null"); 1434Debug.Assert(container != null, "container cannot be null"); 1886Debug.Assert(e != null, "e should not be null"); 1887Debug.Assert(container != null, "container should not be null"); 1965Debug.Assert(e != null, "e cannot be null"); 2180Debug.Assert(container != null, "container should not be null"); 2216Debug.Assert(IsTabStopOrGroup(nextTabElement), "nextTabElement should be IsTabStop or group"); 2355Debug.Assert(e != null || container != null, "e or container should not be null"); 2734Debug.Assert(sourceElement != null, "sourceElement must not be null"); 2990Debug.Assert(!(sourceElement == null && container == null), "Both sourceElement and container cannot be null"); 2995Debug.Assert(container != null, "container cannot be null"); 3207Debug.Assert(DoubleUtil.GreaterThanOrClose(rangeEnd1, rangeStart1)); 3208Debug.Assert(DoubleUtil.GreaterThanOrClose(rangeEnd2, rangeStart2));
src\Framework\System\Windows\Interop\ActiveXHost.cs (26)
251Debug.Assert(args.Key.Length > 0, "got an empty access key"); 464Debug.Assert(this.ActiveXState == ActiveXHelper.ActiveXState.Loaded, "Failed transition"); 469Debug.Assert(this.ActiveXState == ActiveXHelper.ActiveXState.Running, "Failed transition"); 474Debug.Assert(this.ActiveXState == ActiveXHelper.ActiveXState.InPlaceActive, "Failed transition"); 479Debug.Assert(this.ActiveXState == ActiveXHelper.ActiveXState.UIActive, "Failed transition"); 483Debug.Fail("bad state"); 515Debug.Fail("how did we ever get into the open state?"); 520Debug.Assert(this.ActiveXState == ActiveXHelper.ActiveXState.InPlaceActive, "Failed transition"); 525Debug.Assert(this.ActiveXState == ActiveXHelper.ActiveXState.Running, "Failed transition"); 530Debug.Assert(this.ActiveXState == ActiveXHelper.ActiveXState.Loaded, "Failed transition"); 535Debug.Assert(this.ActiveXState == ActiveXHelper.ActiveXState.Passive, "Failed transition"); 539Debug.Fail("bad state"); 567Debug.Assert(hr == NativeMethods.S_OK, String.Format(CultureInfo.CurrentCulture, "DoVerb call failed for verb 0x{0:X}", verb)); 632Debug.Assert(this.ActiveXState == ActiveXHelper.ActiveXState.Passive, "Wrong start state to transition from"); 637Debug.Assert(_axInstance == null, "_axInstance must be null"); 640Debug.Assert(_axInstance != null, "w/o an exception being thrown we must have an object..."); 662Debug.Assert(this.ActiveXState == ActiveXHelper.ActiveXState.Loaded, "Wrong start state to transition from"); 703Debug.Assert(this.ActiveXState == ActiveXHelper.ActiveXState.Loaded, "Wrong start state to transition from"); 735Debug.Assert(this.ActiveXState == ActiveXHelper.ActiveXState.Running, "Wrong start state to transition from"); 759Debug.Assert(this.ActiveXState == ActiveXHelper.ActiveXState.Running, "Wrong start state to transition from"); 793Debug.Assert(this.ActiveXState == ActiveXHelper.ActiveXState.InPlaceActive, "Wrong start state to transition from"); 815Debug.Assert(this.ActiveXState == ActiveXHelper.ActiveXState.InPlaceActive, "Wrong start state to transition from"); 835Debug.Assert(this.ActiveXState == ActiveXHelper.ActiveXState.UIActive, "Wrong start state to transition from"); 839Debug.Assert(NativeMethods.Succeeded(hr), "Failed in IOleInPlaceObject.UiDeactivate"); 1096Debug.Assert(_axInstance != null, "The native control is null"); 1150Debug.Fail(e.ToString());
src\Framework\System\Windows\Interop\DocobjHost.cs (3)
85Debug.Assert(_mainThread.ApartmentState == ApartmentState.STA); 120Debug.Assert(lease.CurrentState == LeaseState.Initial); 1230Debug.Fail(ex.ToString());
src\Framework\System\Windows\Interop\WindowInteropHelper.cs (2)
110Debug.Assert(_window != null, "Cannot be null since we verify in the constructor"); 117Debug.Assert(_window != null, "Cannot be null since we verify in the constructor");
src\Framework\System\Windows\Localization.cs (1)
133Debug.Assert(property == AttributesProperty);
src\Framework\System\Windows\LogicalTreeHelper.cs (1)
449Debug.Assert(parentFE != null || parentFCE != null, "Either parentFE or parentFCE should be non-null");
src\Framework\System\Windows\Markup\Baml2006\Baml2006KeyRecord.cs (1)
68Debug.Assert(StaticResources[StaticResources.Count - 1] is StaticResource);
src\Framework\System\Windows\Markup\Baml2006\Baml2006Reader.cs (5)
1549Debug.Assert(dataByteSize == 1); 1689Debug.Assert(ownerType != null); 1979Debug.Assert(sr != null); 2137Debug.Assert(_context.CurrentFrame.XamlType != null, "BAML Xmlns record is only legal between ElementStart and ElementEnd"); 2619Debug.Assert(property.Type.UnderlyingType == typeof(DependencyProperty));
src\Framework\System\Windows\Markup\Baml2006\Baml2006SchemaContext.cs (1)
192Debug.Assert(wpfMember.DependencyProperty != null);
src\Framework\System\Windows\Markup\Baml2006\SharedStream.cs (1)
307System.Diagnostics.Debug.Assert(_baseStream != null, "Stream has already been disposed");
src\Framework\System\Windows\Markup\Baml2006\WpfSharedBamlSchemaContext.cs (2)
140Debug.Assert(bamlType != null); 170Debug.Assert(bamlMember != null);
src\Framework\System\Windows\Markup\Baml2006\WpfXamlMember.cs (1)
128Debug.Assert(!IsAttachable && !IsEvent);
src\Framework\System\Windows\Markup\BamlMapTable.cs (21)
92Debug.Assert(null != xamlTypeMapper); 168Debug.Assert(cmp > 0); 274Debug.Assert(type.IsEnum); 279Debug.Assert(ReflectionHelper.IsNullableType(type)); 561Debug.Assert(propType.IsEnum); 572Debug.Assert(ReflectionHelper.IsNullableType(propType)); 630Debug.Assert(-id <= _knownStrings.Length); 635Debug.Assert(id < StringIdMap.Count); 833Debug.Assert(attributeId >= 0, "Known Property Id must be a DependencyProperty."); 872Debug.Assert(memberId < 0); 1034Debug.Assert(assemblyFullName.Length != 0, "empty assembly"); 1104Debug.Assert( 1116Debug.Assert(bamlAssemblyInfoRecord.AssemblyId >= 0); 1127Debug.Assert(AssemblyIdMap.Count == record.AssemblyId || 1279Debug.Assert(TypeIdMap.Count == record.TypeId || 1296Debug.Assert(ownerTypeName != null); 1297Debug.Assert(attributeName != null); 1480Debug.Assert(GetHashTableData(stringValue) == null, 1514Debug.Assert(targetType != null && memberName != null); 1656Debug.Assert(AttributeIdMap.Count == record.AttributeId || 1672Debug.Assert(StringIdMap.Count == record.StringId ||
src\Framework\System\Windows\Markup\BamlReader.cs (2)
1402Debug.Assert(dictKey != null, "Bad Key record"); 1433Debug.Assert(keyStartRecord != null, "Bad Key Element Start record");
src\Framework\System\Windows\Markup\BamlRecordHelper.cs (1)
135Debug.Assert(false, "Unhandled case in DoesRecordTypeHaveDebugExtension");
src\Framework\System\Windows\Markup\BamlRecordReader.cs (43)
116Debug.Assert(null != bamlStream); 117Debug.Assert(null != parserContext && null != parserContext.XamlTypeMapper); 142Debug.Assert(null != parserContext && null != parserContext.XamlTypeMapper); 356Debug.Assert(bamlRecord.RecordType == BamlRecordType.LinePosition); 558Debug.Assert(bamlConnectionIdRecord.ConnectionId > 0); 570Debug.Assert(0 == ReaderContextStack.Count); // if not zero we missed an EndElement 654Debug.Assert(false); 743Debug.Assert(ReaderFlags.DependencyObject == CurrentContext.ContextType); 831Debug.Assert(ReaderFlags.DependencyObject == CurrentContext.ContextType || 1038Debug.Assert(_rootElement != null); 1088Debug.Assert(null == ParentContext); 1243Debug.Assert(!CurrentContext.CheckFlag(ReaderFlags.NeedToAddToTree), "Failed to add Element to tree before popping stack"); 1257Debug.Assert( CurrentContext.ContextType != ReaderFlags.PropertyComplexClr ); 1258Debug.Assert( CurrentContext.ContextType != ReaderFlags.PropertyComplexDP ); 1310Debug.Assert(CurrentContext.ContextType == ReaderFlags.ConstructorParams); 1340Debug.Assert(parent is DependencyObject); 1460Debug.Assert(param is String); 1503Debug.Assert(paramString != null); 1541Debug.Assert(param != null && paramList == null, "Must have a single param"); 1555Debug.Assert(param == null && paramList != null, "Must have a paramList"); 1935Debug.Assert(staticResourceValues != null, "Must have a list of StaticResourceValues for lookup"); 2008Debug.Assert(staticResourceValues != null, "Must have a list of StaticResourceValues for lookup"); 2145Debug.Assert(serializerTypeId == (short)KnownElements.DependencyPropertyConverter); 2276Debug.Assert(element is DependencyObject, "Guaranteed by PropertyDefinition constructor"); 2571Debug.Assert(o is DependencyObject); 2788Debug.Assert(element is DependencyObject); 3029Debug.Assert(!holder.ReadOnly); // this is being checked in XamlReaderHelper, just assert 3054Debug.Assert(arrayExt != null); 3173Debug.Assert (holder.Collection == null); 3494Debug.Assert( CurrentContext.ObjectData == null && CurrentContext.ExpectedType != null, 3679Debug.Assert(null != CurrentContext && 3740Debug.Assert(false); // 3749Debug.Assert(currentTarget is DependencyObject); 3764Debug.Assert(false); // We do not expect to be here after all checks done in propertyType identification above 3826Debug.Assert(genericType != null); 3870Debug.Assert(memberInfo is MethodInfo); 3886Debug.Assert(null != CurrentContext && 3936Debug.Assert(null != CurrentContext && 4292Debug.Assert(!context.CreateUsingTypeConverter, 4952Debug.Assert(contentProperty != null); 5060Debug.Assert(false, "The only remaining option is attached property, which is not allowed in xaml for content properties"); 5819Debug.Assert(_attributeInfo != null); 5918Debug.Assert(this.AttachedPropertyGetter != null);
src\Framework\System\Windows\Markup\BamlRecords.cs (29)
699Debug.Assert(false,"Assembly, Type and Attribute records are not cached, so don't ask for one."); 724Debug.Assert(false,"Unknown RecordType"); 777Debug.Assert(null == _writeCache[(int)record.RecordType]); 869set { Debug.Assert (value == -1, "Setting fixed record to an invalid size"); } 878Debug.Assert(false, "Must override RecordType"); 917Debug.Assert( value <= 3 && value >= 0 ); 1110Debug.Assert(RecordSize < 0); 1543Debug.Assert(_valuePositionPosition != -1, 1730Debug.Assert(_valuePositionPosition != -1, 2115set { Debug.Assert (value == -1, "Wrong size set for complex prop record"); } 2191set { Debug.Assert (value == -1, "Wrong size set for complex prop record"); } 2256set { Debug.Assert (value == -1, "Wrong size set for complex prop record"); } 2478Debug.Assert(value <= ExtensionIdMask); 2498set { Debug.Assert(value == -1, "Wrong size set for complex prop record"); } 2817Debug.Assert(!ValueObjectSet); 2896Debug.Assert (false, "Unknown custom serializer"); 3105set { Debug.Assert (value == -1, "Wrong size set for complex prop record"); } 3376set { Debug.Assert(value == -1, "Wrong size set for element record"); } 3471set { Debug.Assert(value == -1, "Wrong size set for element record"); } 3627Debug.Assert(_contentSizePosition != -1, 3672set { Debug.Assert(value == -1, "Wrong size set for element record"); } 3837set { Debug.Assert(value == -1, "Wrong size set for complex prop record"); } 3937set { Debug.Assert(value == -1, "Wrong size set for complex prop record"); } 4017set { Debug.Assert(value == -1, "Wrong size set for complex prop record"); } 4220Debug.Assert(FilePos != -1,"UpdateWrite called but Write Never was"); 4795Debug.Assert( SerializerTypeId != 0 ); 4952Debug.Assert((propertyMember is MethodInfo) || (propertyMember is PropertyInfo) 4972Debug.Assert(arr.Length == 3 && arr[0] != null && arr[1] != null); 5015Debug.Assert(arr.Length == 3 && arr[0] != null && arr[1] != null);
src\Framework\System\Windows\Markup\BamlRecordWriter.cs (22)
125Debug.Assert(null != DocumentStartRecord); 144Debug.Assert(null != DocumentStartRecord); 416Debug.Assert(_deferElementDepth == 0); 417Debug.Assert(_deferComplexPropertyDepth == 0); 418Debug.Assert(_staticResourceElementDepth == 0); 419Debug.Assert(_dynamicResourceElementDepth == 0); 420Debug.Assert(_staticResourceRecordList == null); 438Debug.Assert(_staticResourceElementDepth == 0); 475Debug.Assert(!InStaticResourceSection, "We do not support x:Key within a StaticResource Section"); 576Debug.Assert(!InStaticResourceSection, "We do not support x:Key within a StaticResource Section"); 613Debug.Assert(!InStaticResourceSection, "We do not support x:Shared within a StaticResource Section"); 797Debug.Assert(!InStaticResourceSection, "We do not support x:Key within a StaticResource Section"); 853Debug.Assert(keyRecord.RecordList.Count == 0, "Should have empty record list"); 879Debug.Assert(!InStaticResourceSection, "We do not support x:Key within a StaticResource Section"); 890Debug.Assert(_deferElementDepth == 2); 1079Debug.Assert(extensionTypeId != (short)KnownElements.TypeExtension); 1096Debug.Assert(typeValue != null); 1641Debug.Assert(keyRecord != null, "Unknown key record type in defer load dictionary"); 1652Debug.Assert(keyIndex == _deferKeys.Count, 1676Debug.Assert(_deferElementDepth > 0 && CollectingValues, 1684Debug.Assert(valueDeferRecord.Record != null && 1696Debug.Assert(valueDeferRecord.Record != null && valueDeferRecord.Record.RecordType == BamlRecordType.ElementEnd,
src\Framework\System\Windows\Markup\BamlWriter.cs (6)
143Debug.Assert(null != assemblyName,"assembly name returned from GetBaseElement is null"); 144Debug.Assert(null != typeFullName,"Type name returned from GetBaseElement is null"); 409Debug.Assert(typeValue != null); 1299Debug.Assert(stackNode != null); 1307Debug.Assert(stackNode != null); 1315Debug.Assert(stackNode != null);
src\Framework\System\Windows\Markup\Localizer\BamlLocalizableResource.cs (1)
70Debug.Assert(other != null);
src\Framework\System\Windows\Markup\MarkupExtensionParser.cs (3)
1205Debug.Assert(sb.Length > 0); 1206Debug.Assert(!Char.IsWhiteSpace(sb[0])); 1561Debug.Assert(null != info, "No property or method info for field Name");
src\Framework\System\Windows\Markup\Primitives\ElementMarkupObject.cs (8)
57Debug.Assert(instance != null); 743Debug.Assert(obj != null); 767Debug.Assert(descriptor != null); 816Debug.Assert(DO != null); 961Debug.Assert(typeSerializer != null, "typeSerializer for Enum was null"); 1021Debug.Assert(serializer != null && serializer.CanConvertToString(_object.Instance, _object.Context), 1031Debug.WriteLine("ElementMarkupObject.Items is not implemented"); 1046Debug.Assert(serializer != null && serializer.CanConvertToString(_object.Instance, _object.Context),
src\Framework\System\Windows\Markup\Primitives\ExtensionSimplifierMarkupObject.cs (3)
311Debug.Fail("No items where found and IsComposite return true"); 322Debug.Assert(typeSerializer != null, "Could not retrieve typeSerializer for Type"); 357Debug.Assert(!propertyWritten, "An argument was returned after a property was set. All arguments must be returned first and in order");
src\Framework\System\Windows\Markup\Primitives\FrameworkElementFactoryMarkupObject.cs (2)
35Debug.Assert(factory != null); 207Debug.Fail("Unexpected property value type");
src\Framework\System\Windows\Markup\Primitives\MarkupWriter.cs (9)
274Debug.Assert( (object)key != null); 458Debug.Assert(item != null && _writer != null); 523Debug.Assert(!noOtherPropertiesAllowed || property.IsKey, 543Debug.Assert(first, "Problem with MarkupObject implemenation: Items returning a ValueAsString can have no other properties"); 559Debug.Assert(dependencyProperty != null, "Problem with MarkupObject implementation: If PropertyDescriptor is null one of the following needs to be true; IsKey, IsValueAsString, IsConstructorArgument, or DependencyProperty is not null"); 706Debug.Assert(!property.IsValueAsString, "Problem with MarkupObject implementation: String values cannnot be composite"); 847Debug.Assert(property.PropertyDescriptor != null); 1051Debug.Assert(property.Value != null); 1380Debug.Assert( ((bool)_xmlnsSpacePreserve) == _containingScope.XmlnsSpacePreserve ,
src\Framework\System\Windows\Markup\StyleModeStack.cs (2)
47Debug.Assert(Depth >= 0, "StyleModeStack's depth was " + Depth + ", should be >= 0"); 64Debug.Assert(Depth >= 0, "StyleMode::Pop() with depth of " + Depth + ", should be >= 0");
src\Framework\System\Windows\Markup\WpfXamlLoader.cs (2)
300System.Diagnostics.Debug.Assert(count == 0, "Mismatch StartMember/EndMember"); 370System.Diagnostics.Debug.Assert(xamlReader.Value is string, "XmlAttributeProperties.XmlSpaceProperty has the type string.");
src\Framework\System\Windows\Markup\XamlFigureLengthSerializer.cs (1)
260Debug.Assert( unit == FigureUnitType.Pixel
src\Framework\System\Windows\Markup\XamlGridLengthSerializer.cs (1)
262Debug.Assert( unit == GridUnitType.Pixel
src\Framework\System\Windows\Markup\XamlReader.cs (1)
1057Debug.Assert(parent == null || root == parent);
src\Framework\System\Windows\Markup\XamlStream.cs (12)
105Debug.Assert(null != buffer,"Null buffer past to the Writer"); 117Debug.Assert(null != writeBuffer,"Null writeBuffer returned"); 137Debug.Assert(0 < bufferWriteCount,"Not writing any bytes to the buffer"); 142Debug.Assert(bufferOffset < BufferSize,"Trying to Read past bufer"); 263Debug.Assert(bufferOffset < BufferSize,"Calculated bufferOffset is greater than buffer"); 283Debug.Assert(0 < bufferReadCount,"Not reading any bytes to the buffer"); 288Debug.Assert(bufferOffset < BufferSize,"Trying ot read past buffer"); 413Debug.Assert(bufferOffset < BufferSize,"Calculated bufferOffset is greater than buffer"); 418Debug.Assert(bufferArray.Count == bufferIndex,"Need to allocate more than one buffer"); 419Debug.Assert(false == reader,"Allocating a buffer on Read"); 830Debug.Assert(false,"Close called on ReaderStream"); 838Debug.Assert(false,"Flush called on ReaderStream");
src\Framework\System\Windows\Markup\XamlTypeMapper.cs (32)
910Debug.Assert(null != attribInfo, "null attribInfo"); 911Debug.Assert(null != currentParentType, "null currentParentType"); 950Debug.Assert(propertyOwnerType != null); 979Debug.Assert(attachedPropertyInfo.IsPublic || 1029Debug.Assert(null != localName, "null localName"); 1030Debug.Assert(null != xmlNamespace, "null xmlNamespace"); 1681Debug.Assert(null != eventName, "null eventName"); 1682Debug.Assert(null != owner, "null owner"); 1726Debug.Assert(null != localName, "null localName"); 1727Debug.Assert(null != xmlNamespace, "null xmlNamespace"); 1765Debug.Assert(null != baseType, "baseType not set"); 1858Debug.Assert(null != localName, "null localName"); 1859Debug.Assert(null != xmlNamespace, "null xmlNamespace"); 2001Debug.Assert(typeInfo != null, "Must have cached type info at this point"); 2221Debug.Assert( propertyMember is DependencyProperty); 2403Debug.Assert(memberName != null); 2406Debug.Assert(memberInfo != null); 2421Debug.Assert(targetType != null); 2498Debug.Assert(null != xmlNamespace,"null value passed for xmlNamespace"); 2499Debug.Assert(null != localName,"null value passed for localName"); 2538Debug.Assert(null != xmlNamespace,"null value passed for xmlNamespace"); 2539Debug.Assert(null != localName,"null value passed for localName"); 2689Debug.Assert(namespaceMap.ClrNamespace != null,"Null CLR Namespace"); 2690Debug.Assert(localName != null,"Null localName"); 3669Debug.Assert(null != type, "Null passed for type to GetTypeConverterType"); 3700Debug.Assert(null != type, "Null passed for type to GetTypeConverter"); 3744Debug.Assert(null != propType, "Null passed for propType to GetPropertyConverterType"); 3788Debug.Assert(null != propType, "Null passed for propType to GetPropertyConverter"); 3907Debug.Assert(_constructors != null, "This operation is legal only after the constructors have been fetched"); 3973Debug.Assert(null != type, "null value for type passed to GetWhitespace"); 3985Debug.Assert(1 == trimAttribute.Length,"More than one TrimWhitespace Attribute"); 4240Debug.Assert(_dpLookupHashtable != null,
src\Framework\System\Windows\Markup\XmlnsDictionary.cs (1)
722Debug.Assert(prefix != null);
src\Framework\System\Windows\Media\Animation\BeginStoryboard.cs (3)
179Debug.Assert( fe != null || fce != null, "Caller of internal function failed to verify that we have a FE or FCE - we have neither." ); 188Debug.Assert( frameworkTemplate != null ); 198Debug.Assert( fe != null, "Invoke needs an object as starting point");
src\Framework\System\Windows\Media\Animation\ControllableStoryboardAction.cs (4)
61Debug.Assert( fe != null || fce != null, "Caller of internal function failed to verify that we have a FE or FCE - we have neither." ); 62Debug.Assert( targetStyle != null || frameworkTemplate != null, 72Debug.Assert( frameworkTemplate != null ); 81Debug.Assert( fe != null, "Invoke needs an object as starting point");
src\Framework\System\Windows\Media\Animation\Generated\ThicknessAnimation.cs (2)
220Debug.Assert(animationClock.CurrentState != ClockState.Stopped); 318Debug.Fail("Unknown animation type.");
src\Framework\System\Windows\Media\Animation\Generated\ThicknessAnimationUsingKeyFrames.cs (7)
336Debug.Assert(animationClock.CurrentState != ClockState.Stopped); 361Debug.Assert(maxKeyFrameIndex >= 0, "maxKeyFrameIndex is less than zero which means we don't actually have any key frames."); 645Debug.Assert(_areKeyTimesValid, "The key frames must be resolved and sorted before calling GetResolvedKeyFrameValue"); 652Debug.Assert(_areKeyTimesValid, "The key frames must be resolved and sorted before calling GetResolvedKeyFrame"); 702Debug.Assert(!_areKeyTimesValid, "KeyFrameThicknessAnimaton.ResolveKeyTimes() shouldn't be called if the key times are already valid."); 844Debug.Assert(index < keyFrameCount, 920Debug.Assert(_keyFrames != null && _keyFrames.Count > 2,
src\Framework\System\Windows\Media\Animation\Generated\ThicknessKeyFrameCollection.cs (1)
491Debug.Assert(_keyFrames[index] != null);
src\Framework\System\Windows\Media\Animation\PauseStoryboard.cs (1)
26Debug.Assert( containingFE != null || containingFCE != null,
src\Framework\System\Windows\Media\Animation\RemoveStoryboard.cs (1)
26Debug.Assert( containingFE != null || containingFCE != null,
src\Framework\System\Windows\Media\Animation\ResumeStoryboard.cs (1)
26Debug.Assert( containingFE != null || containingFCE != null,
src\Framework\System\Windows\Media\Animation\SeekStoryboard.cs (1)
91Debug.Assert( containingFE != null || containingFCE != null,
src\Framework\System\Windows\Media\Animation\SetStoryboardSpeedRatio.cs (1)
49Debug.Assert( containingFE != null || containingFCE != null,
src\Framework\System\Windows\Media\Animation\SkipStoryboardToFill.cs (1)
26Debug.Assert( containingFE != null || containingFCE != null,
src\Framework\System\Windows\Media\Animation\StopStoryboard.cs (1)
26Debug.Assert( containingFE != null || containingFCE != null,
src\Framework\System\Windows\Media\Animation\Storyboard.cs (9)
265Debug.Assert( nameScope == null ); 575Debug.Assert( mappedObject == null || mappedObject is AnimationClock || mappedObject is List<AnimationClock>, 616Debug.Assert( value is AnimationClock || value is List<AnimationClock> , 690Debug.Assert( i > 0, "The caller should not have set the PropertyPath context to a null object." ); 745Debug.Assert( i > 0, "The caller should not have set the PropertyPath context to a non DependencyObject." ); 810Debug.Assert(path.Length > 1, "This method shouldn't even be called for a simple property path."); 860Debug.Assert(targetPropertyValue is Freezable, "We shouldn't be trying to clone a type we don't understand. PropertyCloningRequired() has improperly flagged the current value as 'need to clone'."); 980Debug.Assert(cacheEntry.Source != DependencyProperty.UnsetValue, 2121Debug.Assert( target != null && clone != null && property != null && original != null,
src\Framework\System\Windows\MultiTrigger.cs (1)
130Debug.Assert( TriggerConditions[i].SourceChildIndex == 0,
src\Framework\System\Windows\Navigation\Journal.cs (13)
271Debug.Assert(ValidateIndexes()); 281Debug.Assert(ValidateIndexes()); 297Debug.Assert(journalEntry.ContentId != 0); 298Debug.Assert(!(journalEntry.IsAlive() && journalEntry.JEGroupState.JournalDataStreams != null), 328Debug.Assert(_uncommittedCurrentIndex == _currentEntryIndex, 347Debug.Assert(ValidateIndexes()); 441Debug.Assert(IsNavigable(target), "target must be navigable"); 442Debug.Assert(ValidateIndexes()); 489Debug.Assert(je.GetType().IsSerializable); 508Debug.Assert(index < TotalCount && index >= 0, "Invalid index passed to RemoveEntryInternal"); 509Debug.Assert(_uncommittedCurrentIndex == _currentEntryIndex, 513Debug.Assert(theEntry != null, "Journal list state is messed up"); 593Debug.Assert(ValidateIndexes());
src\Framework\System\Windows\Navigation\JournalEntry.cs (3)
307Debug.Assert(!_jeGroupState.JournalDataStreams.HasAnyData, 324Debug.Assert(_jeGroupState.JournalDataStreams == null); 341Debug.Assert(navMode == NavigationMode.Back || navMode == NavigationMode.Forward);
src\Framework\System\Windows\Navigation\NavigationService.cs (45)
115Debug.Assert(e != null, "Hyperlink fired Navigate event with null NavigateEventArgs"); 128Debug.Assert(dobj != null, "RequestNavigateEventArgs.OriginalSource should be DependencyObject"); 284Debug.Assert(_bp != null, "NavigationService should not handle a nav from a hyperlink thats not in its hosted tree"); 290Debug.Assert(IsConsistent(navInfo)); 322Debug.Assert(navMode != NavigationMode.Refresh); // because of !IsSameUri() above 343Debug.Assert(_navStatus == NavigationStatus.Navigating); 520Debug.Assert(!(_bp is Visual)); 726Debug.Assert(_parentNavigationService == newParent); 766Debug.Assert(ChildNavigationServices.Contains(ncChild), "Child NavigationService must already exist"); 829Debug.Assert(fe != null, "INavigatorHost needs to be FrameworkElement"); 1005Debug.Assert(_navigateQueueItem == null && _navStatus == NavigationStatus.Navigated); 1029Debug.Assert(finishingChildPageFunction == null || 1048Debug.Assert(finishingChildPageFunction._Return == null); 1082Debug.Assert(pfReturnInfo == null); 1088Debug.Assert(pf.ParentPageFunctionId != Guid.Empty); 1127Debug.Assert(IsConsistent(navInfo)); 1152Debug.Assert(!JournalScope.Journal.HasUncommittedNavigation); 1156Debug.Assert(_navigateQueueItem == null); 1297Debug.Assert(bpu == null || 1327Debug.Assert(navMode == NavigationMode.Refresh, 1345Debug.Assert(!JournalScope.Journal.HasUncommittedNavigation); 1362Debug.Assert(navMode == NavigationMode.Back || navMode == NavigationMode.Forward); 1365Debug.Assert(_contentId != 0); 1369Debug.Assert(_journalEntryGroupState == null || 2121Debug.Assert(PendingNavigationList.Count == 0, 2231Debug.Assert(this.Application != null && 2285Debug.Assert(navigateInfo.IsConsistent); 2286Debug.Assert(source == null || 2336Debug.Assert(PendingNavigationList.Count == 0, 2346Debug.Assert(_navigateQueueItem == null, "Previous nav queue item should be cleared by now."); 2441Debug.Assert(_navStatus == NavigationStatus.Navigated); 2784Debug.Assert(sender == _bp); 3313Debug.Assert(IsConsistent(navigateInfo)); 3345Debug.Assert(navigationMode == NavigationMode.New || 3350Debug.Assert(destinationJournalEntry == null 3433Debug.Assert(_contentId != 0 && 3976Debug.Assert(ps._Resume); // should've been set by JournalEntryPFxx.ResumePageFunction() 4005Debug.Assert(_navigateQueueItem == null, 4081Debug.Assert(parentPF._Return == null); 4183Debug.Assert(parentEntryIndex < journal.CurrentIndex); 4188Debug.Fail("Could not find the finishing PageFunction in the journal."); 4245Debug.Fail("Unhandled scenario: PageFunction returning to " + parentEntry.GetType().Name); 4688Debug.Assert(_postedOp == null); 4779Debug.Assert(child != null); 4805Debug.Assert(node != null, "Trying to dispose a null Logical Tree Node");
src\Framework\System\Windows\Navigation\NavigationWindow.cs (10)
247Debug.Assert(_navigationService == null && _JNS == null); 340Debug.Assert(_JNS != null); 1044Debug.Assert(nw != null, "sender must be of type NavigationWindow."); 1051Debug.Assert(nw != null, "sender must be of type NavigationWindow."); 1059Debug.Assert(nw != null, "sender must be of type NavigationWindow."); 1066Debug.Assert(nw != null, "sender must be of type NavigationWindow."); 1074Debug.Assert(nw != null, "sender must be of type NavigationWindow."); 1081Debug.Assert(nw != null, "sender must be of type NavigationWindow."); 1088Debug.Assert(nw != null, "sender must be of type NavigationWindow."); 1100Debug.Assert(nw != null, "sender must be of type NavigationWindow.");
src\Framework\System\Windows\Navigation\PageFunction.cs (2)
279Debug.Assert((returnEventArgs == null) || (ra != null)); 283Debug.Assert(eh != null);
src\Framework\System\Windows\PropertyPath.cs (1)
435Debug.Assert(aryIPI.Length > 0);
src\Framework\System\Windows\ResourceDictionary.cs (16)
196Debug.Assert(classicResourceUri != null); 210Debug.Assert(genericResourceUri != null); 549Debug.Assert(_numDefer > 0, "The stream was closed before all deferred content was loaded."); 962Debug.Assert(IsInitialized == false, "Dictionary should not be initialized when EndInit is called"); 1023Debug.Assert(_numDefer > 0, "The stream was closed before all deferred content was loaded."); 1099Debug.Assert(deferrableContent.Stream != null); 1100Debug.Assert(deferrableContent.SchemaContext != null); 1101Debug.Assert(deferrableContent.ObjectWriterFactory != null); 1102Debug.Assert(deferrableContent.ServiceProvider != null); 1103Debug.Assert(deferrableContent.RootObject != null); 1281Debug.Assert(staticResources != null && staticResources.Count > 0); 1300Debug.Assert(keyValue != null, "Didn't find the ResourceKey property or x:PositionalParameters directive"); 1304Debug.Assert(false, "StaticResources[] entry is not a StaticResource not OptimizedStaticResource"); 1319Debug.Assert(obj is DeferredResourceReference); 1760Debug.Assert(resourceKey != null, "ResourceKey cannot be null"); 2279Debug.Assert(IsThemeDictionary || _ownerApps != null || IsReadOnly, "This must be an App/Theme/Style/Template ResourceDictionary");
src\Framework\System\Windows\ResourceDictionaryCollection.cs (1)
14Debug.Assert(owner != null, "ResourceDictionaryCollection's owner cannot be null");
src\Framework\System\Windows\ResourceReferenceExpression.cs (2)
112Debug.Assert(_targetObject == d, "TargetObject that this expression is attached to must be the same as the one on which its value is being queried"); 552Debug.Assert(!_resource.IsFrozen);
src\Framework\System\Windows\ResourcesChangeInfo.cs (1)
224Debug.Assert(_oldDictionaries != null || _newDictionaries != null || _key != null, "Must have a dictionary or a key that has changed");
src\Framework\System\Windows\Shapes\Shape.cs (5)
637Debug.Assert(mode != Stretch.None); 659Debug.Assert(mode == Stretch.UniformToFill); 691Debug.Assert(geometry != null); 731Debug.Assert(geometry != null); 742Debug.Assert(_renderedGeometry != null);
src\Framework\System\Windows\Shell\JumpList.cs (12)
561Debug.Assert(_initializing == false); 796Debug.Assert(removedList != null); 797Debug.Assert(shellObject != null); 875Debug.Assert(false); 885Debug.Assert(shellObjects != null); 930Debug.Assert(jumpItems.Count != 0); 931Debug.Assert(cdl != null); 986Debug.Assert(jumpItems.Count != linksOnlyList.Count); 992Debug.Assert(HRESULT.DESTS_E_NO_MATCHING_ASSOC_HANDLER != hr); 1016Debug.Assert(jumpTask != null); 1133Debug.Assert(jumpPath != null); 1207Debug.Assert(false);
src\Framework\System\Windows\Shell\ThumbButtonInfo.cs (1)
279Debug.Assert(command != null);
src\Framework\System\Windows\StaticResourceExtension.cs (1)
255Debug.Assert(ambientList != null, "IAmbientProvider.GetAllAmbientValues no longer returns List<>, please copy the list");
src\Framework\System\Windows\Style.cs (3)
367Debug.Assert(resourceKey != null, "Argument cannot be null"); 659Debug.Assert(setterBase != null, "Setter collection must contain non-null instances of SetterBase"); 688Debug.Assert(setterBase is EventSetter,
src\Framework\System\Windows\StyleHelper.cs (91)
60Debug.Assert(fe != null || fce != null); 99Debug.Assert(fe != null || fce != null); 165Debug.Assert((fe != null && fce == null)|| (fe == null && fce != null)); 360Debug.Assert(frameworkTemplate != null ); 380Debug.Assert( !frameworkTemplate.HasXamlNodeContent ); 384Debug.Assert(frameworkTemplate != null); 425Debug.Assert( frameworkTemplate != null ); 723Debug.Assert(freezable.IsFrozen, "Freezable within a Style or Template should have been frozen by now"); 779Debug.Assert(childIndex >= 0); 1133Debug.Assert(action.IsSealed, "TriggerAction should have already been sealed by this point."); 1287Debug.Assert( childIndex != 0 ); // This should go to the other AddDelegateToFireTrigger overload 1345Debug.Assert((fe != null && fce == null) || (fe == null && fce != null)); 1377Debug.Assert((fe != null && fce == null) || (fe == null && fce != null)); 1378Debug.Assert((fe != null && fe == container) || (fce != null && fce == container)); 1379Debug.Assert(newStyle != null || newFrameworkTemplate != null ); 1441Debug.Assert((fe != null && fce == null) || (fe == null && fce != null)); 1442Debug.Assert((fe != null && fe == container) || (fce != null && fce == container)); 1443Debug.Assert(oldStyle != null || oldFrameworkTemplate != null ); 1502Debug.Assert((container is FrameworkElement) || (container is FrameworkContentElement), "Caller has queried with non-framework element. Bad caller, bad!"); 1503Debug.Assert(dataType < InstanceStyleData.ArraySize, "Caller has queried using a value outside the range of the Enum. Bad caller, bad!"); 1606Debug.Assert(!freezable.CanFreeze, "If a freezable could have been frozen it would have been done by now."); 1633Debug.Assert(instanceValues != null, "InstanceValues hashtable should have been created at initialization time."); 1677Debug.Assert(oldStyle != null || oldFrameworkTemplate != null ); 1695Debug.Assert(dataField == ThemeStyleDataField); 1777Debug.Assert(frameworkTemplate != null ); 1818Debug.Assert(treeRoot is FrameworkElement || treeRoot is FrameworkContentElement, 1866Debug.Assert(treeRoot == null || treeRoot is FrameworkElement || treeRoot is FrameworkContentElement, 1902Debug.Assert(frameworkTemplate != null, "Only FrameworkTemplate has the ability to build a VisualTree by this means"); 1977Debug.Assert( null == VisualTreeHelper.GetParent(child), 2051Debug.Assert(frameworkTemplate != null ); 2065Debug.Assert( feWalkNode != null || fceWalkNode != null, 2138Debug.Assert(feContainer != null || fceContainer != null, 2157Debug.Assert(templatedChildren.Count > 0, 2189Debug.Assert(feContainer != null || fceContainer != null); 2224Debug.Assert(oldFrameworkTemplate != null ); 2273Debug.Assert( oldFrameworkTemplate != null ); 2401Debug.Assert(sender is FrameworkElement || sender is FrameworkContentElement, 2456Debug.Assert(sender is FrameworkElement || sender is FrameworkContentElement, 2487Debug.Assert( feTemplatedParent != null ); 2490Debug.Assert(templatedParentTemplate != null, "Must have a VisualTree owner"); 2511Debug.Assert(ownerStyle != null || frameworkTemplate != null ); 2523Debug.Assert( frameworkTemplate != null ); 2535Debug.Assert(action.ContainingTrigger is EventTrigger, 2626Debug.Assert(child.IsValid, "child should either be an FE or an FCE"); 2892Debug.Assert(dataField == ThemeStyleDataField); 2978Debug.Assert(value != NotYetApplied, "attempt to retrieve instance value that was never set"); 3158Debug.Assert(fe != null || fce != null); 3240Debug.Assert(fe != null || fce != null); 3312Debug.Assert(feContainer != null); 3321Debug.Assert(feContainer != null); 3361Debug.Assert(feContainer != null); 3384Debug.Assert(feContainer != null); 3412Debug.Assert(feContainer != null); 3456Debug.Assert(fe != null || fce != null); 3457Debug.Assert(container == fe || container == fce); 3497Debug.Assert(fe != null || fce != null); 3498Debug.Assert(container == fe || container == fce); 3499Debug.Assert( oldTemplate == null || oldTemplate is FrameworkTemplate, 3501Debug.Assert( newTemplate == null || newTemplate is FrameworkTemplate, 3503Debug.Assert( (oldTemplate == null || newTemplate == null ) || 3907Debug.Assert(sourceType == ValueLookupType.Simple || 3937Debug.Assert(sourceType == ValueLookupType.Trigger || 3991Debug.Assert(sourceType == ValueLookupType.Simple || 4091Debug.Assert(styledChildren != null, "Should reach here only if the template tree has already been created"); 4201Debug.Assert(child.FE != null || child.FCE != null); 4220Debug.Assert(dp != null, "dp must not be null"); 4310Debug.Assert(ownerStyle != null || frameworkTemplate != null ); 4352Debug.Assert(candidateTrigger is List<TriggerBase>, "Internal data structure error: The FrugalMap [Style/Template].PropertyTriggersWithActions " + 4382Debug.Assert(ownerStyle != null || frameworkTemplate != null ); 4453Debug.Assert( triggerBase is MultiDataTrigger, 4489Debug.Assert( triggerBase is MultiTrigger, 4553Debug.Assert( ft != null ); 4832Debug.Assert(!(action.ContainingTrigger is EventTrigger), 4848Debug.Assert( trigger.Property == changedProperty, 4855Debug.Assert( frameworkTemplate != null, 4863Debug.Assert( conditions != null && conditions.Length == 1, 4893Debug.Assert( conditions != null && conditions.Length == 1, 4926Debug.Assert( frameworkTemplate != null, 4937Debug.Assert(evaluationNode != null, 4999Debug.Assert( evaluationBinding != null, 5064Debug.Assert( existing is List<TriggerBase>, 5110Debug.Assert( existing is List<TriggerBase>, 5283Debug.Assert(candidateTrigger is List<TriggerBase>, "Internal data structure error: The HybridDictionary [Style/Template].DataTriggersWithActions " + 5316Debug.Assert(frameworkTemplate != null ); 5323Debug.Assert(frameworkTemplate != null); 5347Debug.Assert(frameworkTemplate != null); 5392Debug.Assert(frameworkTemplate != null ); 5397Debug.Assert(frameworkTemplate != null); 5453Debug.Assert( 5559Debug.Assert(routedEvent != null); 5815Debug.Assert(false, "GetHashCode for value types will use reflection to generate the hashcode. Write a better hash code generation algorithm if this struct is to be used in a hashtable, or remove this assert if it's decided that reflection is OK.");
src\Framework\System\Windows\SystemResourceKey.cs (1)
1865Debug.Assert(((SystemResourceKeyID.InternalSystemColorsStart < id) && (id < SystemResourceKeyID.InternalSystemColorsEnd)) ||
src\Framework\System\Windows\SystemResources.cs (10)
363Debug.Assert(typeKey != null || resourceKey != null, "typeKey or resourceKey should be non-null"); 1135Debug.Assert(hwndDpiInfo == hwndDpiInfoKey); 1163Debug.Assert(_hwndNotify != null); 1164Debug.Assert(_hwndNotifyHook != null); 1165Debug.Assert(callerName.Equals(nameof(EnsureResourceChangeListener), StringComparison.InvariantCulture)); 1193Debug.Assert(!_hwndNotify.ContainsKey(hwndDpiInfo)); 1194Debug.Assert(hwndDpiInfo.DpiAwarenessContextValue == dpiContextValue); 1236Debug.Assert(dpiContextValue == DpiAwarenessContextValue.Unaware || dpiContextValue == DpiAwarenessContextValue.SystemAware); 1641Debug.Assert(hwndDpiInfo != null); 1901Debug.Assert(_inflatedList != null);
src\Framework\System\Windows\SystemThemeKey.cs (1)
31Debug.Assert(id > SystemResourceKeyID.InternalSystemThemeStylesStart &&
src\Framework\System\Windows\TemplateContent.cs (11)
39Debug.Assert(_xamlType == null); 247Debug.Assert(TemplateLoadData.Reader != null); 649Debug.Assert(iReader != null, "Template's Reader is not a Indexing Reader"); 680Debug.Assert(sharedValue != null); 820Debug.Assert(xamlReader.NodeType == Xaml.XamlNodeType.StartObject); 821Debug.Assert(xamlReader.Type.UnderlyingType == typeof(StaticResourceExtension)); 843Debug.Assert(resource != null); 866Debug.Assert(xamlReader.NodeType == System.Xaml.XamlNodeType.StartMember); 961Debug.Assert(xamlReader.NodeType == System.Xaml.XamlNodeType.StartObject); 1220Debug.Assert(xamlReader.NodeType == System.Xaml.XamlNodeType.EndMember); 1299Debug.Assert(templateChildName != null);
src\Framework\System\Windows\TemplateNameScope.cs (4)
54Debug.Assert(templatedParent == null || (templatedParent is FrameworkElement || templatedParent is FrameworkContentElement), 165Debug.Assert(_affectedChildren.Count == childIndex); 202Debug.Assert(false, "Should never be trying to unregister via this interface for templates"); 215Debug.Assert(fo.IsFE);
src\Framework\System\Windows\ThemeDictionaryExtension.cs (2)
199Debug.Assert(dictionary != null, "dictionary should not be null"); 200Debug.Assert(assemblyName != null, "assemblyName should not be null");
src\Framework\System\Windows\TreeChangeInfo.cs (2)
59Debug.Assert(d != null, "Must have non-null current node"); 118Debug.Assert(!inheritableProperties.Contains(dp), "EffectiveValues cache must not contains duplicate entries for the same DP");
src\Framework\System\Windows\TreeWalkHelper.cs (14)
43Debug.Assert(fe != null || fce != null, "Node with the tree change notification must be an FE or an FCE."); 44Debug.Assert(parent != null, "Must have a parent that the current node is connected to or disconnected from."); 252Debug.Assert(fe != null || fce != null, "Must have non-null current node"); 275Debug.Assert(inheritableProperty.IsPotentiallyInherited, "if we got here, it means that this property is inheritable by someone"); 292Debug.Assert(!currentInheritableProperties.Contains(inheritableProperty), "InheritableProperties list should not have duplicates"); 327Debug.Assert(d != null, "Must have non-null current node"); 330Debug.Assert(fMetadata.IsInherited == true, "This must be an inherited dependency property"); 333Debug.Assert(!wasSelfInheritanceParent || isSelfInheritanceParent, "IsSelfInheritanceParent changed from true to false"); 464Debug.Assert(fe != null || fce != null, "Node with the resources change notification must be an FE or an FCE."); 522Debug.Assert(d != null, "Must have non-null current node"); 687Debug.Assert(d != null, "Must have non-null current node"); 750Debug.Assert(d != null, "Must have non-null current node"); 912Debug.Assert(fo.IsValid, "Node with the resources change notification must be an FE or an FCE."); 944Debug.Assert(d != null, "Must have non-null current node");
src\Framework\System\Windows\Trigger.cs (2)
238Debug.Assert( TriggerConditions != null && TriggerConditions.Length == 1, 241Debug.Assert( TriggerConditions[0].SourceChildIndex == 0,
src\Framework\System\Windows\TriggerActionCollection.cs (1)
281Debug.Assert (Owner == null);
src\Framework\System\Windows\TriggerBase.cs (1)
377Debug.Assert( false,
src\Framework\System\Windows\TriggerCollection.cs (1)
106Debug.Assert (Owner == null);
src\Framework\System\Windows\Window.cs (57)
405Debug.Assert(_threadWindowHandles == null, "_threadWindowHandles must be null before enumerating the thread windows"); 753Debug.Assert(false); 1426Debug.Assert( IsSourceWindowNull == false , "IsSourceWindowNull cannot be true when _showingAsDialog is true"); 2372Debug.Assert( _swh != null ); 2381Debug.Assert( _swh != null ); 3114Debug.Assert( IsSourceWindowNull == false , "IsSourceWindowNull cannot be true when calling this function"); 3323Debug.Assert(Manager != null, "HwndStyleManager must have a valid value here"); 3659Debug.Assert(w != null, "Target must be of type Window."); 3682Debug.Assert(_threadWindowHandles != null, "_threadWindowHandles must not be null at this point"); 3710Debug.Assert(_threadWindowHandles != null, "_threadWindowHandles must not be null at this point"); 3866Debug.Assert(IsSourceWindowNull == false, "_swh should not be null here"); 3992Debug.Assert(hMonitor != IntPtr.Zero); 4034Debug.Assert(workAreaWidthDeviceUnits >= 0, String.Format(CultureInfo.InvariantCulture, "workAreaWidth ({0})for monitor ({1}) is negative", hMonitor, workAreaWidthDeviceUnits)); 4035Debug.Assert(workAreaHeightDeviceUnits >= 0, String.Format(CultureInfo.InvariantCulture, "workAreaHeight ({0}) for monitor ({1}) is negative", hMonitor, workAreaHeightDeviceUnits)); 4045Debug.Assert(IsSourceWindowNull == false, "_swh should not be null here"); 4180Debug.Assert(false, "Invalid value for ResizeMode"); 4593Debug.Assert(_showingAsDialog == true, "_showingAsDialog must be true when DoDialogHide is called"); 4636Debug.Assert(_threadWindowHandles != null, "_threadWindowHandles must not be null at this point"); 4683Debug.Assert(ownedWindows.Count == 0, "All owned windows should now be gone"); 5258Debug.Assert(w != null, "DependencyObject must be of type Window."); 5284Debug.Assert(w != null, "DependencyObject must be of type Window."); 5303Debug.Assert(w != null, "DependencyObject must be of type Window."); 5374Debug.Assert(w != null, "DependencyObject must be of type Window."); 5511Debug.Assert(w != null, "DependencyObject must be of type Window."); 5542Debug.Assert(w != null, "DependencyObject must be of type Window."); 5835Debug.Assert(_dispatcherFrame == null, "_dispatcherFrame must be null here"); 5907Debug.Assert(w != null, "DependencyObject must be of type Window."); 5918Debug.Assert(w != null, "DependencyObject must be of type Window."); 5978Debug.Assert(w != null, "d must be typeof Window"); 6005Debug.Assert(w != null, "d must be typeof Window"); 6044Debug.Assert(w != null, "d must be typeof Window"); 6082Debug.Assert(w != null, "d must be typeof Window"); 6103Debug.Assert(w != null, "d must be typeof Window"); 6144Debug.Assert(w != null, "d must be typeof Window"); 6242Debug.Assert(false, String.Format("specifiedRestoreBounds can't be {0}", specifiedRestoreBounds)); 6386Debug.Assert( w != null, "DependencyObject must be of type Window." ); 6461Debug.Assert( w != null, "DependencyObject must be of type Window." ); 6523Debug.Assert( IsSourceWindowNull == false , "IsSourceWindowNull cannot be true when calling this function"); 6546Debug.Assert( w != null, "DependencyObject must be of type Window." ); 6578Debug.Assert(w != null, "DependencyObject must be of type Window."); 6777Debug.Assert(0 != (int)_overlaySize.Width); 6778Debug.Assert(0 != (int)_overlaySize.Height); 6826Debug.Assert(null != _taskbarList); 6852Debug.Assert(false); 6875Debug.Assert(null != _taskbarList); 6889Debug.Assert(0 <= taskbarInfo.ProgressValue && taskbarInfo.ProgressValue <= 1); 6901Debug.Assert(null != _taskbarList); 6930Debug.Assert(null != _taskbarList); 7011Debug.Assert(null != _taskbarList); 7043Debug.Assert(null != _taskbarList); 7524Debug.Assert( _swh != null ); 7798Debug.Assert( sourceWindow != null ); 7915Debug.Assert(IsSourceWindowNull != true, "IsSourceWindowNull cannot be true here"); 8041Debug.Assert( IsSourceWindowNull == false , "Should only be invoked when we know Handle is non-null" ); 8060Debug.Assert( IsSourceWindowNull == false , "Should only be invoked when we know Handle is non-null" ); 8095Debug.Assert( IsSourceWindowNull == false , "IsSourceWindowNull can't be true here"); 8119Debug.Assert( IsSourceWindowNull == false , "IsSourceWindowNull can't be true here");
src\Framework\System\Windows\WindowCollection.cs (1)
46Debug.Assert(count >= 0, "count must not be less than zero");
src\Shared\MS\Internal\Xaml\Context\XamlContextStack.cs (5)
24Debug.Assert(CurrentFrame != null); 25Debug.Assert(CurrentFrame.Depth == Depth); 83Debug.Assert(iteratorFrame != null); 107Debug.Assert(CurrentFrame.Depth == Depth); 120Debug.Assert(CurrentFrame.Depth == Depth);
src\Shared\MS\Internal\Xaml\Context\XamlFrame.cs (1)
40Debug.Assert(_depth != -1, "Context Frame is uninitialized");
PresentationFramework.Aero (4)
parent\Shared\Microsoft\Windows\Themes\DataGridHeaderBorder.cs (3)
332Debug.Assert(_freezableCache.Count == size, "The cache size does not match the requested amount."); 359Debug.Assert((freezable == null) || freezable.IsFrozen, "Cached Freezables should have been frozen."); 369Debug.Assert(freezable.IsFrozen, "Cached Freezables should be frozen.");
parent\Shared\Microsoft\Windows\Themes\PlatformCulture.cs (1)
35Debug.Assert(_platformCulture != null);
PresentationFramework.Classic (22)
Microsoft\Windows\Themes\ClassicBorderDecorator.cs (18)
240Debug.Assert(rgbColor.Red >= 0 && rgbColor.Red <= 1, "Red must be between 0 and 1."); 241Debug.Assert(rgbColor.Green >= 0 && rgbColor.Green <= 1, "Green must be between 0 and 1."); 242Debug.Assert(rgbColor.Blue >= 0 && rgbColor.Blue <= 1, "Blue must be between 0 and 1."); 304Debug.Assert(hue >= 0 && hue <= 1, "Output hue should be between 0 and 1."); 305Debug.Assert(lightness >= 0 && lightness <= 1, "Output lightness should be between 0 and 1."); 306Debug.Assert(saturation >= 0 && saturation <= 1, "Output saturation should be between 0 and 1."); 308Debug.Assert(!isHueDefined || isSaturationDefined, "If hue is defined, saturation must also be defined."); 320Debug.Assert(hlsColor.Lightness >= 0 && hlsColor.Lightness <= 1, "Lightness must be between 0 and 1."); 321Debug.Assert(hlsColor.Saturation >= 0 && hlsColor.Saturation <= 1, "Saturation must be between 0 and 1."); 346Debug.Assert(red >= 0 && red <= 1, "Output red should be between 0 and 1."); 347Debug.Assert(green >= 0 && green <= 1, "Output green should be between 0 and 1."); 348Debug.Assert(blue >= 0 && blue <= 1, "Output blue should be between 0 and 1."); 355Debug.Assert(n1 >= 0 && n1 <= 1, "n1 must be between 0 and 1."); 356Debug.Assert(n2 >= 0 && n2 <= 1, "n2 must be between 0 and 1."); 357Debug.Assert(hue >= -6 && hue < 12, "Hue must be between -6 (inclusive) and 12 (exclusive)."); 1155Debug.Assert(_tabCache != null, "_tabCache is null. GetShadow1 should only be called after GetHighlight1"); 1168Debug.Assert(_tabCache != null, "_tabCache is null. GetHighlight2 should only be called after GetHighlight1"); 1181Debug.Assert(_tabCache != null, "_tabCache is null. GetHighlight2 should only be called after GetHighlight1");
parent\Shared\Microsoft\Windows\Themes\DataGridHeaderBorder.cs (3)
332Debug.Assert(_freezableCache.Count == size, "The cache size does not match the requested amount."); 359Debug.Assert((freezable == null) || freezable.IsFrozen, "Cached Freezables should have been frozen."); 369Debug.Assert(freezable.IsFrozen, "Cached Freezables should be frozen.");
parent\Shared\Microsoft\Windows\Themes\PlatformCulture.cs (1)
35Debug.Assert(_platformCulture != null);
PresentationFramework.Luna (4)
parent\Shared\Microsoft\Windows\Themes\DataGridHeaderBorder.cs (3)
332Debug.Assert(_freezableCache.Count == size, "The cache size does not match the requested amount."); 359Debug.Assert((freezable == null) || freezable.IsFrozen, "Cached Freezables should have been frozen."); 369Debug.Assert(freezable.IsFrozen, "Cached Freezables should be frozen.");
parent\Shared\Microsoft\Windows\Themes\PlatformCulture.cs (1)
35Debug.Assert(_platformCulture != null);
PresentationFramework.Royale (4)
parent\Shared\Microsoft\Windows\Themes\DataGridHeaderBorder.cs (3)
332Debug.Assert(_freezableCache.Count == size, "The cache size does not match the requested amount."); 359Debug.Assert((freezable == null) || freezable.IsFrozen, "Cached Freezables should have been frozen."); 369Debug.Assert(freezable.IsFrozen, "Cached Freezables should be frozen.");
parent\Shared\Microsoft\Windows\Themes\PlatformCulture.cs (1)
35Debug.Assert(_platformCulture != null);
SMDiagnostics (1)
System\ServiceModel\Diagnostics\SafeEventLogWriteHandle.cs (1)
33Debug.Print("SafeEventLogWriteHandle::RegisterEventSource[" + uncServerName + ", " + sourceName + "] Failed. Last Error: " +
SMSvcHost (46)
System\ServiceModel\Activation\ActivatedMessageQueue.cs (2)
35Debug.Print("ActivatedMessageQueue.ctor(listenerAdapter:" + listenerAdapter + " appKey:" + app.AppKey + " appPoolId:" + app.AppPool.AppPoolId + ")"); 155Debug.Print("ActivatedMessageQueue.Register() listenerChannelId: " + listenerChannelId + " token: " + token + " worker: " + worker.ProcessId);
System\ServiceModel\Activation\App.cs (1)
24Debug.Print("App.ctor(appKey:" + appKey + " path:" + path + " appPoolId:" + appPool.AppPoolId + ")");
System\ServiceModel\Activation\ListenerAdapter.cs (26)
54Debug.Print("ListenerAdapter[" + ProtocolName + "]::Open()"); 74Debug.Print("ListenerAdapter[" + ProtocolName + "]::Close()"); 111Debug.Print("ListenerAdapter[" + ProtocolName + "]::Cleanup()"); 183Debug.Print("ListenerAdapter[" + ProtocolName + "]::CloseAllListenerChannelInstances(" + app.AppKey + ") returned: " + hresult); 214Debug.Print("ListenerAdapter[" + ProtocolName + "]::OnApplicationAppPoolChanged(" + appKey + ", " + appPoolId + ")"); 274Debug.Print("ListenerAdapter[" + ProtocolName + "]::OnApplicationDeleted(" + appKey + ")"); 344Debug.Print("ListenerAdapter[" + ProtocolName + "]::RemoveApp(" + app.AppKey + ")"); 358Debug.Print("ListenerAdapter[" + ProtocolName + "]::OnApplicationBindingsChanged(" + appKey + ")"); 409Debug.Print("ListenerAdapter[" + ProtocolName + "]::RegisterNewBindings(" + app.AppKey + ")"); 420Debug.Print("ListenerAdapter[" + ProtocolName + "]::OnApplicationCreated(" + appKey + ", " + path + ", " + siteId + ", " + appPoolId + ", " + requestsBlocked + ")"); 475Debug.Print("ListenerAdapter[" + ProtocolName + "]::RegisterBindings() bindings#: " + bindings.Length); 493Debug.Print("ListenerAdapter[" + ProtocolName + "]::RegisterBindings() CreateUrlFromBinding(binding: " + binding + " path: " + path + ") returned baseAddress: " + baseAddresses[i]); 497Debug.Print("ListenerAdapter[" + ProtocolName + "]::RegisterBindings() CreateUrlFromBinding(binding: " + binding + " path: " + path + ") failed with UriFormatException: " + exception.Message); 526Debug.Print("ListenerAdapter[" + ProtocolName + "]::RegisterBindings() registering baseAddress: " + baseAddresses[i] + " with queue returned: " + status); 566Debug.Print("ListenerAdapter[" + ProtocolName + "]::OnApplicationPoolAllQueueInstancesStopped(" + appPoolId + ", " + queueId + ")"); 627Debug.Print("ListenerAdapter[" + ProtocolName + "]::OnApplicationPoolCanLaunchQueueInstance(" + appPoolId + ", " + queueId + ")"); 650Debug.Print("ListenerAdapter[" + ProtocolName + "]::OnApplicationPoolCreated(" + appPoolId + ", " + sid + ")"); 667Debug.Print("ListenerAdapter[" + ProtocolName + "]::OnApplicationPoolDeleted(" + appPoolId + ")"); 688Debug.Print("ListenerAdapter[" + ProtocolName + "]::OnApplicationPoolIdentityChanged(" + appPoolId + ", " + sid + ")"); 711Debug.Print("ListenerAdapter[" + ProtocolName + "]::OnApplicationPoolStateChanged(" + appPoolId + ", " + isEnabled + ")"); 733Debug.Print("ListenerAdapter[" + ProtocolName + "]::OnApplicationRequestsBlockedChanged(" + appKey + ", " + requestsBlocked + ")"); 761Debug.Print("ListenerAdapter[" + ProtocolName + "]::OnConfigManagerConnected()"); 780Debug.Print("ListenerAdapter[" + ProtocolName + "]::OnConfigManagerDisconnected(" + hresult + ") isOpen: " + isOpen); 816Debug.Print("ListenerAdapter[" + ProtocolName + "]::WasConnected() timedOut: " + timedOut); 838Debug.Print("ListenerAdapter[" + ProtocolName + "]::OnConfigManagerInitializationCompleted()"); 851Debug.Print("ListenerAdapter[" + ProtocolName + "]::ListenerAdapter.OpenListenerChannelInstance(appPoolId:" + queue.App.AppPool.AppPoolId + " appKey:" + queue.ListenerChannelContext.AppKey + " queueId:" + queue.ListenerChannelContext.ListenerChannelId + ")");
System\ServiceModel\Activation\MessageQueue.cs (5)
134Debug.Print("MessageQueue.Close()"); 174Debug.Print("MessageQueue.CloseCore()"); 550Debug.Print("MessageQueue.OnUnregisterLastWorker() calling Close()"); 556Debug.Print("MessageQueue.Unregister() worker: " + worker.ProcessId); 562Debug.Print("MessageQueue.Unregister() left with workers: " + workers.Count);
System\ServiceModel\Activation\MsmqActivation.cs (2)
579Debug.Print("opening queue: " + this.queueName); 626Debug.Print("MsmqActivation.QueueMonitor.OnPeekCompleted: message available");
System\ServiceModel\Activation\RoutingTable.cs (1)
125Debug.Print("RoutingTable.Lookup(" + uri + ") matched: " + (found == null ? "<NoMatch!>" : found.Uri.ToString()));
System\ServiceModel\Activation\SharingService.cs (2)
172Debug.Print("SharedMemory.Create() sharedMemoryName: " + sharedMemoryName); 176Debug.Print("SharedMemory.Create() exception: " + exception);
System\ServiceModel\Activation\TransportListener.cs (1)
244Debug.Print("TransportListener.OnDupHandle() via: " + session.Via.ToString() + " transportType: " + transportType);
System\ServiceModel\Activation\WorkerProcess.cs (6)
116Debug.Print("WorkerProcess.DispatchSession() failed sending duplicated socket to processId: " + this.ProcessId + " exception:" + exception); 162Debug.Print("WorkerProcess.WorkerProcess_Closed() worker leaving: " + processId + " State: " + ((IDuplexContextChannel)sender).State); 168Debug.Print("WorkerProcess.WorkerProcess_Faulted() worker leaving: " + processId + " State: " + ((IDuplexContextChannel)sender).State); 179Debug.Print("WorkerProcess.Register() version: " + version + " processId: " + processId + " path: " + path + " queueId: " + queueId + " token: " + token + " eventName: " + eventName); 231Debug.Print("WorkerProcess.Register() unsupported version ourVersion: " + ourVersion + " version: " + version); 348Debug.Print("WorkerProcess.Unregister() processId: " + processId);
System (658)
compmod\microsoft\csharp\csharpcodeprovider.cs (1)
2860Debug.Assert( names.Length > 0);
compmod\microsoft\visualbasic\VBCodeProvider.cs (2)
2517Debug.Assert( names.Length > 0); 2782Debug.Assert(statementDepth >= 0, "statementDepth >= 0");
compmod\microsoft\win32\NativeMethods.cs (1)
255System.Diagnostics.Debug.Assert(fileName != null && fileName.Length > 0, "Cannot get local path, fileName is not valid");
compmod\microsoft\win32\safehandles\SafeProcessHandle.cs (1)
51Debug.Assert(base.IsInvalid, "Safe handle should only be set once");
compmod\microsoft\win32\safehandles\SafeThreadHandle.cs (1)
34Debug.Assert(base.IsInvalid, "Safe handle should only be set once");
compmod\microsoft\win32\SystemEvents.cs (9)
443Debug.Fail("Unable to register broadcast window class"); 735Debug.Fail("Unrecognized message passed to UserPreferenceCategory"); 746Debug.Fail("Failed to install console handler."); 751Debug.Assert(windowHandle != IntPtr.Zero, "CreateBroadcastWindow failed"); 765Debug.Assert(threadCallbackList != null, "Invoking marshaled callbacks before there are any"); 790Debug.Fail("SystemEvents marshaled callback failed:" + t); 827Debug.Assert(threadCallbackMessage != 0, "threadCallbackList initialized but threadCallbackMessage not?"); 1484Debug.Assert(false, "Exception occurred while freeing memory: " + e.ToString()); 1600Debug.Fail("Unexpected thread exception in system events window thread proc", e.ToString());
compmod\microsoft\win32\UnsafeNativeMethods.cs (1)
227Debug.Assert(hModule != IntPtr.Zero, "GetModuleHandle failed. Dll isn't loaded?");
compmod\system\codedom\CodeTypeReference.cs (1)
236Debug.Assert(q.Count == 1 , "We should have one and only one in the rank queue.");
compmod\system\codedom\compiler\CompilerInfo.cs (1)
77Debug.Assert(_providerOptions != null, "Created CompilerInfo w/ null _providerOptions");
compmod\system\codedom\compiler\IndentTextWriter.cs (1)
88Debug.Assert(value >= 0, "Bogus Indent... probably caused by mismatched Indent++ and Indent--");
compmod\system\collections\generic\linkedlist.cs (4)
336Debug.Assert( head == null && count == 0, "LinkedList must be empty when this method is called!"); 345Debug.Assert( node.list == this, "Deleting the node from another list!"); 346Debug.Assert( head != null, "This method shouldn't be called on empty list!"); 348Debug.Assert(count == 1 && head == node, "this should only be true for a list with only one node");
compmod\system\collections\generic\sortedset.cs (20)
404Debug.Assert(parent != null, "Parent node cannot be null here!"); 468Debug.Assert(!parent.IsRed, "parent must be a black node!"); 488Debug.Assert(sibling != null || sibling.IsRed == false, "sibling must not be null and it must be black!"); 499Debug.Assert(parent.Left == sibling, "sibling must be left child of parent!"); 500Debug.Assert(sibling.Left.IsRed, "Left child of sibling must be red!"); 505Debug.Assert(parent.Right == sibling, "sibling must be left child of parent!"); 506Debug.Assert(sibling.Right.IsRed, "Right child of sibling must be red!"); 512Debug.Assert(parent.Right == sibling, "sibling must be left child of parent!"); 513Debug.Assert(sibling.Left.IsRed, "Left child of sibling must be red!"); 518Debug.Assert(parent.Left == sibling, "sibling must be left child of parent!"); 519Debug.Assert(sibling.Right.IsRed, "Right child of sibling must be red!"); 690Debug.Assert(grandParent != null, "Grand parent cannot be null here!"); 710Debug.Assert(node != null, "node cannot be null!"); 731Debug.Assert(IsRed(parent), "parent must be be red"); 755Debug.Assert(match.Right == null, "Right child must be null!"); 758Debug.Assert(parentOfSuccesor != null, "parent of successor cannot be null!"); 759Debug.Assert(succesor.Left == null, "Left child of succesor must be null!"); 760Debug.Assert((succesor.Right == null && succesor.IsRed) || (succesor.Right.IsRed && !succesor.IsRed), "Succesor must be in valid state"); 881Debug.Assert(IsRed(sibling.Left) || IsRed(sibling.Right), "sibling must have at least one red child"); 1953Debug.Assert(underlying != null, "Underlying set no longer exists");
compmod\system\collections\generic\throwhelper.cs (2)
175Debug.Assert(false, "The enum value is not defined, please checked ExceptionArgumentName Enum."); 292Debug.Assert(false, "The enum value is not defined, please checked ExceptionArgumentName Enum.");
compmod\system\componentmodel\AmbientValueAttribute.cs (1)
44Debug.Fail("Ambient value attribute of type " + type.FullName + " threw converting from the string '" + value + "'.");
compmod\system\componentmodel\ArraySubsetEnumerator.cs (2)
23Debug.Assert(count == 0 || array != null, "if array is null, count should be 0"); 24Debug.Assert(array == null || count <= array.Length, "Trying to enumerate more than the array contains");
compmod\system\componentmodel\BindingList.cs (2)
591Debug.Fail("Item is no longer in our list but we are still getting change notifications."); 600Debug.Assert(itemTypeProperties != null);
compmod\system\componentmodel\Container.cs (1)
186Debug.Assert(filteredComponents != null, "Incorrect ContainerFilterService implementation.");
compmod\system\componentmodel\CultureInfoConverter.cs (3)
218Debug.Assert(invariantIndex >= 0 && invariantIndex < installedCultures.Length); 228Debug.Assert(array[0] == null); 272Debug.Assert(cultureConverter != null);
compmod\system\componentmodel\DecimalConverter.cs (1)
75Debug.Assert(member != null, "Could not convert decimal to member. Did someone change method name / signature and not update DecimalConverter?");
compmod\system\componentmodel\DefaultValueAttribute.cs (1)
59Debug.Fail("Default value attribute of type " + type.FullName + " threw converting from the string '" + value + "'.");
compmod\system\componentmodel\design\DesignerTransaction.cs (3)
129System.Diagnostics.Debug.Fail("Invalid state. Dispose(true) should have called cancel which does the SuppressFinalize"); 134System.Diagnostics.Debug.Assert(disposing, "Designer transaction garbage collected, unable to cancel, please Cancel, Close, or Dispose your transaction."); 135System.Diagnostics.Debug.Assert(disposing || canceled || committed, "Disposing DesignerTransaction that has not been comitted or canceled; forcing Cancel" );
compmod\system\componentmodel\design\DesignerVerbCollection.cs (1)
130Debug.Assert(value != null, "Don't add null verbs!");
compmod\system\componentmodel\design\DesigntimeLicenseContext.cs (10)
75System.Diagnostics.Debug.Assert(fileName != null && fileName.Length > 0, "Cannot get local path, fileName is not valid"); 84Debug.WriteLineIf(RuntimeLicenseContextSwitch.TraceVerbose, "savedLicenseKey is null or doesnt contain our type"); 92Debug.WriteLineIf(RuntimeLicenseContextSwitch.TraceVerbose,"resourceAssembly is null"); 94Debug.WriteLineIf(RuntimeLicenseContextSwitch.TraceVerbose,"rawfile: " + rawFile); 117Debug.WriteLineIf(RuntimeLicenseContextSwitch.TraceVerbose,"resourceAssembly is null"); 159Debug.WriteLineIf(RuntimeLicenseContextSwitch.TraceVerbose,"resourceAssembly is not null"); 202Debug.WriteLineIf(RuntimeLicenseContextSwitch.TraceVerbose,"licenseFile: " + licenseFile.ToString()); 203Debug.WriteLineIf(RuntimeLicenseContextSwitch.TraceVerbose,"opening licenses file over URI " + licenseFile.ToString()); 214Debug.WriteLineIf(RuntimeLicenseContextSwitch.TraceVerbose,"returning : " + (string)savedLicenseKeys[type.AssemblyQualifiedName]); 259Debug.Fail(e.ToString());
compmod\system\componentmodel\design\serialization\InstanceDescriptor.cs (1)
150Debug.Fail("Unrecognized reflection type in instance descriptor: " + member.GetType().Name);
compmod\system\componentmodel\design\ServiceObjectContainer.cs (20)
91Debug.WriteLineIf(TRACESERVICE.TraceVerbose, "Adding service (instance) " + serviceType.Name + ". Promoting: " + promote.ToString()); 95Debug.Indent(); 96Debug.WriteLineIf(TRACESERVICE.TraceVerbose, "Promoting to container"); 97Debug.Unindent(); 130Debug.WriteLineIf(TRACESERVICE.TraceVerbose, "Adding service (callback) " + serviceType.Name + ". Promoting: " + promote.ToString()); 134Debug.Indent(); 135Debug.WriteLineIf(TRACESERVICE.TraceVerbose, "Promoting to container"); 136Debug.Unindent(); 187Debug.WriteLineIf(TRACESERVICE.TraceVerbose, "Searching for service " + serviceType.Name); 188Debug.Indent(); 208Debug.WriteLineIf(TRACESERVICE.TraceVerbose, "Encountered a callback. Invoking it"); 210Debug.WriteLineIf(TRACESERVICE.TraceVerbose, "Callback return object: " + (service == null ? "(null)" : service.ToString())); 214Debug.Fail("Object " + service.GetType().Name + " was returned from a service creator callback but it does not implement the registered type of " + serviceType.Name); 215Debug.WriteLineIf(TRACESERVICE.TraceVerbose, "**** Object does not implement service interface"); 225Debug.WriteLineIf(TRACESERVICE.TraceVerbose, "Service unresolved. Trying parent"); 237Debug.Unindent(); 253Debug.WriteLineIf(TRACESERVICE.TraceVerbose, "Removing service: " + serviceType.Name + ", Promote: " + promote.ToString()); 257Debug.Indent(); 258Debug.WriteLineIf(TRACESERVICE.TraceVerbose, "Invoking parent container"); 259Debug.Unindent();
compmod\system\componentmodel\design\ToolboxItemAttribute.cs (1)
73Debug.Assert(temp.IndexOf(".DLL") == -1, "Came across: " + toolboxItemTypeName + " . Please remove the .dll extension");
compmod\system\componentmodel\DesignerAttribute.cs (3)
34Debug.Assert(temp.IndexOf(".DLL") == -1, "Came across: " + designerTypeName + " . Please remove the .dll extension"); 58Debug.Assert(temp.IndexOf(".DLL") == -1, "Came across: " + designerTypeName + " . Please remove the .dll extension"); 71Debug.Assert(temp.IndexOf(".DLL") == -1, "Came across: " + designerTypeName + " . Please remove the .dll extension");
compmod\system\componentmodel\EditorAttribute.cs (2)
40Debug.Assert(temp.IndexOf(".DLL") == -1, "Came across: " + typeName + " . Please remove the .dll extension"); 50Debug.Assert(temp.IndexOf(".DLL") == -1, "Came across: " + typeName + " . Please remove the .dll extension");
compmod\system\componentmodel\EventDescriptorCollection.cs (1)
397Debug.Assert(foundCount == eventCount, "We did not completely fill our event array");
compmod\system\componentmodel\ExtendedPropertyDescriptor.cs (5)
38Debug.Assert(extenderInfo != null, "ExtendedPropertyDescriptor must have extenderInfo"); 39Debug.Assert(provider != null, "ExtendedPropertyDescriptor must have provider"); 56Debug.Assert(extender != null, "The original PropertyDescriptor must be non-null"); 60Debug.Assert(attr != null, "The original PropertyDescriptor does not have an ExtenderProvidedPropertyAttribute"); 65Debug.Assert(reflectDesc != null, "The original PropertyDescriptor has an invalid ExtenderProperty");
compmod\system\componentmodel\LicenseManager.cs (3)
171Debug.Assert(providerType != null, "Type cannot ever be null"); 192Debug.Assert(type != null, "IsValid Type cannot ever be null"); 207Debug.Assert(type != null, "IsValid Type cannot ever be null");
compmod\system\componentmodel\LicFileLicenseProvider.cs (2)
54Debug.Assert(context != null, "No context provided!"); 80Debug.WriteLine("Looking for license in: " + licenseFile);
compmod\system\componentmodel\ListChangedEventArgs.cs (7)
47Debug.Assert(listChangedType != ListChangedType.Reset, "this constructor is used only for changes in the list MetaData"); 48Debug.Assert(listChangedType != ListChangedType.ItemAdded, "this constructor is used only for changes in the list MetaData"); 49Debug.Assert(listChangedType != ListChangedType.ItemDeleted, "this constructor is used only for changes in the list MetaData"); 50Debug.Assert(listChangedType != ListChangedType.ItemChanged, "this constructor is used only for changes in the list MetaData"); 60Debug.Assert(listChangedType != ListChangedType.PropertyDescriptorAdded, "this constructor is used only for item changed in the list"); 61Debug.Assert(listChangedType != ListChangedType.PropertyDescriptorDeleted, "this constructor is used only for item changed in the list"); 62Debug.Assert(listChangedType != ListChangedType.PropertyDescriptorChanged, "this constructor is used only for item changed in the list");
compmod\system\componentmodel\MaskedTextProvider.cs (15)
723Debug.Assert( this.assignedCharCount >= 0, "Invalid count of assigned chars." ); 735Debug.Assert(this.assignedCharCount >= 0, "Invalid count of assigned chars."); 1370Debug.Assert(input != null && position >= 0 && position < this.testString.Length, "input param out of range."); 1682Debug.Assert(startPosition >= 0 && startPosition <= endPosition && endPosition < this.testString.Length, "Out of range input value."); 2090Debug.Assert(this.assignedCharCount >= 0, "Invalid count of assigned chars."); 2100Debug.Assert( startPosition >= 0 && endPosition >= 0 && endPosition >= startPosition && endPosition < this.testString.Length, "position out of range." ); 2176Debug.Assert(position >= 0 && position < this.testString.Length, "Position out of range."); 2188Debug.Assert(position >= 0 && position < this.testString.Length, "Position out of range."); 2189Debug.Assert(charDescriptor != null, "Null character descriptor."); 2202Debug.Assert( !IsLiteralPosition( charDex ), "Setting char in literal position." ); 2235Debug.Assert(this.assignedCharCount <= this.EditPositionCount, "Invalid count of assigned chars."); 2313Debug.Assert(position >= 0 && position < this.testString.Length, "Position out of range."); 2475Debug.Fail("Invalid mask language character."); 2572Debug.Assert(input != null, "null input."); 2573Debug.Assert( position >= 0, "Position out of range." );
compmod\system\componentmodel\MemberDescriptor.cs (2)
76Debug.Fail(t.ToString()); 392Debug.Fail(name + ">>" + e.ToString());
compmod\system\componentmodel\NullableConverter.cs (1)
107Debug.Assert(ci != null, "Couldn't find constructor");
compmod\system\componentmodel\PropertyDescriptorCollection.cs (1)
422Debug.Assert(foundCount == propCount, "We did not completely fill our property array");
compmod\system\componentmodel\ReflectEventDescriptor.cs (11)
94Debug.Assert(type.IsSubclassOf(typeof(Delegate)), "Not a valid ReflectEvent: " + componentClass.FullName + "." + name + " " + type.FullName); 180Debug.Assert(!CompModSwitches.CommonDesignerServices.Enabled || changeService != null, "IComponentChangeService not found"); 203Debug.Assert(!CompModSwitches.CommonDesignerServices.Enabled || dict != null, "IDictionaryService not found"); 248Debug.Assert(componentClass != null, "Must have a component class for FilterAttributes"); 253Debug.Assert(removeMethod != null, "Null remove method for " + Name); 256Debug.Assert(addMethod != null, "Null remove method for " + Name); 270Debug.Assert(currentReflectType != null, "currentReflectType cannot be null"); 368Debug.Fail("Missing event accessors for " + componentClass.FullName + "." + Name); 381Debug.Assert(currentReflectType != null, "currentReflectType cannot be null"); 443Debug.Assert(!CompModSwitches.CommonDesignerServices.Enabled || changeService != null, "IComponentChangeService not found"); 462Debug.Assert(!CompModSwitches.CommonDesignerServices.Enabled || dict != null, "IDictionaryService not found");
compmod\system\componentmodel\ReflectPropertyDescriptor.cs (13)
102Debug.WriteLineIf(PropDescCreateSwitch.TraceVerbose, "Creating ReflectPropertyDescriptor for " + componentClass.FullName + "." + name); 106Debug.WriteLineIf(PropDescCreateSwitch.TraceVerbose, "type == null, name == " + name); 110Debug.WriteLineIf(PropDescCreateSwitch.TraceVerbose, "componentClass == null, name == " + name); 117Debug.Fail("Property '" + name + "' on component " + componentClass.FullName + " failed to init."); 118Debug.Fail(t.ToString()); 630Debug.Assert(!CompModSwitches.CommonDesignerServices.Enabled || changeService != null, "IComponentChangeService not found"); 673Debug.Assert(!CompModSwitches.CommonDesignerServices.Enabled || changeService != null, "IComponentChangeService not found"); 767Debug.Assert(componentClass != null, "Must have a component class for FillAttributes"); 927Debug.WriteLineIf(PropDescUsageSwitch.TraceVerbose, "[" + Name + "]: ---> returning: null"); 931Debug.Assert(component != null, "GetValue must be given a component"); 967Debug.WriteLineIf(PropDescUsageSwitch.TraceVerbose, "[" + Name + "]: ---> returning: null"); 1050Debug.Assert(!CompModSwitches.CommonDesignerServices.Enabled || changeService != null, "IComponentChangeService not found"); 1118Debug.Assert(!CompModSwitches.CommonDesignerServices.Enabled || changeService != null, "IComponentChangeService not found");
compmod\system\componentmodel\ReflectTypeDescriptionProvider.cs (13)
171Debug.Fail("COMPAT: Editor table should not be null"); 194Debug.Assert(objectType != null, "Should have arg-checked before coming in here"); 527Debug.Assert(eppa != null, "Extender property " + prop.Name + " has no provider attribute. We will skip it."); 693Debug.Assert(idx < extenderCount, "There are more extenders than we expect"); 698Debug.Assert(idx == extenderCount, "Wrong number of extenders"); 710Debug.Assert(idx < extenderCount, "There are more extenders than we expect"); 715Debug.Assert(idx == extenderCount, "Wrong number of extenders"); 749Debug.Fail("This should never be invoked. TypeDescriptionNode should wrap for us."); 816Debug.Assert(objectType != null, "Should have arg-checked before coming in here"); 863Debug.Fail("This should never be invoked. TypeDescriptionNode should wrap for us."); 1046Debug.Fail("Hey, assumption holds true. Rip this assert."); 1679Debug.Assert(_converter != null, "There is no intrinsic setup in the hashtable for the Object type"); 1819Debug.Fail("Editor " + editor.GetType().FullName + " is not an instance of " + editorBaseType.FullName + " but it is in that base types table.");
compmod\system\componentmodel\TypeConverterAttribute.cs (1)
61Debug.Assert(temp.IndexOf(".DLL") == -1, "Came across: " + typeName + " . Please remove the .dll extension");
compmod\system\componentmodel\TypeDescriptor.cs (36)
610Debug.Assert(designerType != null, "It may be okay for the designer not to load, but we failed to load designer for component of type '" + component.GetType().FullName + "' because designer of type '" + da.DesignerTypeName + "'"); 1371Debug.Fail("COMPAT: Returning an empty collection, but you should not pass null here"); 1396Debug.Fail("COMPAT: Returning an empty collection, but you should not pass null here"); 1563Debug.Fail("COMPAT: Returning null, but you should not pass null here"); 1586Debug.Fail("COMPAT: Returning null, but you should not pass null here"); 1600Debug.Fail("COMPAT: Returning an empty collection, but you should not pass null here"); 1623Debug.Fail("COMPAT: Returning null, but you should not pass null here"); 1729Debug.Fail("COMPAT: Returning an empty collection, but you should not pass null here"); 1744Debug.Fail("COMPAT: Returning an empty collection, but you should not pass null here"); 1796Debug.Fail("COMPAT: Returning an empty collection, but you should not pass null here"); 1950Debug.Fail("COMPAT: Returning an empty collection, but you should not pass null here"); 1965Debug.Fail("COMPAT: Returning an empty collection, but you should not pass null here"); 2026Debug.Fail("COMPAT: Returning an empty collection, but you should not pass null here"); 2211Debug.Assert(type != null, "Caller should validate"); 2297Debug.Assert(instance != null, "Caller should validate"); 2378Debug.Assert(target.Next == null, "Delegating provider should always be the last provider in the chain."); 2416Debug.Assert(pipelineType != PIPELINE_ATTRIBUTES, "PipelineAttributeFilter is not supported for attributes"); 2471Debug.Fail("unknown pipeline type"); 2512Debug.Assert(cache == null || list == null || !cache.Contains(_pipelineFilterKeys[pipelineType]), "Earlier pipeline stage should have removed our cache"); 2570Debug.Assert(suffix != null, "Name collision with non-extender property."); 2602Debug.Fail("unknown pipeline type"); 2676Debug.Fail("unknown pipeline type"); 2822Debug.Fail("unknown pipeline type"); 2873Debug.Fail("COMPAT: Returning, but you should not pass null here"); 2964Debug.Fail("COMPAT: Returning, but you should not pass null here"); 3032Debug.Fail("COMPAT: Returning, but you should not pass null here"); 3096Debug.Fail("COMPAT: Returning, but you should not pass null here"); 3335Debug.WriteLineIf(TraceDescriptor.Enabled, string.Format(CultureInfo.InvariantCulture, "TypeDescriptor : {0}", string.Format(CultureInfo.InvariantCulture, message, args))); 3397Debug.Assert(newAttrs[idx] != null, "_attributes contains a null member"); 3718Debug.Assert(attrs != null, "Someone should have handled this"); 3733Debug.Assert(className != null, "Someone should have handled this"); 3762Debug.Assert(converter != null, "Someone should have handled this"); 3824Debug.Assert(events != null, "Someone should have handled this"); 3839Debug.Assert(events != null, "Someone should have handled this"); 3854Debug.Assert(properties != null, "Someone should have handled this"); 3869Debug.Assert(properties != null, "Someone should have handled this");
compmod\system\diagnostics\Debug.cs (21)
40/// <para>Gets or sets a value indicating whether <see cref='System.Diagnostics.Debug.Flush'/> should be called on the 41/// <see cref='System.Diagnostics.Debug.Listeners'/> 77/// be written to the <see cref='System.Diagnostics.Debug.Listeners'/>.</para> 85/// <para>Clears the output buffer, and then closes the <see cref='System.Diagnostics.Debug.Listeners'/> so that they no longer receive 156/// <para>Writes a message to the trace listeners in the <see cref='System.Diagnostics.Debug.Listeners'/> collection.</para> 165/// parameter to the trace listeners in the <see cref='System.Diagnostics.Debug.Listeners'/> collection.</para> 174/// to the trace listeners in the <see cref='System.Diagnostics.Debug.Listeners'/> collection.</para> 183/// listeners in the <see cref='System.Diagnostics.Debug.Listeners'/> collection.</para> 192/// <see cref='System.Diagnostics.Debug.Listeners'/> collection. The default line terminator 203/// trace listeners in the <see cref='System.Diagnostics.Debug.Listeners'/> collection. The default line 213/// listeners in the <see cref='System.Diagnostics.Debug.Listeners'/> collection. The default line 224/// terminator to the trace listeners in the <see cref='System.Diagnostics.Debug.Listeners'/> collection. The 235/// terminator to the trace listeners in the <see cref='System.Diagnostics.Debug.Listeners'/> collection. The 244/// <para>Writes a message to the trace listeners in the <see cref='System.Diagnostics.Debug.Listeners'/> collection 255/// parameter to the trace listeners in the <see cref='System.Diagnostics.Debug.Listeners'/> 266/// to the trace listeners in the <see cref='System.Diagnostics.Debug.Listeners'/> 278/// listeners in the <see cref='System.Diagnostics.Debug.Listeners'/> collection if a condition is 288/// <see cref='System.Diagnostics.Debug.Listeners'/> collection if a condition is 300/// trace listeners in the <see cref='System.Diagnostics.Debug.Listeners'/> collection if a condition is 312/// listeners in the <see cref='System.Diagnostics.Debug.Listeners'/> collection if a condition is 323/// terminator to the trace listeners in the <see cref='System.Diagnostics.Debug.Listeners'/> collection
compmod\system\diagnostics\ListenerElementsCollection.cs (3)
80Debug.Assert((listenerElement != null), "adding elements other than ListenerElement to ListenerElementsCollection?"); 215Debug.Assert(_allowReferences, "_allowReferences must be true if type name is null"); 326Debug.Assert(_allowReferences, "_allowReferences must be true if type name is null");
compmod\system\diagnostics\traceutils.cs (2)
86Debug.Assert(tiexc.InnerException != null, "ill-formed TargetInvocationException!"); 99Debug.Assert(tiexc.InnerException != null, "ill-formed TargetInvocationException!");
compmod\System\Runtime\InteropServices\StandardOleMarshalObject.cs (4)
50Debug.Assert(pStandardMarshal != null, "Failed to get marshaler for interface '" + riid.ToString() + "', CoGetStandardMarshal returned S_OK"); 123Debug.Fail("IMarshal::UnmarshalInterface should not be called."); 134Debug.Fail("IMarshal::ReleaseMarshalData should not be called."); 144Debug.Fail("IMarshal::DisconnectObject should not be called.");
misc\ClientUtils.cs (2)
86System.Diagnostics.Debug.Assert(maxNumberOfBitsOn >=0 && maxNumberOfBitsOn<32, "expect this to be greater than zero and less than 32"); 134System.Diagnostics.Debug.Assert(Enum.GetValues(enumValue.GetType()).Length == enumValues.Length, "Not all the enum members were passed in.");
net\System\_IPv4Address.cs (1)
320Debug.Assert(result != Invalid, "Failed to parse after already validated: " + name);
net\System\_IPv6Address.cs (1)
570Debug.Assert(index >= 0 && index < limit, "index = " + index.ToString());
net\System\_UriSyntax.cs (2)
368Debug.Assert(!m_UpdatableFlagsUsed, 370Debug.Assert((flags & (~c_UpdatableFlags)) == 0, "Only updatable flags can be set.");
net\System\IriHelper.cs (16)
30Debug.Assert(Char.IsHighSurrogate(highSurr)); 170Debug.Assert(dest.Length > destOffset, "Buffer overrun detected"); 172Debug.Assert(dest.Length > destOffset, "Buffer overrun detected"); 174Debug.Assert(dest.Length > destOffset, "Buffer overrun detected"); 180Debug.Assert(ch < 0xFF, "Expecting ASCII character."); 181Debug.Assert(dest.Length > destOffset, "Buffer overrun detected"); 193Debug.Assert(ch < 0xFF, "Expecting ASCII character."); 225Debug.Assert(ch < 0xFF, "Expecting ASCII character."); 253Debug.Assert(dest.Length > destOffset, "Buffer overrun detected"); 263Debug.Assert(dest.Length > destOffset, "Buffer overrun detected"); 280Debug.Assert(dest.Length > destOffset, "Buffer overrun detected"); 282Debug.Assert(dest.Length > destOffset, "Buffer overrun detected"); 293Debug.Assert(dest.Length > destOffset, "Buffer overrun detected"); 307Debug.Assert(dest.Length > destOffset, "Buffer overrun detected"); 356Debug.Assert(encodedBytesCount <= maxNumberOfBytesEncoded, "UTF8 encoder should not exceed specified byteCount"); 371Debug.Assert(destOffset <= dest.Length, "Buffer overrun detected");
net\System\Net\_Connection.cs (2)
710Debug.Assert(m_WriteList.Count == 0); 1565Debug.Assert(request.WriteBuffer == null);
net\System\Net\_ConnectionGroup.cs (2)
181Diagnostics.Debug.Assert(m_ExpiringTimer == null, "Timer not cleared"); 187Diagnostics.Debug.Assert(false, "ConnectionGroup; Too many decrements.");
net\System\Net\_ConnectStream.cs (2)
1525Debug.Assert(!m_Chunked, 2347Debug.Assert(socket != null, "No Socket");
net\System\Net\_DigestClient.cs (2)
461Debug.Assert(challenge != null); 462Debug.Assert(index >= 0 && index < challenge.Length);
net\System\Net\_NetworkingPerfCounters.cs (5)
58Debug.Assert(instanceCounter != null); 59Debug.Assert(globalCounter != null); 139Debug.Assert(cp != null); 171Debug.Assert(avgCounterIndex + 1 < counters.Length); 198Debug.Assert(counterNames.Length == Enum.GetValues(typeof(NetworkingPerfCounterName)).Length,
net\System\Net\_PrefixLookup.cs (5)
90Debug.Assert(prefix != null, "PrefixLookup.Add; prefix must not be null"); 91Debug.Assert(prefix.Length > 0, "PrefixLookup.Add; prefix must not be empty"); 92Debug.Assert(value != null, "PrefixLookup.Add; value must not be null"); 124Debug.Assert(lookupKey != null, "PrefixLookup.Lookup; lookupKey must not be null"); 125Debug.Assert(lookupKey.Length > 0, "PrefixLookup.Lookup; lookupKey must not be empty");
net\System\Net\_RegBlobWebProxyDataBuilder.cs (1)
68Debug.Assert(registry != null);
net\System\Net\_SecureChannel.cs (2)
1015Debug.Assert(setError == 0, "SetContextAttributes error: " + setError); 1440Debug.Fail("GetAlertMessageFromChain was called but none of the chain elements had errors.");
net\System\Net\_ServiceNameStore.cs (2)
45Debug.Assert(!String.IsNullOrEmpty(uriPrefix)); 81Debug.Assert(!String.IsNullOrEmpty(uriPrefix));
net\System\Net\_SSPIWrapper.cs (2)
89Debug.Assert(s_DefaultCredentialsHandleCacheSize > 0); 647Debug.Assert(value is IntPtr, "Type Mismatch");
net\System\Net\_WebProxyDataBuilder.cs (6)
50Debug.Assert( (m_Result.proxyAddress != null || m_Result.proxyHostAddresses != null), 89Debug.Assert(!string.IsNullOrEmpty(proxyString)); 108Debug.Assert(!string.IsNullOrEmpty(proxyListString)); 143Debug.Assert(proxyListHashTable.Count > 0); 159Debug.Assert(rawString != null); 209Debug.Assert(rawString != null);
net\System\Net\AuthenticationManager.cs (1)
265Debug.Assert(signature.ToLowerInvariant().Equals(signature, StringComparison.Ordinal),
net\System\Net\Cache\_CacheStreams.cs (2)
40Debug.Assert(wrappedStream != null); 47Debug.Assert(stream != null, "Wrapped stream must implement IRequestLifetimeTracker interface");
net\System\Net\Cache\_SingleItemRequestCache.cs (1)
440Debug.Assert(m_RequestLifetimeSetter == null, "TrackRequestLifetime called more than once.");
net\System\Net\Cache\IERequestCache.cs (3)
750Debug.Assert(m_CallNesting == 0); 791Debug.Assert(m_RequestLifetimeSetter == null, "TrackRequestLifetime called more than once."); 963Debug.Assert(m_CallNesting == 0);
net\System\Net\Configuration\SchemeSettingElement.cs (1)
53Debug.Assert(name != null, "'name' must not be null.");
net\System\Net\Configuration\UriSectionReader.cs (1)
27Debug.Assert(configFilePath != null, "'configFilePath' must not be null");
net\System\Net\connectionpool.cs (1)
306Debug.Assert(pooledStream != null, "Acquired Semaphore with no connections in either stack");
net\System\Net\HttpListener.cs (10)
316Debug.Assert(selectorDelegate != null); 371Debug.Assert(UnsafeNclNativeMethods.HttpApi.ApiVersion == 550Debug.Assert(m_TimeoutManager != null, "Timeout manager is not assigned"); 1992Debug.Assert(context != null, "Null Context"); 2424Debug.Assert(blob != IntPtr.Zero); 2427Debug.Assert(tokenPointer != IntPtr.Zero); 2433Debug.Assert(blob != IntPtr.Zero); 2448Debug.Assert(size >= 0); 2475Debug.Assert(tokenSize < Int32.MaxValue); 2487Debug.Assert(tokenSize < Int32.MaxValue);
net\System\Net\HttpListenerRequest.cs (4)
1060Debug.Assert(m_TokenBindings == null); 1123Debug.Assert(handle != null); 1124Debug.Assert(!handle.IsInvalid); 1185Debug.Assert((long)(&pThisResultData->identifierData->hashAlgorithm) == (long)(pThisResultData->identifierData) + 1 );
net\System\Net\HttpListenerRequestUriBuilder.cs (17)
60Debug.Assert(!string.IsNullOrEmpty(rawUri), "Empty raw URL."); 61Debug.Assert(!string.IsNullOrEmpty(cookedUriScheme), "Empty cooked URL scheme."); 62Debug.Assert(!string.IsNullOrEmpty(cookedUriHost), "Empty cooked URL host."); 63Debug.Assert(!string.IsNullOrEmpty(cookedUriPath), "Empty cooked URL path."); 143Debug.Assert(cookedUriQuery == string.Empty, 173Debug.Assert(HttpSysSettings.EnableNonUtf8, 175Debug.Assert((type == EncodingType.Primary) || (type == EncodingType.Secondary), 191Debug.Assert(encoding != null, "'encoding' must be assigned."); 192Debug.Assert(!string.IsNullOrEmpty(rawPath), "'rawPath' must have at least one character."); 205Debug.Assert(rawOctets.Count == 0, 227Debug.Assert(encoding != null, "'encoding' must be assigned."); 237Debug.Assert(index + 2 < rawPath.Length, "Expected >=2 characters after '%' (e.g. %2F)"); 244Debug.Assert(index + 4 < rawPath.Length, "Expected >=4 characters after '%u' (e.g. %u0062)"); 416Debug.Assert(uriString != null, "uriString must not be null"); 417Debug.Assert(uriString.Length > 0, "uriString must not be empty"); 459Debug.Assert((uriString.Length == 1) && (uriString[0] == '*'), "Unknown request Uri string format", 485Debug.Assert(path != null, "'path' must not be null");
net\System\Net\HttpListenerTimeoutManager.cs (4)
36Debug.Assert(configTimeouts != null); 37Debug.Assert(configTimeouts.Length == (timeouts.Length + 1)); 44Debug.Assert(configTimeouts[i] <= ushort.MaxValue, "Timeout out of range: " + configTimeouts[i]); 52Debug.Assert(configTimeouts[5] <= uint.MaxValue, "Timeout out of range: " + configTimeouts[5]);
net\System\Net\HttpSysSettings.cs (1)
74Debug.Assert(key != null, "'key' must not be null");
net\System\Net\HttpWebRequest.cs (8)
2307Debug.Assert(tracker != null, "All streams returned by HttpWebRequest must implement IRequestLifetimeTracker"); 3050Debug.Assert(_WriteBuffer != null); 4495Debug.Assert(result, "StartResponseWait failed."); 4506Debug.Assert(m_ContinueTimer == null, "Continue timer is already set"); 4517Debug.Assert(false, "StartAsync100ContinueTimer failed."); 5449Debug.Assert(callback != null); 5791Debug.Assert(hostUriSuccess, "Can't rebuild HostUri from redirected URI: {0}", _Uri.ToString()); 6425Debug.Assert((outputData != null) && (outputData.Length == sizeof(ControlChannelTriggerStatus)),
net\System\Net\HttpWebResponse.cs (2)
827Debug.Assert(stream != null, "Wrapped stream must implement IRequestLifetimeTracker interface"); 932Debug.Assert(stream != null, "Wrapped stream must implement IRequestLifetimeTracker interface");
net\System\Net\Internal.cs (3)
517Debug.Assert(gate != Triggering, "Still Triggering"); 536Debug.Assert(gate != Signaling, "Still Signaling"); 700Debug.Assert(operatingSystem.Platform != PlatformID.Win32Windows, "Windows 9x is not supported");
net\System\Net\mail\Base64Stream.cs (5)
97Debug.Assert(writeState != null, "writeState was null"); 219Debug.Assert(buffer != null, "buffer was null"); 220Debug.Assert(this.writeState != null, "writestate was null"); 221Debug.Assert(this.writeState.Buffer != null, "writestate.buffer was null"); 569Debug.Assert(thisPtr.written == thisPtr.count);
net\System\Net\mail\DomainLiteralReader.cs (2)
37Debug.Assert(0 <= index && index < data.Length, "index was outside the bounds of the string: " + index); 38Debug.Assert(data[index] == MailBnfHelper.EndSquareBracket, "data did not end with a square bracket");
net\System\Net\mail\DotAtomReader.cs (1)
44Debug.Assert(0 <= index && index < data.Length, "index was outside the bounds of the string: " + index);
net\System\Net\mail\MailAddress.cs (4)
36Debug.Assert(host != null, 39Debug.Assert(userName != null, 42Debug.Assert(displayName != null, 216Debug.Assert(this.Address != null, "address was null");
net\System\Net\mail\MailAddressParser.cs (6)
36Debug.Assert(index == -1, "The index indicates that part of the address was not parsed: " + index); 51Debug.Assert(index == -1 || data[index] == MailBnfHelper.Comma, 73Debug.Assert(!String.IsNullOrEmpty(data)); 74Debug.Assert(index >= 0 && index < data.Length, "Index out of range: " + index + ", " + data.Length); 282Debug.Assert(data[index + 1] == MailBnfHelper.Quote, "Mis-alligned index: " + index); 307Debug.Assert(index < 0 || data[index] == MailBnfHelper.Comma, "Mis-alligned index: " + index);
net\System\Net\mail\MailBnfHelper.cs (2)
374Debug.Assert(index >= 0); 375Debug.Assert(index < data.Length);
net\System\Net\mail\MailWriter.cs (1)
58System.Diagnostics.Debug.Assert(this.contentStream == sender);
net\System\Net\mail\Message.cs (1)
460System.Diagnostics.Debug.Assert(this.headersEncoding != null);
net\System\Net\mail\QEncodedStream.cs (1)
384System.Diagnostics.Debug.Assert(thisPtr.written == thisPtr.count);
net\System\Net\mail\QuotedPairReader.cs (3)
41Debug.Assert(0 <= index && index < data.Length, "Index out of range: " + index + ", " + data.Length); 78Debug.Assert(index >= 0 && data[index] == MailBnfHelper.Backslash, "index was not a backslash: " + index); 89Debug.Assert(index < 0 || data[index] != MailBnfHelper.Backslash, "index was a backslash: " + index);
net\System\Net\mail\QuotedPrintableStream.cs (1)
416System.Diagnostics.Debug.Assert(thisPtr.written == thisPtr.count);
net\System\Net\mail\QuotedStringFormatReader.cs (3)
41Debug.Assert(0 <= index && index < data.Length, "Index out of range: " + index + ", " + data.Length); 43Debug.Assert(data[index] == MailBnfHelper.Quote, "Initial char at index " + index + " was not a quote."); 105Debug.Assert(0 <= index && index < data.Length, "Index out of range: " + index + ", " + data.Length);
net\System\Net\mail\SmtpCommands.cs (1)
206System.Diagnostics.Debug.Assert(lines.Length == 1, "Did not expect more than one line response for auth command");
net\System\Net\mail\smtpconnection.cs (3)
159Debug.Assert(smtpPooledStream != null, "PooledStream not yet set"); 167Debug.Assert(servicePoint != null, "servicePoint was null from SmtpTransport"); 323Debug.Assert(servicePoint != null, "servicePoint was null from SmtpTransport");
net\System\Net\mail\SmtpDateTime.cs (8)
222Debug.Assert(!String.IsNullOrEmpty(offset), 225Debug.Assert(offset != unknownTimeZoneDefaultOffset, 228Debug.Assert(offset.StartsWith("-") || offset.StartsWith("+"), 265Debug.Assert(!String.IsNullOrEmpty(value), 331Debug.Assert(dateValue.Kind == DateTimeKind.Unspecified); 429Debug.Assert(span.Seconds == 0, "Span had seconds value"); 430Debug.Assert(span.Milliseconds == 0, "Span had milliseconds value"); 445Debug.Assert((hours != 0) || (minutes !=0), "Input validation ensures hours or minutes isn't zero");
net\System\Net\mail\SmtpReplyReaderFactory.cs (2)
317System.Diagnostics.Debug.Assert(readState == ReadState.Status0); 404System.Diagnostics.Debug.Assert(parent.readState == ReadState.Status0);
net\System\Net\mail\SmtpTransport.cs (1)
198Debug.Assert(servicePoint != null, "no ServicePoint provided by SmtpClient");
net\System\Net\mail\TrackingValidationObjectDictionary.cs (1)
50Debug.Assert(key != null, "key was null");
net\System\Net\mail\WhitespaceReader.cs (4)
40Debug.Assert(!String.IsNullOrEmpty(data), "data was null or empty"); 41Debug.Assert(index < data.Length, "index was outside the bounds of the string"); 104Debug.Assert(!String.IsNullOrEmpty(data), "data was null or empty"); 105Debug.Assert(index < data.Length, "index was outside the bounds of the string");
net\System\Net\NetRegistryConfiguration.cs (6)
113Debug.Assert(!String.IsNullOrEmpty(path), "Registry path should not be null."); 114Debug.Assert(!String.IsNullOrEmpty(valueName), "valueName should not be null."); 152Debug.Assert(!String.IsNullOrEmpty(versionedKeyPath), ".Net Version should not be null."); 159Debug.Assert(!String.IsNullOrEmpty(valueName), "valueName should not be null."); 169Debug.Assert(currentProcess != null); 181Debug.Assert(appExePath != null);
net\System\Net\NetworkInformation\NetworkAddressChange.cs (2)
110Debug.Assert(!Monitor.IsEntered(s_globalLock), "Should not invoke user callback while holding globalLock"); 212Debug.Assert(!Monitor.IsEntered(s_globalLock), "Should not invoke user callback while holding globalLock");
net\System\Net\NetworkInformation\ping.cs (2)
104Debug.Assert(status == InProgress, "Invalid status: " + status); 603Debug.Assert(asyncOp != null, "Null AsyncOp?");
net\System\Net\SecureProtocols\_SslState.cs (1)
1671Debug.Assert(request != null, "Expected an AsyncProtocolRequest reference.");
net\System\Net\ServicePoint.cs (5)
679Debug.Assert(connectionGroupPrefixSafeInternal.Length > connectionGroupPrefixSafe.Length); 680Debug.Assert(connectionGroupPrefixUnsafeInternal.Length > connectionGroupPrefixUnsafe.Length); 681Debug.Assert(connectionGroupPrefixSafeInternal.StartsWith(connectionGroupPrefixSafe, StringComparison.Ordinal)); 682Debug.Assert(connectionGroupPrefixUnsafeInternal.StartsWith(connectionGroupPrefixUnsafe, StringComparison.Ordinal)); 1026Diagnostics.Debug.Assert(false, "ServicePoint; Too many decrements.");
net\System\Net\ServicePointManager.cs (6)
273Debug.Assert((int)SecurityProtocolType.SystemDefault == (int)SslProtocols.None); 274Debug.Assert((int)SecurityProtocolType.Ssl3 == (int)SslProtocols.Ssl3); 275Debug.Assert((int)SecurityProtocolType.Tls == (int)SslProtocols.Tls); 276Debug.Assert((int)SecurityProtocolType.Tls11 == (int)SslProtocols.Tls11); 277Debug.Assert((int)SecurityProtocolType.Tls12 == (int)SslProtocols.Tls12); 278Debug.Assert((int)SecurityProtocolType.Tls13 == (int)SslProtocols.Tls13);
net\System\Net\Sockets\_BaseOverlappedAsyncResult.cs (1)
317Debug.Assert((IntPtr)nativeOverlapped == asyncResult.m_Cache.NativeOverlapped.DangerousGetHandle(), "Handle mismatch");
net\System\Net\Sockets\_DynamicWinsockMethods.cs (1)
106System.Diagnostics.Debug.Assert(false, "Invalid type passed to DynamicWinsockMethods.GetDelegate");
net\System\Net\Sockets\Socket.cs (2)
6451Debug.Assert(boundAddress != null, "Not Bound"); 10050Debug.Assert((IntPtr)nativeOverlapped == m_PtrNativeOverlapped.DangerousGetHandle(), "Handle mismatch");
net\System\Net\UnsafeNativeMethods.cs (2)
1723Debug.Assert(chainCount == 0 || !chainList.IsInvalid); 1732Debug.Assert(!chainRef.IsInvalid);
net\System\Net\webclient.cs (1)
1733Debug.Assert(n < 0x10);
net\System\Net\WebUtility.cs (7)
80Debug.Assert(0 <= index && index <= value.Length, "0 <= index && index <= value.Length"); 226Debug.Assert(false, "Should never get here!"); 275Debug.Assert(0 <= startPos && startPos <= s.Length, "0 <= startPos && startPos <= s.Length"); 605Debug.Assert(UNICODE_PLANE01_START <= smpChar && smpChar <= UNICODE_PLANE16_END); 617Debug.Assert(charsRemaining >= 1); 618Debug.Assert(Char.IsSurrogate(*pch)); 652Debug.Assert(n < 0x10);
net\System\UriExt.cs (3)
730Debug.Assert(!syntax.IsSimple, "A UriPraser threw on InitializeAndValidate."); 745Debug.Assert(!baseUri.IsNotAbsoluteUri && !baseUri.UserDrivenParsing, "Uri::ResolveHelper()|baseUri is not Absolute or is controlled by User Parser."); 1015Debug.Assert(false, "Uri failed to locate custom port at index: " + portIndex);
net\System\UriHelper.cs (8)
538Debug.Assert(dest.Length > destOffset, "Buffer overrun detected"); 564Debug.Assert(dest.Length > destOffset, "Buffer overrun detected"); 571Debug.Assert(dest.Length > destOffset, "Buffer overrun detected"); 575Debug.Assert(dest.Length > destOffset, "Buffer overrun detected"); 583Debug.Assert(dest.Length > destOffset); 588Debug.Assert(dest.Length > destOffset, "Buffer overrun detected"); 600Debug.Assert(dest.Length > destOffset, "Buffer overrun detected"); 614Debug.Assert(dest.Length > destOffset, "Buffer overrun detected");
regex\system\text\regularexpressions\RegexBoyerMoore.cs (2)
45Debug.Assert(pattern.Length != 0, "RegexBoyerMoore called with an empty string. This is bad for perf"); 238Debug.Assert(textinfo.ToLower(_pattern[i]) == _pattern[i], "pattern should be converted to lower case in constructor!");
regex\system\text\regularexpressions\RegexCharClass.cs (5)
545Debug.Assert(cc.CanMerge && this.CanMerge, "Both character classes added together must be able to merge" ); 583Debug.Assert(_subtractor == null, "Can't add two subtractions to a char class. "); 768Debug.Assert(IsSingleton(set) || IsSingletonInverse(set), "Tried to get the singleton char out of a non singleton character class"); 882Debug.Assert((SETSTART & 0x1) == 1, "If SETSTART is not odd, the calculation below this will be reversed"); 1157Debug.Assert(!String.IsNullOrEmpty(set), "Found a null/empty element in RegexCharClass prop table");
regex\system\text\regularexpressions\RegexCompiler.cs (1)
3084Debug.Assert(an != null, "AssemblyName should not be null");
regex\system\text\regularexpressions\RegexMatch.cs (1)
93System.Diagnostics.Debug.Assert(!(_textbeg < 0 || _textstart < _textbeg || _textend < _textstart || _text.Length < _textend),
security\system\security\Authentication\ExtendedProtection\ServiceNameCollection.cs (2)
69Debug.Assert(serviceNames != null); 70Debug.Assert(!String.IsNullOrEmpty(searchServiceName));
security\system\security\cryptography\oid.cs (2)
75Debug.Assert(value != null); 76Debug.Assert(friendlyName != null);
security\system\security\cryptography\x509\x509certificate2.cs (1)
158Debug.Assert(false);
security\system\security\cryptography\x509\x509chain.cs (4)
285Debug.Assert(pChain.cChain > 0); 310Debug.Assert(index < chainStatus.Length); 322Debug.Assert(index < chainStatus.Length); 331Debug.Assert(index == chainStatus.Length);
security\system\security\cryptography\x509\x509utils.cs (1)
410Debug.Assert(false);
services\io\system\io\FileSystemWatcher.cs (6)
569Debug.Assert(oldName == null, "FileSystemWatcher: Two FILE_ACTION_RENAMED_OLD_NAME " + 580Debug.Assert(false, "FileSystemWatcher: FILE_ACTION_RENAMED_NEW_NAME with no" + 602Debug.Assert(false, "FileSystemWatcher: FILE_ACTION_RENAMED_OLD_NAME with no" + 740Debug.Assert(IsHandleInvalid, "ObjectDisposedException from something other than SafeHandle?"); 742Debug.Assert(IsHandleInvalid, "ArgumentNullException from something other than SafeHandle?"); 777Debug.Fail("Unknown FileSystemEvent action type! Value: "+action);
services\monitoring\system\diagnosticts\AsyncStreamReader.cs (3)
71Debug.Assert (process != null && stream !=null && encoding !=null && callback != null, "Invalid arguments!"); 72Debug.Assert(stream.CanRead, "Stream must be readable!"); 73Debug.Assert(bufferSize > 0, "Invalid buffer size!");
services\monitoring\system\diagnosticts\EventLog.cs (5)
399Debug.WriteLineIf(CompModSwitches.EventLog.TraceVerbose, "CreateEventSource: Checking arguments"); 419Debug.WriteLineIf(CompModSwitches.EventLog.TraceVerbose, "CreateEventSource: Calling SourceExists"); 421Debug.WriteLineIf(CompModSwitches.EventLog.TraceVerbose, "CreateEventSource: SourceExists returned true"); 432Debug.WriteLineIf(CompModSwitches.EventLog.TraceVerbose, "CreateEventSource: Getting DllPath"); 444Debug.WriteLineIf(CompModSwitches.EventLog.TraceVerbose, "CreateEventSource: Getting local machine regkey");
services\monitoring\system\diagnosticts\EventLogInternal.cs (24)
552Debug.WriteLineIf(CompModSwitches.EventLog.TraceVerbose, "EventLog::AddListenerComponent(" + compLogName + ")"); 556Debug.WriteLineIf(CompModSwitches.EventLog.TraceVerbose, "EventLog::AddListenerComponent: listener already active."); 661Debug.WriteLineIf(CompModSwitches.EventLog.TraceVerbose, "EventLog::Close"); 672Debug.WriteLineIf(CompModSwitches.EventLog.TraceVerbose, "EventLog::Close: closed read handle"); 683Debug.WriteLineIf(CompModSwitches.EventLog.TraceVerbose, "EventLog::Close: closed write handle"); 710Debug.WriteLineIf(CompModSwitches.EventLog.TraceVerbose, "EventLog::CompletionStatusChanged: starting at " + lastSeenCount.ToString(CultureInfo.InvariantCulture)); 714Debug.WriteLineIf(CompModSwitches.EventLog.TraceVerbose, "EventLog::CompletionStatusChanged: aborting because we're already notifying."); 737Debug.WriteLineIf(CompModSwitches.EventLog.TraceVerbose, "EventLog::CompletionStatusChanged: OldestEntryNumber is " + OldestEntryNumber + ", EntryCount is " + EntryCount); 753Debug.WriteLineIf(CompModSwitches.EventLog.TraceVerbose, "EventLog::CompletionStatusChanged: Caught exception notifying event handlers: " + e.ToString()); 764Debug.WriteLineIf(CompModSwitches.EventLog.TraceVerbose, "EventLog::CompletionStatusChanged: finishing at " + lastSeenCount.ToString(CultureInfo.InvariantCulture)); 767Debug.WriteLineIf(CompModSwitches.EventLog.TraceVerbose, "EventLog::CompletionStatusChanged: Caught exception updating last entry number: " + e.ToString()); 905Debug.WriteLineIf(CompModSwitches.EventLog.TraceVerbose, "Error from ReadEventLog is " + error.ToString(CultureInfo.InvariantCulture)); 917Debug.WriteLineIf(CompModSwitches.EventLog.TraceVerbose, "Increasing buffer size from " + buf.Length.ToString(CultureInfo.InvariantCulture) + " to " + minBytesNeeded.ToString(CultureInfo.InvariantCulture) + " bytes"); 1098Debug.WriteLineIf(CompModSwitches.EventLog.TraceVerbose, "Error from ReadEventLog is " + error.ToString(CultureInfo.InvariantCulture)); 1275Debug.WriteLineIf(CompModSwitches.EventLog.TraceVerbose, "EventLog::OpenForRead"); 1325Debug.WriteLineIf(CompModSwitches.EventLog.TraceVerbose, "EventLog::OpenForWrite"); 1363Debug.WriteLineIf(CompModSwitches.EventLog.TraceVerbose, "EventLog::Reset"); 1388Debug.WriteLineIf(CompModSwitches.EventLog.TraceVerbose, "EventLog::RemoveListenerComponent(" + compLogName + ")"); 1391Debug.Assert(info != null); 1418Debug.Assert(!boolFlags[Flag_registeredAsListener], "StartListening called with boolFlags[Flag_registeredAsListener] true."); 1420Debug.WriteLineIf(CompModSwitches.EventLog.TraceVerbose, "EventLog::StartListening: lastSeenCount = " + lastSeenCount); 1444Debug.WriteLineIf(CompModSwitches.EventLog.TraceVerbose, "EventLog::StaticCompletionCallback: notifying " + interestedComponents.Length + " components."); 1455Debug.WriteLineIf(CompModSwitches.EventLog.TraceVerbose, "EventLog::StaticCompletionCallback: ignored an ObjectDisposedException"); 1466Debug.Assert(boolFlags[Flag_registeredAsListener], "StopListening called without StartListening.");
services\monitoring\system\diagnosticts\PerformanceCounterLib.cs (2)
432Debug.Assert(!String.IsNullOrEmpty(counterData.CounterHelp), "CounterHelp should have been fixed up by the caller"); 1368Debug.Assert(index > 0, "Index > 0 because base counters should never be at index 0");
services\monitoring\system\diagnosticts\Process.cs (8)
159Debug.Assert(SyntaxCheck.CheckMachineName(machineName), "The machine name should be valid!"); 1263Debug.WriteLineIf(processTracing.TraceVerbose, "Process - CloseHandle(process)"); 1302Debug.WriteLineIf(processTracing.TraceVerbose, "Process - CloseHandle(process) in Close()"); 1407Debug.Assert(haveProcessHandle, "Process.EnsureWatchingForExit called with no process handle"); 1408Debug.Assert(Associated, "Process.EnsureWatchingForExit called with no associated process"); 1490Debug.WriteLineIf(processTracing.TraceVerbose, "Process - CloseHandle(processToken)"); 1601Debug.WriteLineIf(processTracing.TraceVerbose, "Process.GetProcesses(" + machineName + ")"); 1652Debug.WriteLineIf(processTracing.TraceVerbose, "GetProcessHandle(access = 0x" + access.ToString("X8", CultureInfo.InvariantCulture) + ", throwIfExited = " + throwIfExited + ")");
services\monitoring\system\diagnosticts\ProcessManager.cs (7)
409Debug.WriteLineIf(Process.processTracing.TraceVerbose, "Process - CloseHandle(toolhelp32 snapshot handle)"); 455Debug.WriteLineIf(Process.processTracing.TraceVerbose, "Process - CloseHandle(toolhelp32 snapshot handle)"); 726Debug.WriteLineIf(Process.processTracing.TraceVerbose, "Process - CloseHandle(process)"); 791Debug.WriteLineIf(Process.processTracing.TraceVerbose, "GetProcessInfos()"); 838Debug.WriteLineIf(Process.processTracing.TraceVerbose, "GetProcessInfos() - found a non-idle process with id 0; ignoring."); 845Debug.WriteLineIf(Process.processTracing.TraceVerbose, "GetProcessInfos() - found a duplicate process id"); 1242Debug.WriteLineIf(Process.processTracing.TraceVerbose, "GetProcessInfos() - unexpected blank ProcessName");
services\monitoring\system\diagnosticts\SharedPerformanceCounter.cs (13)
116Debug.Assert(false, "Counter " + counterName + " does not exist in category " + catName); 150Debug.Assert(!categoryData.UseUniqueSharedMemory, "We should never be calling CalculateAndAllocateMemory in the unique shared memory"); 309Debug.Assert(nextPtr - baseAddress == freeMemoryOffset + totalSize + alignmentAdjustment, "We should have used all of the space we requested at this point"); 404Debug.Assert(firstCounterInCategoryPointer->NextCounterOffset != 0, "The unique shared memory should have all of its counters created by the time we hit CreateInstance"); 433Debug.Assert(nextPtr - baseAddress == freeMemoryOffset + totalSize, "We should have used all of the space we requested at this point"); 457Debug.Assert(!categoryData.UseUniqueSharedMemory, "We should never be calling CreateCounter in the unique shared memory"); 472Debug.Assert(nextPtr + counterNameLength - baseAddress == freeMemoryOffset + totalSize, "We should have used all of the space we requested at this point"); 751Debug.Assert(counterFound, "All counters should be created, so we should always find the counter"); 782Debug.Assert(counterFound, "All counters should be created, so we should always find the counter"); 795Debug.Assert(counterFound, "All counters should be created, so we should always find the counter"); 1049Debug.Assert(((instanceName.Length + 1) * 2) <= InstanceNameSlotSize, "The instance name length should always fit in our slot size"); 1170Debug.Assert(currentCategoryPointer->FirstInstanceOffset <= freeOffset, "The head of the list is inconsistent - possible mismatch of V2 & V3 instances?"); 1191Debug.Assert(currentInstancePointer->RefCount != 0, "RefCount must be 1 for instances passed to VerifyLifetime");
services\monitoring\system\diagnosticts\SharedUtils.cs (1)
141Debug.Assert(mutexOut == null, "You must pass in a null ref Mutex");
sys\system\collections\concurrent\BlockingCollection.cs (10)
228Debug.Assert(boundedCapacity > 0 || boundedCapacity == NON_BOUNDED); 242Debug.Assert(boundedCapacity > 0); 478Debug.Assert((observedAdders + 1) <= (~COMPLETE_ADDING_ON_MASK), "The number of concurrent adders thread excceeded the maximum limit."); 530Debug.Assert((m_currentAdders & ~COMPLETE_ADDING_ON_MASK) > 0); 759Debug.Assert(m_boundedCapacity != NON_BOUNDED); 1047Debug.Assert((index == WaitHandle.WaitTimeout) || (index >= 0 && index < handles.Count)); 1100Debug.Assert(collections != null); 1147Debug.Assert(originalWaitMillisecondsTimeout != Timeout.Infinite); 1218Debug.Assert((returnValue >= 0 && returnValue < collections.Length) 1449Debug.Assert((index == WaitHandle.WaitTimeout) || (index >= 0 && index < handles.Count));
sys\system\collections\concurrent\ConcurrentBag.cs (4)
331Debug.Assert(list != null); 983Debug.Assert(m_tail == null); 1007Debug.Assert(m_head != null); 1048Debug.Assert(tail != null);
sys\system\configuration\ApplicationSettingsBase.cs (1)
631Debug.Assert(provider != null, "Could not determine provider from which settings were loaded");
sys\system\configuration\ClientSettingsStore.cs (3)
76Debug.Assert(settingsGroup != null, "Failed to declare settings group"); 231Debug.Fail("Did not expect to get called here"); 346Debug.Assert(_originalStream != null, "originalStream was null.");
sys\system\configuration\LocalFileSettingsProvider.cs (1)
378Debug.Assert(groupName != null, "SettingsContext did not have a GroupName!");
sys\System\IO\compression\CopyEncoder.cs (2)
18Debug.Assert(output != null); 19Debug.Assert(output.FreeBytes >= PaddingSize);
sys\System\IO\compression\Crc32Helper.cs (1)
71Debug.Assert((buffer != null) && (offset >= 0) && (length >= 0)
sys\System\IO\compression\DeflateInput.cs (2)
37Debug.Assert(n <= count, "Should use more bytes than what we have in the buffer"); 40Debug.Assert(startIndex + count <= buffer.Length, "Input buffer is in invalid state!");
sys\System\IO\compression\DeflaterManaged.cs (8)
73Debug.Assert(input.Count == 0, "We have something left in previous input!"); 99Debug.Assert(outputBuffer != null, "Can't pass in a null output buffer!"); 100Debug.Assert(!NeedsInput(), "GetDeflateOutput should only be called after providing input"); 108Debug.Assert(deflateEncoder.BytesInHistory == 0, "have leftover bytes in window"); 167Debug.Assert(deflateEncoder.BytesInHistory == 0, "have leftover bytes in window"); 208Debug.Assert(outputBuffer != null, "Can't pass in a null output buffer!"); 209Debug.Assert(processingState == DeflaterState.NotStarted || 216Debug.Assert(NeedsInput());
sys\System\IO\compression\DeflateStream.cs (4)
52Debug.Assert(reader != null, "The IFileFormatReader passed to the internal DeflateStream constructor must be non-null"); 329Debug.Assert(inflater.NeedsInput(), "We can only run into this case if we are short of input"); 519Debug.Assert(array != null); 520Debug.Assert(count != 0);
sys\System\IO\compression\FastEncoder.cs (5)
40Debug.Assert(InputAvailable(input), "call SetInput before trying to compress!"); 135Debug.Assert(matchLen >= FastEncoderWindow.MinMatch && matchLen <= FastEncoderWindow.MaxMatch, "Illegal currentMatch length!"); 136Debug.WriteLineIf(CompressionTracingSwitch.Verbose, String.Format(CultureInfo.InvariantCulture, "Match: {0}:{1}", matchLen, matchPos), "Compression"); 141Debug.Assert(codeLen != 0, "Invalid Match Length!"); 160Debug.WriteLineIf(CompressionTracingSwitch.Verbose, String.Format(CultureInfo.InvariantCulture, "Literal: {0}", b ), "Compression");
sys\System\IO\compression\FastEncoderStatics.cs (1)
220Debug.Assert(length > 0 && length <= 16, "Invalid len");
sys\System\IO\compression\FastEncoderWindow.cs (13)
39Debug.Assert(bufEnd - bufPos >= 0, "Ending pointer can't be in front of starting pointer!"); 81Debug.Assert(bufPos == 2*FastEncoderWindowSize, "only call this at the end of the window"); 152Debug.Assert(matchLen > 0, "Invalid match Len!"); 169Debug.Assert(bufPos >= FastEncoderWindowSize && bufPos < (2*FastEncoderWindowSize), "Invalid Buffer Position!"); 307Debug.Assert(bufPos >= 0 && bufPos < 2*FastEncoderWindowSize, "Invalid Buffer position!"); 308Debug.Assert(search < bufPos, "Invalid starting search point!"); 309Debug.Assert(RecalculateHash((int)search) == RecalculateHash(bufPos)); 316Debug.Assert(earliest >= 0, "bufPos is less than FastEncoderWindowSize!"); 321Debug.Assert(RecalculateHash((int)search) == RecalculateHash(bufPos), "Corrupted hash link!"); 346Debug.Assert(prev[search & FastEncoderWindowMask] < search, "we should always go backwards!"); 359Debug.Assert(bestMatch < MinMatch || matchPos < FastEncoderWindowSize, "Only find match inside FastEncoderWindowSize"); 371Debug.Assert(RecalculateHash(where) == i, "Incorrect Hashcode!"); 377Debug.Assert(nextWhere < where, "pointer is messed up!");
sys\System\IO\compression\GZipDecoder.cs (1)
223Debug.Assert(false, "We should not reach unknown state!");
sys\System\IO\compression\HuffmanTree.cs (2)
61Debug.Assert( codeLengths.Length == MaxLiteralTreeElements 216Debug.Assert( value < 0, "CreateTable: Only negative numbers are used for tree pointers!");
sys\System\IO\compression\Inflater.cs (10)
242Debug.WriteLineIf(CompressionTracingSwitch.Informational, "Decoding Dynamic Block", "Compression"); 246Debug.WriteLineIf(CompressionTracingSwitch.Informational, "Decoding Static Block", "Compression"); 252Debug.WriteLineIf(CompressionTracingSwitch.Informational, "Decoding UnCompressed Block", "Compression"); 350Debug.WriteLineIf(CompressionTracingSwitch.Informational, "End of Block", "Compression"); 364Debug.Assert(false, "check why we are here!"); 394Debug.WriteLineIf(CompressionTracingSwitch.Informational, "End of Block", "Compression"); 414Debug.Assert(extraBits != 0, "We handle other cases seperately!"); 471Debug.Assert(freeBytes>= 258, "following operation is not safe!"); 478Debug.Assert(false, "check why we are here!"); 637Debug.Assert(false, "check why we are here!");
sys\System\IO\compression\InputBuffer.cs (13)
43Debug.Assert( 0 < count && count <= 16, "count is invalid."); 100Debug.Assert( 0 < count && count <= 16, "count is invalid."); 118Debug.Assert( output != null, ""); 119Debug.Assert( offset >=0 , ""); 120Debug.Assert( length >=0 , ""); 121Debug.Assert( offset <= output.Length - length, ""); 122Debug.Assert( (bitsInBuffer % 8) ==0, ""); 161Debug.Assert( buffer != null, ""); 162Debug.Assert( offset >=0 , ""); 163Debug.Assert( length >=0 , ""); 164Debug.Assert( offset <= buffer.Length - length, ""); 165Debug.Assert( start == end, ""); 174Debug.Assert(bitsInBuffer >= n, "No enough bits in the buffer, Did you call EnsureBitsAvailable?");
sys\System\IO\compression\OutputBuffer.cs (4)
30Debug.Assert(FreeBytes >= 2, "No enough space in output buffer!"); 37Debug.Assert(n <= 16, "length must be larger than 16!"); 41Debug.Assert(byteBuffer.Length - pos >= 2, "No enough space in output buffer!"); 66Debug.Assert(FreeBytes >= count, "Not enough space in output buffer!");
sys\System\IO\compression\OutputWindow.cs (5)
24Debug.WriteLineIf(CompressionTracingSwitch.Verbose, String.Format(CultureInfo.InvariantCulture, "Literal: {0}", b), "Compression"); 25Debug.Assert(bytesUsed < WindowSize, "Can't add byte when window is full!"); 32Debug.WriteLineIf(CompressionTracingSwitch.Verbose, String.Format(CultureInfo.InvariantCulture, "Length/Distance: {0}:{1}", length, distance), "Compression"); 33Debug.Assert((bytesUsed + length) <= WindowSize, "Not enough space"); 127Debug.Assert(bytesUsed >= 0, "check this function and find why we copied more bytes than we have");
sys\system\io\ports\SerialPort.cs (12)
883Debug.Assert(CachedBytesToRead == 0, "there should be nothing left in our internal buffer"); 915Debug.Assert(IsOpen, "ReadOneChar - port not open"); 1007Debug.Assert(IsOpen, "port not open!"); 1008Debug.Assert(buffer!=null, "invalid buffer!"); 1009Debug.Assert(offset >= 0, "invalid offset!"); 1010Debug.Assert(count >= 0, "invalid count!"); 1011Debug.Assert(buffer.Length - offset >= count, "invalid offset/count!"); 1077Debug.Assert(count != 0, "Count should never be zero. We will probably see bugs further down if count is 0."); 1120Debug.Assert((lastFullCharPos + currentBytesToExamine) <= readLen, "We should never be attempting to read more bytes than we have"); 1138Debug.Assert((buffer.Length - offset - totalCharsFound) >= currentCharsFound, "internal buffer to read one full unicode char sequence is not sufficient!"); 1274Debug.Assert((numCharsRead > 0), "possible bug in ReadBufferIntoChars, reading surrogate char?"); 1478Debug.Assert(inBuffer.Length >= readLen, "ResizeBuffer - readLen > inBuffer.Length");
sys\system\io\ports\SerialStream.cs (17)
195Debug.Assert(!(value < minDataBits || value > maxDataBits), "An invalid value was passed to DataBits"); 263Debug.Assert(!(value < System.IO.Ports.Handshake.None || value > System.IO.Ports.Handshake.RequestToSendXOnXOff), 321Debug.Assert(!(value < Parity.None || value > Parity.Space), "An invalid value was passed to Parity"); 517Debug.Assert(!(value < StopBits.One || value > StopBits.OnePointFive), "An invalid value was passed to StopBits"); 976Debug.Assert(afsar._isComplete == true, "SerialStream::EndRead - AsyncFSCallback didn't set _isComplete to true!"); 1045Debug.Assert(afsar._isComplete == true, "SerialStream::EndWrite - AsyncFSCallback didn't set _isComplete to true!"); 1093Debug.Assert(timeout == SerialPort.InfiniteTimeout || timeout >= 0, "Serial Stream Read - called with timeout " + timeout); 1181Debug.Assert(timeout == SerialPort.InfiniteTimeout || timeout >= 0, "Serial Stream Write - write timeout is " + timeout); 1193Debug.Assert(afsar != null, "afsar should be a SerialStreamAsyncResult and should not be null"); 1235Debug.Assert(afsar != null, "afsar should be a SerialStreamAsyncResult and should not be null"); 1290Debug.Assert(false, "Invalid value for stopBits"); 1371Debug.Assert(whichFlag >= NativeMethods.FBINARY && whichFlag <= NativeMethods.FDUMMY2, "GetDcbFlag needs to fit into enum!"); 1398Debug.Assert(whichFlag >= NativeMethods.FBINARY && whichFlag <= NativeMethods.FDUMMY2, "SetDcbFlag needs to fit into enum!"); 1751Debug.Assert(isAsync, "The port is not open for async, so we should not get ERROR_IO_PENDING from WaitCommEvent"); 1757Debug.Assert(success, "waitCommEventWaitHandle.WaitOne() returned error " + Marshal.GetLastWin32Error()); 1770Debug.Assert(false, "GetOverlappedResult returned error, we might leak intOverlapped memory" + error.ToString(CultureInfo.InvariantCulture)); 1776Debug.Assert(false, "WaitCommEvent returned error " + hr);
sys\system\Media\SoundPlayer.cs (3)
184Debug.Assert(stream == null, "we can't have a stream and a path at the same time"); 233Debug.Assert(stream == null, "we can't have a stream and a path at the same time"); 300Debug.Assert((uri == null || !uri.IsFile), "we only load streams");
sys\system\threading\Barrier.cs (1)
750Debug.Assert(phase < CurrentPhaseNumber);
System.Activities.Core.Presentation (3)
System\Activities\Core\Presentation\FlowchartDesigner.Container.cs (2)
181Debug.Fail("Unknown FlowNode"); 247Debug.Fail("Unknown FlowNode");
System\Activities\Core\Presentation\FlowchartDesigner.xaml.cs (1)
1017System.Diagnostics.Debug.WriteLine(this.isLoaded ? "About to call ConnectionPointHitTest - Loaded" : "About to call ConnectionPointHitTest - Not Loaded");
System.Activities.Presentation (88)
Microsoft.Tools.Common\Microsoft\Activities\Presentation\ExpressionSettingHelper.cs (2)
24Debug.Assert(modelTreeManager != null, "modelTreeManager is null."); 25Debug.Assert(targetFramework != null, "targetFramework is null.");
System.Activities.Presentation\System\Activities\Presentation\Annotations\AnnotationManager.cs (3)
502System.Diagnostics.Debug.WriteLine("ShowAnnotation called."); 529System.Diagnostics.Debug.WriteLine("HideAnnotation called."); 555System.Diagnostics.Debug.WriteLine("DockAnnotation called.");
System.Activities.Presentation\System\Activities\Presentation\Base\Core\Internal\PropertyEditing\CategoryList.cs (5)
326Debug.Fail("CategoryList should only be populated with CategoryEntries."); 357Debug.Fail("CategoryList expects the individual items to be CiderCategoryContainers"); 374Debug.Fail("Couldn't clean up event binding and store container state."); 1206Debug.Fail("Invalid PI state: " + stateString); 1216Debug.Fail("Invalid percentage width stored in PI state: " + percentage.ToString(CultureInfo.InvariantCulture));
System.Activities.Presentation\System\Activities\Presentation\Base\Core\Internal\PropertyEditing\CiderCategoryContainer.cs (1)
356Debug.Fail("UI for CategoryContainer changed. Need to update CiderCategoryContainer logic.");
System.Activities.Presentation\System\Activities\Presentation\Base\Core\Internal\PropertyEditing\EditModeSwitchButtonKeyboardFix.cs (2)
92Debug.Fail("EditModeSwitchButtonKeyboardFix.ApplyFix fix can only be applied to EditModeSwitchButton instances."); 146Debug.Fail(string.Format(
System.Activities.Presentation\System\Activities\Presentation\Base\Core\Internal\PropertyEditing\Editors\PropertyValueToDisplayNameConverter.cs (1)
65Debug.Fail("PropertyValueToDisplayNameConverter is being used for something other than ModelPropertyValues. Re-evaluate the correctness of its logic.");
System.Activities.Presentation\System\Activities\Presentation\Base\Core\Internal\PropertyEditing\ExtensibilityAccessor.cs (4)
348Debug.Fail("ExtensibilityAccessor.IsReadOnly: No properties specified."); 367Debug.Fail("No delegate to evaluate IsMixedValue specified."); 932Debug.Write(text); 937Debug.WriteLine(text);
System.Activities.Presentation\System\Activities\Presentation\Base\Core\Internal\PropertyEditing\FromExpression\Framework\Data\IsNullConverter.cs (1)
28Debug.Fail("IsNullConverter can only be used for BindType=OneWay");
System.Activities.Presentation\System\Activities\Presentation\Base\Core\Internal\PropertyEditing\FromExpression\Framework\PropertyInspector\CategoryContainer.xaml.cs (2)
432Debug.Fail("BasicProperties should not change in a way other than an add or a remove."); 458Debug.Fail("BasicProperties should not change in a way other than an add or a remove.");
System.Activities.Presentation\System\Activities\Presentation\Base\Core\Internal\PropertyEditing\Model\ModelCategoryEntry.cs (2)
132Debug.Fail("Invalid property bucket. The property sort order will be broken."); 169Debug.Fail("Invalid bucket specified. Property was not refreshed.");
System.Activities.Presentation\System\Activities\Presentation\Base\Core\Internal\PropertyEditing\Model\ModelPropertyValue.cs (1)
385Debug.WriteLine(e.Exception.ToString());
System.Activities.Presentation\System\Activities\Presentation\Base\Core\Internal\PropertyEditing\Model\ModelPropertyValueCollection.cs (2)
281Debug.Fail("Didn't find the expected item to remove"); 415Debug.Fail("A new class was introduced that derives from PropertyEntry. Need to update ModelPropertyValueCollection code as well.");
System.Activities.Presentation\System\Activities\Presentation\Base\Core\Internal\PropertyEditing\PropertyInspector.xaml.cs (2)
174Debug.WriteLine(e.ToString()); 187Debug.Fail("Shouldn't be able to set a selection name if no or more than one object is selected.");
System.Activities.Presentation\System\Activities\Presentation\Base\Core\Internal\PropertyEditing\PropertyToolBar.cs (2)
287Debug.Fail("This method shouldn't be called when there is no CategoryList instance to process."); 298Debug.Fail("This method shouldn't be called when there is no CategoryList instance to process.");
System.Activities.Presentation\System\Activities\Presentation\Base\Core\Internal\PropertyEditing\Selection\CategoryContainerSelectionPathInterpreter.cs (2)
58Debug.Fail("Invalid SelectionPath specified."); 64Debug.Fail("No CategoryList specified.");
System.Activities.Presentation\System\Activities\Presentation\Base\Core\Internal\PropertyEditing\Selection\CategoryEditorSelectionPathInterpreter.cs (3)
53Debug.Fail("Invalid SelectionPath specified."); 59Debug.Fail("No CategoryList specified."); 67Debug.Fail("Invalid SelectionPath specified.");
System.Activities.Presentation\System\Activities\Presentation\Base\Core\Internal\PropertyEditing\Selection\PropertySelectionPathInterpreter.cs (3)
53Debug.Fail("Invalid SelectionPath specified."); 59Debug.Fail("No CategoryList specified."); 66Debug.Fail("Invalid SelectionPath specified.");
System.Activities.Presentation\System\Activities\Presentation\Base\Core\Internal\PropertyEditing\Selection\SelectionPath.cs (1)
65Debug.Fail("Invalid SelectionPath State object");
System.Activities.Presentation\System\Activities\Presentation\Base\Core\Internal\PropertyEditing\Selection\SelectionPathResolver.cs (1)
46Debug.Fail(string.Format(System.Globalization.CultureInfo.CurrentCulture, "ISelectionPathInterpreter for path type of ID '{0}' already registered. Ignoring.", interpreter.PathTypeId));
System.Activities.Presentation\System\Activities\Presentation\Base\Core\Internal\PropertyEditing\State\AggregateStateContainer.cs (1)
45Debug.Fail("Invalid state to restore: " + (state == null ? "null" : state.ToString()));
System.Activities.Presentation\System\Activities\Presentation\Base\Core\Internal\PropertyEditing\State\PersistedStateContainer.cs (1)
79Debug.Fail("Invalid state. Deserialization failed: " + stateString);
System.Activities.Presentation\System\Activities\Presentation\Base\Core\Internal\PropertyEditing\State\PropertyViewManagerStateContainer.cs (3)
72Debug.Fail("Unknown IPropertyViewManager type: " + (propertyViewManagerTypeName ?? "null")); 151Debug.Fail("Invalid PropertyViewManager state: " + state.ToString()); 158Debug.Fail("Invalid PropertyViewManager state: " + state.ToString());
System.Activities.Presentation\System\Activities\Presentation\Base\Core\Metadata\MetadataStore.cs (1)
355Debug.Fail("Member " + member + " is not a member of type " + objectType.Name);
System.Activities.Presentation\System\Activities\Presentation\Base\Core\PropertyEditing\EditModeSwitchButton.cs (2)
104Debug.Fail(string.Format( 238Debug.Fail(string.Format(
System.Activities.Presentation\System\Activities\Presentation\Base\Core\PropertyEditing\PropertyContainer.cs (1)
761Debug.Fail(
System.Activities.Presentation\System\Activities\Presentation\DefaultCommandExtensionCallback.cs (1)
180System.Diagnostics.Debug.WriteLine(this.DisplayString);
System.Activities.Presentation\System\Activities\Presentation\DragDropHelper.cs (2)
918System.Diagnostics.Debug.WriteLine("DragShadow.ArrangeOverride " + this.content.DesiredSize); 925System.Diagnostics.Debug.WriteLine("DragShadow.MeasureOverride " + this.content.DesiredSize);
System.Activities.Presentation\System\Activities\Presentation\Hosting\WindowHelperService.cs (1)
135System.Diagnostics.Debug.WriteLine("UnregisterWindowMessageHandler - callback not in list");
System.Activities.Presentation\System\Activities\Presentation\MiniMap\MiniMapControl.xaml.cs (1)
509System.Diagnostics.Debug.WriteLine(string.Format(CultureInfo.InvariantCulture, "{0} ScrollViewer: EWidth {1}, EHeight {2}, AWidth {3}, AHeight {4}, ViewPortW {5} ViewPortH {6}", prefix, mapSource.ExtentWidth, mapSource.ExtentHeight, mapSource.ActualWidth, mapSource.ActualHeight, mapSource.ViewportWidth, mapSource.ViewportHeight));
System.Activities.Presentation\System\Activities\Presentation\Model\ModelTreeManager.cs (3)
1256Debug.Fail("Cannot find generic arguments for IDictionary<,>."); 1333Debug.Fail("ResetValue is not implemented."); 1339Debug.Fail("SetValue is not implemented.");
System.Activities.Presentation\System\Activities\Presentation\View\ArgumentDesigner.xaml.cs (1)
1395System.Diagnostics.Debug.WriteLine(err.ToString());
System.Activities.Presentation\System\Activities\Presentation\View\DataGridHelper.cs (12)
777System.Diagnostics.Debug.WriteLine("ResolveDynamicTemplateCallback not registered for column " + cell.Column.Header); 913System.Diagnostics.Debug.WriteLine(err.ToString()); 1218System.Diagnostics.Debug.WriteLine("DefaultControlBehavior.HandleControlLoaded"); 1225System.Diagnostics.Debug.WriteLine("DefaultControlBehavior.ControlUnloaded"); 1238System.Diagnostics.Debug.WriteLine("TextBoxBehavior.HandleControlLoaded"); 1259System.Diagnostics.Debug.WriteLine("TextBoxBehavior.ControlUnloaded"); 1272System.Diagnostics.Debug.WriteLine("VBIdentifierDesignerBehavior.HandleControlLoaded"); 1315System.Diagnostics.Debug.WriteLine("VBIdentifierDesignerBehavior.ControlUnloaded"); 1341System.Diagnostics.Debug.WriteLine("TypePresenterBehavior.HandleControlLoaded"); 1358System.Diagnostics.Debug.WriteLine("TypePresenterBehavior.ControlUnloaded"); 1407System.Diagnostics.Debug.WriteLine("ExpressionTextBoxBehavior.HandleControlLoaded"); 1434System.Diagnostics.Debug.WriteLine("ExpressionTextBoxBehavior.ControlUnloaded");
System.Activities.Presentation\System\Activities\Presentation\View\DesignerView.Commands.cs (2)
522System.Diagnostics.Debug.WriteLine(string.Format(CultureInfo.InvariantCulture, "{0} DesignerView.OnWorkflowViewContextMenuLoaded()", DateTime.Now.ToLocalTime())); 1393System.Diagnostics.Debug.WriteLine(target.GetType().Name + " " + target.GetHashCode());
System.Activities.Presentation\System\Activities\Presentation\View\DesignerView.xaml.cs (3)
651System.Diagnostics.Debug.WriteLine( 1646System.Diagnostics.Debug.WriteLine(e.ToString()); 1677System.Diagnostics.Debug.WriteLine(e.ToString());
System.Activities.Presentation\System\Activities\Presentation\View\ExtensionSurface.cs (3)
363System.Diagnostics.Debug.WriteLine("SetSize oldSize (" + window.Width + "," + window.Height + ") newSize (" + size.Width + "," + size.Height + ")"); 383System.Diagnostics.Debug.WriteLine(string.Format(CultureInfo.InvariantCulture, "ArrangeOverride Size({0},{1})", arrangeSize.Width, arrangeSize.Height)); 438System.Diagnostics.Debug.WriteLine("MO constraint:" + constraint.Width + "," + constraint.Height + " new: " + result.Width + "," + result.Height);
System.Activities.Presentation\System\Activities\Presentation\View\ExtensionWindowResizeGrip.cs (1)
62System.Diagnostics.Debug.WriteLine("NewSize = (" + newSize.Width + "," + newSize.Height + ")");
System.Activities.Presentation\System\Activities\Presentation\View\VisualBasicEditor.xaml.cs (1)
578Debug.Fail("Unable to find editor with the following editor name: " + this.editorName, ex.Message);
System.Activities.Presentation\System\Activities\Presentation\WorkflowViewElement.cs (8)
346System.Diagnostics.Debug.WriteLine(string.Format( 449System.Diagnostics.Debug.WriteLine(string.Format( 481System.Diagnostics.Debug.WriteLine(string.Format( 499System.Diagnostics.Debug.WriteLine(string.Format( 545System.Diagnostics.Debug.WriteLine( 640System.Diagnostics.Debug.WriteLine( 648System.Diagnostics.Debug.WriteLine( 811System.Diagnostics.Debug.WriteLine(
System.ComponentModel.DataAnnotations (3)
DataAnnotations\EnumDataTypeAttribute.cs (1)
61Debug.Assert(valueType == value.GetType(), "The valueType should equal the Type of the value");
DataAnnotations\UIHintAttribute.cs (2)
167Debug.Assert(leftParams != null, "leftParams shouldn't be null"); 168Debug.Assert(rightParams != null, "rightParams shouldn't be null");
System.Core (510)
Microsoft\Scripting\Actions\CallSite.cs (2)
143Debug.Assert(_CachedNoMatch != null, "all normal sites should have Update cached once there is an instance."); 146Debug.Assert(_CachedUpdate != null, "all normal sites should have Update cached once there is an instance.");
Microsoft\Scripting\Actions\CallSiteBinder.cs (1)
231Debug.Assert(result != null);
Microsoft\Scripting\Actions\DynamicObject.cs (3)
492Debug.Assert(binder is ConvertBinder && fallbackInvoke == null); 496Debug.Assert(convert.Method == null); 730Debug.Assert(Restrictions == BindingRestrictions.Empty, "We don't merge, restrictions are always empty");
Microsoft\Scripting\Actions\ExpandoObject.cs (9)
134Debug.Assert(data[exactMatch] == Uninitialized); 142Debug.Assert(index != ExpandoObject.NoMatch); 222Debug.Assert(index >= 0 && index <= _data.Length); 247Debug.Assert(oldClass != newClass); 299Debug.Assert(collection != null); 415Debug.Assert(collection != null); 826Debug.Assert(originalClass != klass); 875Debug.Assert(index != ExpandoObject.NoMatch); 898Debug.Assert(Restrictions == BindingRestrictions.Empty, "We don't merge, restrictions are always empty");
Microsoft\Scripting\Ast\BinaryExpression.cs (11)
158Debug.Assert(IsOpAssignment(op)); 342Debug.Assert(method == null && TypeUtils.AreEquivalent(type, left.Type)); 346Debug.Assert(method == null && TypeUtils.AreEquivalent(type, right.Type) && nodeType == ExpressionType.Coalesce); 416Debug.Assert(IsLiftedLogical); 422Debug.Assert(opTrueFalse != null); 615System.Diagnostics.Debug.Assert(method != null); 726System.Diagnostics.Debug.Assert(method != null); 1339Debug.Assert(typeof(System.MulticastDelegate).IsAssignableFrom(delegateType) && delegateType != typeof(System.MulticastDelegate)); 1345Debug.Assert(pms.Length == conversion.Parameters.Count); 1476Debug.Assert(typeof(System.MulticastDelegate).IsAssignableFrom(delegateType) && delegateType != typeof(System.MulticastDelegate)); 1479Debug.Assert(pms.Length == conversion.Parameters.Count);
Microsoft\Scripting\Ast\BlockExpression.cs (18)
60Debug.Assert(ExpressionCount > 0); 209Debug.Assert(args.Length == 2); 210Debug.Assert(variables == null || variables.Count == 0); 246Debug.Assert(args.Length == 3); 247Debug.Assert(variables == null || variables.Count == 0); 285Debug.Assert(args.Length == 4); 286Debug.Assert(variables == null || variables.Count == 0); 326Debug.Assert(args.Length == 5); 327Debug.Assert(variables == null || variables.Count == 0); 337Debug.Assert(expressions.Count != 0); 343Debug.Assert(index >= 0 && index < _expressions.Count); 359Debug.Assert(variables == null || variables.Count == 0); 430Debug.Assert(args.Length == 1); 431Debug.Assert(variables == null || variables.Count == VariableCount); 460Debug.Assert(args.Length == ExpressionCount); 461Debug.Assert(variables == null || variables.Count == VariableCount); 480Debug.Assert(args.Length == ExpressionCount); 481Debug.Assert(variables == null || variables.Count == VariableCount);
Microsoft\Scripting\Ast\DebugViewWriter.cs (10)
118Debug.Assert(String.IsNullOrEmpty(le.Name)); 123Debug.Assert(String.IsNullOrEmpty(p.Name)); 128Debug.Assert(String.IsNullOrEmpty(target.Name)); 136Debug.Assert(node != null); 137Debug.Assert(writer != null); 148Debug.Assert(_stack.Count == 0); 571Debug.Assert(parent != null); 610Debug.Assert(child.NodeType == parent.NodeType); 623Debug.Assert(binary != null); 1141Debug.Assert(_stack.Count == 0);
Microsoft\Scripting\Ast\DynamicExpression.cs (7)
47Debug.Assert(delegateType.GetMethod("Invoke").GetReturnType() == typeof(object) || GetType() != typeof(DynamicExpression)); 454Debug.Assert(args.Length == ((IArgumentProvider)this).ArgumentCount); 465Debug.Assert(delegateType.GetMethod("Invoke").GetReturnType() == returnType); 500Debug.Assert(args.Length == 1); 548Debug.Assert(args.Length == 2); 598Debug.Assert(args.Length == 3); 650Debug.Assert(args.Length == 4);
Microsoft\Scripting\Ast\ExpressionStringBuilder.cs (6)
119Debug.Assert(node != null); 126Debug.Assert(node != null); 133Debug.Assert(node != null); 143Debug.Assert(node != null); 153Debug.Assert(node != null); 765Debug.Assert(node.Indexer != null);
Microsoft\Scripting\Ast\IndexExpression.cs (4)
51Debug.Assert(instance != null && instance.Type.IsArray); 52Debug.Assert(instance.Type.GetArrayRank() == arguments.Count); 135Debug.Assert(instance != null); 136Debug.Assert(arguments == null || arguments.Length == _arguments.Count);
Microsoft\Scripting\Ast\InvocationExpression.cs (2)
114Debug.Assert(lambda != null); 115Debug.Assert(arguments == null || arguments.Length == _arguments.Count);
Microsoft\Scripting\Ast\LambdaExpression.cs (2)
62Debug.Assert(delegateType != null); 278Debug.Assert(create != null);
Microsoft\Scripting\Ast\MethodCallExpression.cs (21)
165Debug.Assert(instance == null); 166Debug.Assert(args == null || args.Count == _arguments.Count); 201Debug.Assert(instance != null); 202Debug.Assert(args == null || args.Count == _arguments.Count); 234Debug.Assert(instance == null); 235Debug.Assert(args == null || args.Count == 1); 274Debug.Assert(instance == null); 275Debug.Assert(args == null || args.Count == 2); 315Debug.Assert(instance == null); 316Debug.Assert(args == null || args.Count == 3); 358Debug.Assert(instance == null); 359Debug.Assert(args == null || args.Count == 4); 403Debug.Assert(instance == null); 404Debug.Assert(args == null || args.Count == 5); 421Debug.Assert(instance != null); 451Debug.Assert(instance != null); 452Debug.Assert(args == null || args.Count == 2); 468Debug.Assert(instance != null); 500Debug.Assert(instance != null); 501Debug.Assert(args == null || args.Count == 3); 835Debug.Assert(nodeKind == ExpressionType.Invoke || nodeKind == ExpressionType.Call || nodeKind == ExpressionType.Dynamic || nodeKind == ExpressionType.New);
Microsoft\Scripting\Ast\TypeUtils.cs (16)
43Debug.Assert(type != null, "type cannot be null"); 200Debug.Assert(source != null && dest != null); 227Debug.Assert(source != null && dest != null); 264Debug.Assert(t != null); 270Debug.Assert(t != null); 276Debug.Assert(t != null); 282Debug.Assert(t != null); 288Debug.Assert(source != null && dest != null); 312Debug.Assert(genericParameters != null); 313Debug.Assert(sourceArguments != null); 314Debug.Assert(destArguments != null); 315Debug.Assert(genericParameters.Length == sourceArguments.Length); 316Debug.Assert(genericParameters.Length == destArguments.Length); 323Debug.Assert(sourceArgument != null && destArgument != null); 333Debug.Assert(genericParameter != null); 421Debug.Assert(left.IsValueType);
Microsoft\Scripting\Ast\UnaryExpression.cs (5)
265Debug.Assert(i == temps.Length); 269Debug.Assert(i == temps.Length); 272Debug.Assert(i == block.Length); 394System.Diagnostics.Debug.Assert(method != null); 431System.Diagnostics.Debug.Assert(method != null);
Microsoft\Scripting\Compiler\BoundConstants.cs (2)
110Debug.Assert(!ILGen.CanEmitConstant(value, type)); 171Debug.Assert(lc.CanEmitBoundConstants); // this should've been checked already
Microsoft\Scripting\Compiler\CompilerScope.cs (3)
189Debug.Assert(locals != null); 281Debug.Assert(_parent == null && parent != this); 381Debug.Assert(ShouldCache(v) && !_locals.ContainsKey(v));
Microsoft\Scripting\Compiler\DelegateHelpers.Generated.cs (2)
209Debug.Assert(types != null && types.Length > 0); 223Debug.Assert(result != null);
Microsoft\Scripting\Compiler\ExpressionQuoter.cs (1)
40Debug.Assert(hoistedLocals != null && locals != null);
Microsoft\Scripting\Compiler\ILGen.cs (20)
40Debug.Assert(methodBase is MethodInfo || methodBase is ConstructorInfo); 52Debug.Assert(index >= 0); 78Debug.Assert(index >= 0); 88Debug.Assert(index >= 0); 477Debug.Assert(value != null); 773Debug.Assert(TypeUtils.IsNullableType(typeFrom)); 774Debug.Assert(TypeUtils.IsNullableType(typeTo)); 808Debug.Assert(!TypeUtils.IsNullableType(typeFrom)); 809Debug.Assert(TypeUtils.IsNullableType(typeTo)); 822Debug.Assert(TypeUtils.IsNullableType(typeFrom)); 823Debug.Assert(!TypeUtils.IsNullableType(typeTo)); 832Debug.Assert(TypeUtils.IsNullableType(typeFrom)); 833Debug.Assert(!TypeUtils.IsNullableType(typeTo)); 834Debug.Assert(typeTo.IsValueType); 846Debug.Assert(TypeUtils.IsNullableType(typeFrom)); 856Debug.Assert(isTypeFromNullable || isTypeToNullable); 868Debug.Assert(nullableType.IsValueType); 875Debug.Assert(nullableType.IsValueType); 882Debug.Assert(nullableType.IsValueType); 992Debug.Assert(!type.IsEnum);
Microsoft\Scripting\Compiler\LabelInfo.cs (1)
352Debug.Assert(CanJumpInto);
Microsoft\Scripting\Compiler\LambdaCompiler.Address.cs (5)
38Debug.Assert(node != null); 79Debug.Assert(node.NodeType == ExpressionType.ArrayIndex && node.Method == null); 198Debug.Assert(node.NodeType == ExpressionType.Unbox); 199Debug.Assert(type.IsValueType && !TypeUtils.IsNullableType(type)); 207Debug.Assert(TypeUtils.AreReferenceAssignable(type, node.Type));
Microsoft\Scripting\Compiler\LambdaCompiler.Binary.cs (11)
41Debug.Assert(b.NodeType != ExpressionType.AndAlso && b.NodeType != ExpressionType.OrElse && b.NodeType != ExpressionType.Coalesce); 57Debug.Assert(!b.IsLiftedToNull || b.Type == typeof(bool?)); 82Debug.Assert(TypeUtils.IsNullableType(e.Type)); 83Debug.Assert(op == ExpressionType.Equal || op == ExpressionType.NotEqual); 162Debug.Assert(!TypeUtils.IsNullableType(leftType)); 163Debug.Assert(!TypeUtils.IsNullableType(rightType)); 304Debug.Assert(!resultType.IsNullableType()); 323Debug.Assert(op == ExpressionType.Equal || op == ExpressionType.NotEqual); 337Debug.Assert(TypeUtils.IsNullableType(leftType) || TypeUtils.IsNullableType(rightType)); 383Debug.Assert(TypeUtils.IsNullableType(leftType)); 496Debug.Assert(leftIsNullable || rightIsNullable);
Microsoft\Scripting\Compiler\LambdaCompiler.ControlFlow.cs (3)
58Debug.Assert(_labelBlock != null && _labelBlock.Kind == kind); 64Debug.Assert(node.Target != null); 80Debug.Assert(label != null);
Microsoft\Scripting\Compiler\LambdaCompiler.cs (6)
247Debug.Assert(type != null); 251Debug.Assert(type == local.LocalType); 265Debug.Assert(type != null && variable != null); 292Debug.Assert(_hasClosureArgument, "must have a Closure argument"); 293Debug.Assert(_method.IsStatic, "must be a static method"); 298Debug.Assert(_method is DynamicMethod);
Microsoft\Scripting\Compiler\LambdaCompiler.Expressions.cs (13)
54Debug.Assert(newValue == CompilationFlags.EmitAsTail || newValue == CompilationFlags.EmitAsMiddle || newValue == CompilationFlags.EmitAsNoTail); 63Debug.Assert(newValue == CompilationFlags.EmitExpressionStart || newValue == CompilationFlags.EmitNoExpressionStart); 72Debug.Assert(newValue == CompilationFlags.EmitAsDefaultType || newValue == CompilationFlags.EmitAsVoidType); 95Debug.Assert(node != null); 138Debug.Assert(TypeUtils.AreReferenceAssignable(type, node.Type)); 434Debug.Assert(args.ArgumentCount + skipParameters == pis.Length); 522Debug.Assert(node.Arguments.Count == 0, "Node with arguments must have a constructor."); 523Debug.Assert(node.Type.IsValueType, "Only value type may have constructor not set."); 563Debug.Assert(!type.IsValueType); 572Debug.Assert(result == AnalyzeTypeIsResult.Unknown); 923System.Diagnostics.Debug.Assert(variables != null); 924System.Diagnostics.Debug.Assert(arguments != null); 938Debug.Assert(TypeUtils.AreEquivalent(TypeUtils.GetNonNullableType(resultType), TypeUtils.GetNonNullableType(mc.Type)));
Microsoft\Scripting\Compiler\LambdaCompiler.Generated.cs (1)
38Debug.Assert(node != null);
Microsoft\Scripting\Compiler\LambdaCompiler.Lambda.cs (1)
196Debug.Assert(_labelBlock.Parent == null && _labelBlock.Kind == LabelScopeKind.Lambda);
Microsoft\Scripting\Compiler\LambdaCompiler.Logical.cs (17)
38Debug.Assert(node.Test.Type == typeof(bool)); 96Debug.Assert(b.Method == null); 111Debug.Assert(b.Method == null); 124Debug.Assert(b.Conversion.Parameters.Count == 1); 126Debug.Assert(p.Type.IsAssignableFrom(b.Left.Type) || 177Debug.Assert(b.Conversion.Parameters.Count == 1); 212Debug.Assert(!b.Left.Type.IsValueType); 284Debug.Assert(opFalse != null, "factory should check that the method exists"); 297Debug.Assert(b.Method.IsStatic); 411Debug.Assert(opTrue != null, "factory should check that the method exists"); 424Debug.Assert(b.Method.IsStatic); 520Debug.Assert(node.NodeType == ExpressionType.Equal || node.NodeType == ExpressionType.NotEqual); 521Debug.Assert(!node.IsLiftedToNull); 536Debug.Assert(!node.Right.Type.IsValueType); 545Debug.Assert(!node.Left.Type.IsValueType); 581Debug.Assert(node.NodeType == ExpressionType.AndAlso || node.NodeType == ExpressionType.OrElse); 582Debug.Assert(!node.IsLiftedToNull);
Microsoft\Scripting\Compiler\LambdaCompiler.Statements.cs (5)
113Debug.Assert(_scope.Node == node); 195Debug.Assert(TypeUtils.AreReferenceAssignable(testValue.Type, test.Type)); 260Debug.Assert(key > buckets[buckets.Count - 1].Key); 545Debug.Assert(key == bucket[bucket.Count - 1].Key + 1); 546Debug.Assert(slot == jmpLabels.Length);
Microsoft\Scripting\Compiler\LambdaCompiler.Unary.cs (3)
146Debug.Assert(TypeUtils.AreEquivalent(operandType, resultType)); 272Debug.Assert(node.Type.IsValueType && !TypeUtils.IsNullableType(node.Type)); 303Debug.Assert(pis != null && pis.Length == 1);
Microsoft\Scripting\Compiler\RuntimeVariableList.cs (2)
86Debug.Assert(data != null); 87Debug.Assert(indexes != null);
Microsoft\Scripting\Compiler\StackSpiller.cs (9)
134Debug.Assert(result.Node != null); 137Debug.Assert((result.Action == RewriteAction.None) ^ (node != result.Node), "rewrite action does not match node object identity"); 140Debug.Assert(result.Node.NodeType != ExpressionType.Extension, "extension nodes must be rewritten"); 143Debug.Assert( 151Debug.Assert( 559Debug.Assert(node.NodeType != ExpressionType.Quote, "unexpected Quote"); 560Debug.Assert(node.NodeType != ExpressionType.Throw, "unexpected Throw"); 926Debug.Assert(original != null); 927Debug.Assert(max < original.Count);
Microsoft\Scripting\Compiler\StackSpiller.Temps.cs (9)
74Debug.Assert(_freeTemps == null || !_freeTemps.Contains(temp)); 75Debug.Assert(_usedTemps == null || !_usedTemps.Contains(temp)); 85Debug.Assert(_freeTemps == null || !_freeTemps.Contains(temp)); 100Debug.Assert(_usedTemps == null || mark <= _usedTemps.Count); 102Debug.Assert(mark == 0 || _usedTemps != null); 114Debug.Assert(_usedTemps == null || _usedTemps.Count == 0); 146Debug.Assert(!_done); 207Debug.Assert(_comma.Capacity == _comma.Count + 1); 235Debug.Assert(first == 0);
Microsoft\Scripting\Compiler\VariableBinder.cs (1)
206Debug.Assert(referenceScope != null);
Microsoft\Scripting\Utils\CacheDict.cs (1)
62Debug.Assert(size > 0);
Microsoft\Scripting\Utils\ContractUtils.cs (7)
35Debug.Assert(false, "Unreachable"); 47Debug.Assert(!string.IsNullOrEmpty(paramName)); 55Debug.Assert(!string.IsNullOrEmpty(paramName)); 75Debug.Assert(!string.IsNullOrEmpty(offsetName)); 76Debug.Assert(!string.IsNullOrEmpty(countName)); 77Debug.Assert(array != null); 87Debug.Assert(arrayName != null);
Microsoft\Scripting\Utils\TypeExtensions.cs (1)
30Debug.Assert(methodInfo != null && delegateType != null);
Microsoft\Win32\SafeHandles\CapiSafeHandles.cs (2)
113Debug.Assert(m_csp == IntPtr.Zero); 407Debug.Assert(!duplicate.IsInvalid, "Failed to duplicate handle successfully");
Microsoft\Win32\SafeHandles\SafePerfProviderHandle.cs (1)
25Debug.Assert(Status == (uint)UnsafeNativeMethods.ERROR_SUCCESS, "PerfStopProvider() fails");
System\Collections\Generic\HashSet.cs (12)
191Debug.Assert(index == count); 241Debug.Assert(m_buckets != null, "m_buckets was null but m_lastIndex > 0"); 916Debug.Assert(m_count >= 0, "m_count is negative"); 925Debug.Assert(m_buckets != null, "m_buckets was null but m_count > 0"); 949Debug.Assert(newSlots.Length <= m_slots.Length, "capacity increased after TrimExcess"); 978Debug.Assert(m_buckets == null, "Initialize was called but m_buckets was non-null"); 994Debug.Assert(m_buckets != null, "IncreaseCapacity called on a set with no elements"); 1106Debug.Assert(m_freeList == -1); 1177Debug.Assert(m_buckets != null, "m_buckets shouldn't be null; callers should check first"); 1218Debug.Assert(m_buckets != null, "m_buckets was null; callers should check first"); 1326Debug.Assert(m_buckets != null, "m_buckets is null, callers should have checked"); 1402Debug.Assert((m_buckets != null) && (m_count > 0), "m_buckets was null but count greater than 0");
System\Diagnostics\Eventing\Reader\EventLogWatcher.cs (1)
217Debug.Assert(this. numEventsInBuffer == 0);
System\Diagnostics\Eventing\Reader\ProviderMetadataCachedInformation.cs (1)
99Debug.Assert(session != null);
System\Diagnostics\EventSchemaTraceListener.cs (2)
559Debug.Assert(false, "Exception while populating config values for EventSchemaTraceListener!"); 738Debug.Assert(false, "UnExpected exc! Possible encoding error or failure on write! DATA LOSS!!!");
System\IO\BufferedStream2.cs (2)
78Debug.Assert((_readPos==0 && _readLen==0 && _writePos >= 0) || (_writePos==0 && _readPos <= _readLen), "We're either reading or writing, but not both."); 533Debug.Assert(_readPos == 0 && _readLen == 0, "BufferedStream: Read buffer must be empty in FlushWrite!");
System\IO\LogStream.cs (12)
74Debug.Assert(!String.IsNullOrEmpty(path)); 160Debug.Assert(UnsafeNativeMethods.GetFileType(_handle) == UnsafeNativeMethods.FILE_TYPE_DISK, "did someone accidentally removed the device type check from SafeCreateFile P/Invoke wrapper?"); 217Debug.Assert(CanWrite, "CanWrite"); 218Debug.Assert(buffer != null, "buffer != null"); 219Debug.Assert(offset >= 0, "offset is negative"); 220Debug.Assert(count >= 0, "count is negative"); 239Debug.Assert(r >= 0, "WriteCore is likely broken."); 256Debug.Assert(offset >= 0, "offset >= 0"); 257Debug.Assert(count >= 0, "count >= 0"); 258Debug.Assert(bytes != null, "bytes != null"); 306Debug.Assert(!_handle.IsClosed, "!_handle.IsClosed"); 307Debug.Assert(origin>=SeekOrigin.Begin && origin<=SeekOrigin.End, "origin>=SeekOrigin.Begin && origin<=SeekOrigin.End");
System\IO\MemoryMappedFiles\MemoryMappedFile.cs (5)
40Debug.Assert(handle != null && !handle.IsClosed && !handle.IsInvalid, "handle is null, closed, or invalid"); 48Debug.Assert(handle != null && !handle.IsClosed && !handle.IsInvalid, "handle is null, closed, or invalid"); 49Debug.Assert(fileStream != null, "fileStream is null"); 180Debug.Assert(handle != null && !handle.IsInvalid); 460Debug.Assert(access != MemoryMappedFileAccess.Write, "Callers requesting write access shouldn't try to create a mmf");
System\IO\MemoryMappedFiles\MemoryMappedView.cs (2)
87Debug.Assert(newOffset >= 0, "newOffset = (offset - extraMemNeeded) < 0"); 161Debug.Assert(viewSize >= (ulong)size, "viewSize < size");
System\IO\MemoryMappedFiles\MemoryMappedViewAccessor.cs (1)
30Debug.Assert(view != null, "view is null");
System\IO\MemoryMappedFiles\MemoryMappedViewStream.cs (1)
30Debug.Assert(view != null, "view is null");
System\IO\Pipes\IOCancellationHelper.cs (1)
93Debug.WriteLine("CancelIoEx finished with error code {0}.", errorCode);
System\IO\Pipes\Pipe.cs (15)
196Debug.Assert(direction != PipeDirection.InOut, "Anonymous pipe direction shouldn't be InOut"); 197Debug.Assert(bufferSize >= 0, "bufferSize is negative"); 321Debug.Assert(direction != PipeDirection.InOut, "anonymous pipes are unidirectional, caller should have verified before calling Init"); 322Debug.Assert(safePipeHandle != null && !safePipeHandle.IsInvalid, "safePipeHandle must be valid"); 561Debug.Assert(fullPipeName != null && fullPipeName.Length != 0, "fullPipeName is null or empty"); 562Debug.Assert(direction >= PipeDirection.In && direction <= PipeDirection.InOut, "invalid pipe direction"); 563Debug.Assert(inBufferSize >= 0, "inBufferSize is negative"); 564Debug.Assert(outBufferSize >= 0, "outBufferSize is negative"); 565Debug.Assert((maxNumberOfServerInstances >= 1 && maxNumberOfServerInstances <= 254) || (maxNumberOfServerInstances == MaxAllowedServerInstances), "maxNumberOfServerInstances is invalid"); 566Debug.Assert(transmissionMode >= PipeTransmissionMode.Byte && transmissionMode <= PipeTransmissionMode.Message, "transmissionMode is out of range"); 750Debug.Assert(afsar._isComplete == true, "NamedPipeServerStream::EndWaitForConnection - AsyncFSCallback didn't set _isComplete to true!"); 760Debug.Assert(afsar._overlapped == null); 889Debug.Assert(asyncResult._overlapped == pOverlapped); 911Debug.Assert(!wh.SafeWaitHandle.IsClosed, "ManualResetEvent already closed!"); 913Debug.Assert(r, "ManualResetEvent::Set failed!");
System\IO\Pipes\PipeStream.cs (46)
120Debug.Assert(direction >= PipeDirection.In && direction <= PipeDirection.InOut, "invalid pipe direction"); 121Debug.Assert(transmissionMode >= PipeTransmissionMode.Byte && transmissionMode <= PipeTransmissionMode.Message, "transmissionMode is out of range"); 122Debug.Assert(outBufferSize >= 0, "outBufferSize is negative"); 149Debug.Assert(handle != null, "handle is null"); 204Debug.Assert(m_handle != null, "_handle is null"); 205Debug.Assert(!m_handle.IsClosed, "_handle is closed"); 206Debug.Assert(CanRead, "can't read"); 207Debug.Assert(buffer != null, "buffer is null"); 208Debug.Assert(offset >= 0, "offset is negative"); 209Debug.Assert(count >= 0, "count is negative"); 232Debug.Assert(r >= 0, "PipeStream's ReadCore is likely broken."); 283Debug.Assert(m_handle != null, "_handle is null"); 284Debug.Assert(!m_handle.IsClosed, "_handle is closed"); 285Debug.Assert(CanRead, "can't read"); 286Debug.Assert(buffer != null, "buffer == null"); 287Debug.Assert(m_isAsync, "BeginReadCore doesn't work on synchronous file streams!"); 288Debug.Assert(offset >= 0, "offset is negative"); 289Debug.Assert(count >= 0, "count is negative"); 394Debug.Assert(afsar._isComplete == true, 447Debug.Assert(!m_handle.IsClosed, "_handle is closed"); 448Debug.Assert(CanWrite, "can't write"); 449Debug.Assert(buffer != null, "buffer is null"); 450Debug.Assert(offset >= 0, "offset is negative"); 451Debug.Assert(count >= 0, "count is negative"); 465Debug.Assert(r >= 0, "PipeStream's WriteCore is likely broken."); 500Debug.Assert(!m_handle.IsClosed, "_handle is closed"); 501Debug.Assert(CanWrite, "can't write"); 502Debug.Assert(buffer != null, "buffer == null"); 503Debug.Assert(m_isAsync, "BeginWriteCore doesn't work on synchronous file streams!"); 504Debug.Assert(offset >= 0, "offset is negative"); 505Debug.Assert(count >= 0, "count is negative"); 596Debug.Assert(afsar._isComplete == true, "PipeStream::EndWrite - AsyncPSCallback didn't set _isComplete to true!"); 621Debug.Assert(handle != null, "handle is null"); 622Debug.Assert(offset >= 0, "offset is negative"); 623Debug.Assert(count >= 0, "count is negative"); 624Debug.Assert(buffer != null, "buffer == null"); 625Debug.Assert((m_isAsync && overlapped != null) || (!m_isAsync && overlapped == null), "Async IO parameter ----up in call to ReadFileNative."); 626Debug.Assert(buffer.Length - offset >= count, "offset + count >= buffer length"); 671Debug.Assert(handle != null, "handle is null"); 672Debug.Assert(offset >= 0, "offset is negative"); 673Debug.Assert(count >= 0, "count is negative"); 674Debug.Assert(buffer != null, "buffer == null"); 675Debug.Assert((m_isAsync && overlapped != null) || (!m_isAsync && overlapped == null), "Async IO parameter ----up in call to WriteFileNative."); 676Debug.Assert(buffer.Length - offset >= count, "offset + count >= buffer length"); 1262Debug.Assert(!wh.SafeWaitHandle.IsClosed, "ManualResetEvent already closed!"); 1264Debug.Assert(r, "ManualResetEvent::Set failed!");
System\Linq\Parallel\Merging\ArrayMergeHelper.cs (2)
79Debug.Assert(false, "ArrayMergeHelper<>.GetEnumerator() is not intended to be used. Call GetResultsAsArray() instead."); 89Debug.Assert(m_outputArray != null);
System\Security\Cryptography\AesCryptoServiceProvider.cs (1)
61Debug.Assert(defaultKeySize > 0, "defaultKeySize > 0");
System\Security\Cryptography\BCryptHashAlgorithm.cs (1)
129Debug.Assert(hashObjectSize > 0, "hashObjectSize > 0");
System\Security\Cryptography\BCryptNative.cs (18)
507Debug.Assert(getter != null, "Unknown handle type"); 518Debug.Assert(bufferSize > 0, "bufferSize > 0"); 683Debug.Assert(input != null); 684Debug.Assert(inputOffset >= 0); 685Debug.Assert(inputCount >= 0); 686Debug.Assert(inputCount <= input.Length - inputOffset); 687Debug.Assert(output != null); 688Debug.Assert(outputOffset >= 0); 689Debug.Assert(outputCount >= 0); 690Debug.Assert(outputCount <= output.Length - outputOffset); 733Debug.Assert(input != null); 734Debug.Assert(inputOffset >= 0); 735Debug.Assert(inputCount >= 0); 736Debug.Assert(inputCount <= input.Length - inputOffset); 737Debug.Assert(output != null); 738Debug.Assert(outputOffset >= 0); 739Debug.Assert(outputCount >= 0); 740Debug.Assert(outputCount <= output.Length - outputOffset);
System\Security\Cryptography\CapiHashAlgorithm.cs (1)
97Debug.Assert(newHashAlgorithm != null, "newHashAlgorithm != null");
System\Security\Cryptography\CapiNative.cs (5)
583Debug.Assert(keyBlob.Length > keyDataOffset, "Key blob is in an unexpected format."); 586Debug.Assert(keyLength > 0, "Unexpected key length."); 587Debug.Assert(keyBlob.Length >= keyDataOffset + keyLength, "Key blob is in an unexpected format."); 621Debug.Assert(0 < parameterSize, "Invalid parameter size returned"); 666Debug.Assert(Marshal.SizeOf(typeof(T)) <= bufferSize, "Buffer size does not match structure size");
System\Security\Cryptography\CapiSymmetricAlgorithm.cs (2)
142Debug.Assert(inputCount >= m_depadBuffer.Length, "inputCount >= m_depadBuffer.Length"); 149Debug.Assert(inputCount % InputBlockSize == 0, "Did not remove whole blocks for depadding");
System\Security\Cryptography\ECDiffieHellmanCng.cs (2)
239Debug.Assert(false, "Illegal key size set"); 396Debug.Assert(KeyDerivationFunction == ECDiffieHellmanKeyDerivationFunction.Tls, "Unknown KDF");
System\Security\Cryptography\ECDsaCng.cs (7)
152Debug.Assert(false, "Illegal key size set"); 448Debug.Assert(data != null); 449Debug.Assert(offset >= 0 && offset <= data.Length); 450Debug.Assert(count >= 0 && count <= data.Length - offset); 451Debug.Assert(!String.IsNullOrEmpty(hashAlgorithm.Name)); 461Debug.Assert(data != null); 462Debug.Assert(!String.IsNullOrEmpty(hashAlgorithm.Name));
System\Security\Cryptography\ManifestSignatureInformation.cs (3)
32Debug.Assert(manifest == ManifestKinds.Application || manifest == ManifestKinds.Deployment, "Invalid manifest for signature information"); 68Debug.Assert(application != null, "application != null"); 77Debug.Assert(manifestStream != null, "Cannot get stream for manifest");
System\Security\Cryptography\NCryptNative.cs (45)
544Debug.Assert(key != null, "key != null"); 545Debug.Assert(!key.IsClosed && !key.IsInvalid, "!key.IsClosed && !key.IsInvalid"); 546Debug.Assert(data != null, "data != null"); 547Debug.Assert(decryptor != null, "decryptor != null"); 615Debug.Assert(!String.IsNullOrEmpty(hashAlgorithm), "!String.IsNullOrEmpty(hashAlgorithm)"); 637Debug.Assert(dwFlags == AsymmetricPaddingMode.Pkcs1, "dwFlags == AsymmetricPaddingMode.Pkcs1"); 657Debug.Assert(key != null, "key != null"); 658Debug.Assert(!key.IsClosed && !key.IsInvalid, "!key.IsClosed && !key.IsInvalid"); 659Debug.Assert(data != null, "data != null"); 660Debug.Assert(encryptor != null, "encryptor != null"); 700Debug.Assert(!String.IsNullOrEmpty(hashAlgorithm), "!String.IsNullOrEmpty(hashAlgorithm)"); 735Debug.Assert(dwFlags == AsymmetricPaddingMode.Pkcs1, "dwFlags == AsymmetricPaddingMode.Pkcs1"); 755Debug.Assert(key != null, "key != null"); 756Debug.Assert(!key.IsInvalid && !key.IsClosed, "!key.IsInvalid && !key.IsClosed"); 757Debug.Assert(hash != null, "hash != null"); 758Debug.Assert(signer != null, "signer != null"); 797Debug.Assert(key != null, "key != null"); 798Debug.Assert(!key.IsClosed && !key.IsInvalid, "!key.IsClosed && !key.IsInvalid"); 799Debug.Assert(hash != null, "hash != null"); 800Debug.Assert(!String.IsNullOrEmpty(hashAlgorithm), "!String.IsNullOrEmpty(hashAlgorithm)"); 820Debug.Assert(key != null, "key != null"); 821Debug.Assert(!key.IsClosed && !key.IsInvalid, "!key.IsClosed && !key.IsInvalid"); 822Debug.Assert(hash != null, "hash != null"); 823Debug.Assert(!String.IsNullOrEmpty(hashAlgorithm), "!String.IsNullOrEmpty(hashAlgorithm)"); 824Debug.Assert(saltBytes >= 0, "saltBytes >= 0"); 847Debug.Assert(key != null, "key != null"); 848Debug.Assert(!key.IsClosed && !key.IsInvalid, "!key.IsClosed && !key.IsInvalid"); 849Debug.Assert(hash != null, "hash != null"); 850Debug.Assert(signature != null, "signature != null"); 851Debug.Assert(verifier != null, "verifier != null"); 871Debug.Assert(key != null, "key != null"); 872Debug.Assert(!key.IsClosed && !key.IsInvalid, "!key.IsClosed && !key.IsInvalid"); 873Debug.Assert(hash != null, "hash != null"); 874Debug.Assert(!String.IsNullOrEmpty(hashAlgorithm), "!String.IsNullOrEmpty(hashAlgorithm)"); 875Debug.Assert(signature != null, "signature != null"); 897Debug.Assert(key != null, "key != null"); 898Debug.Assert(!key.IsClosed && !key.IsInvalid, "!key.IsClosed && !key.IsInvalid"); 899Debug.Assert(hash != null, "hash != null"); 900Debug.Assert(!String.IsNullOrEmpty(hashAlgorithm), "!String.IsNullOrEmpty(hashAlgorithm)"); 901Debug.Assert(signature != null, "signature != null"); 1282Debug.Assert(bufferSize > 0, "bufferSize > 0"); 1431System.Diagnostics.Debug.Assert(cbResult == sizeof(int), "Expected cbResult=4, got " + cbResult); 1791Debug.Assert(signatureSize > 0, "signatureSize > 0"); 1875Debug.Assert(parameterSize > 0, "parameterSize > 0"); 1876Debug.Assert(blob.Length >= 2 * sizeof(int) + 2 * parameterSize, "blob.Length >= 2 * sizeof(int) + 2 * parameterSize");
System\Security\Cryptography\Rfc4050KeyFormatter.cs (1)
146Debug.Assert(isDHKey || isDsaKey);
System\Security\Cryptography\RsaCng.cs (7)
111Debug.Assert(value != null, "value != null"); 163Debug.Assert(data != null); 164Debug.Assert(offset >= 0 && offset <= data.Length); 165Debug.Assert(count >= 0 && count <= data.Length); 166Debug.Assert(!String.IsNullOrEmpty(hashAlgorithm.Name)); 178Debug.Assert(data != null); 179Debug.Assert(!String.IsNullOrEmpty(hashAlgorithm.Name));
System\Security\Cryptography\StrongNameSignatureInformation.cs (2)
25Debug.Assert(publicKey != null, "publicKey != null"); 32Debug.Assert(error != SignatureVerificationResult.Valid, "error != SignatureVerificationResult.Valid");
System\Security\Cryptography\X509Certificates\AuthenticodeSignatureInformation.cs (2)
65Debug.Assert(error != SignatureVerificationResult.Valid); 114Debug.Assert(SignatureChain.ChainElements.Count > 0, "SignatureChain.ChainElements.Count > 0");
System\Security\Cryptography\X509Certificates\ECDsaCertificateExtensions.cs (9)
184Debug.Assert(newCert != null); 185Debug.Assert(!ReferenceEquals(certificate, newCert)); 186Debug.Assert(!certificate.HasPrivateKey); 187Debug.Assert(newCert.HasPrivateKey); 241Debug.Fail($"Missing match criteria for curve type {aCurve.CurveType}"); 260Debug.Assert(!cryptHandle.IsInvalid); 287Debug.Assert(ecBlob.Length >= sizeof(Interop.BCrypt.BCRYPT_ECCKEY_BLOB)); 312Debug.Assert(!cryptHandle.IsInvalid); 333Debug.Assert(!cryptHandle.IsInvalid);
System\Security\Cryptography\X509Certificates\RSACertificateExtensions.cs (4)
155Debug.Assert(newCert != null); 156Debug.Assert(!ReferenceEquals(certificate, newCert)); 157Debug.Assert(!certificate.HasPrivateKey); 158Debug.Assert(newCert.HasPrivateKey);
System\Security\Cryptography\X509Certificates\TimestampInformation.cs (1)
40Debug.Assert(error != SignatureVerificationResult.Valid, "error != SignatureVerificationResult.Valid");
System\Security\Cryptography\X509Certificates\X509Native.cs (16)
27Debug.Assert(certificateContext != null, "certificateContext != null"); 28Debug.Assert(!certificateContext.IsClosed && !certificateContext.IsInvalid, 50Debug.Assert(certificateContext != null, "certificateContext != null"); 51Debug.Assert(!certificateContext.IsClosed && !certificateContext.IsInvalid, 118Debug.Assert(certificateContext != null, "certificateContext != null"); 119Debug.Assert(!certificateContext.IsClosed && !certificateContext.IsInvalid, 151Debug.Assert(certificateContext != null, "certificateContext != null"); 152Debug.Assert(!certificateContext.IsClosed && !certificateContext.IsInvalid, 156Debug.Assert(rawProperty.Length >= Marshal.SizeOf(typeof(T)), "Property did not return expected structure"); 170Debug.Assert(certificateContext != null, "certificateContext != null"); 171Debug.Assert(!certificateContext.IsClosed && !certificateContext.IsInvalid, 186Debug.Assert(certificateContext != null, "certificateContext != null"); 187Debug.Assert(!certificateContext.IsClosed && !certificateContext.IsInvalid, 190Debug.Assert(keyHandle != null, "keyHandle != null"); 191Debug.Assert(!keyHandle.IsClosed && !keyHandle.IsInvalid, 206Debug.Assert(context != IntPtr.Zero);
System\Security\Cryptography\Xml\ManifestSignedXml.cs (15)
32Debug.Assert(manifestXml != null, "manifestXml != null"); 33Debug.Assert(manifest == ManifestKinds.Application || manifest == ManifestKinds.Deployment, "Unknown manifest kind"); 87Debug.Assert(licenseNode != null, "licenseNode != null"); 143Debug.Assert(key != null, "key != null"); 218Debug.Assert(licenseNode != null, "licenseNode != null"); 350Debug.Assert(licenseNode != null, "licenseNode != null"); 381Debug.Assert(signatureNode != null, "signatureNode != null"); 409Debug.Assert(publisherCertificate != null, "publisherCertificate != null"); 462Debug.Assert(signatureNode != null, "signatureNode != null"); 533Debug.Assert(authenticodeSignature != null, "authenticodeSignature != null"); 550Debug.Assert(licenseNode != null, "licenseNode != null"); 582Debug.Assert(signatureNode != null, "signatureNode != null"); 612Debug.Assert(signedInfo != null, "signedInfo != null"); 652Debug.Assert(signatureNode != null, "signatureNode != null"); 667Debug.Assert(Signature != null && Signature.SignedInfo != null,
system\threading\ReaderWriterLockSlim\ReaderWriterLockSlim.cs (21)
598Debug.Assert(_fIsReentrant); 599Debug.Assert(_fUpgradeThreadHoldingRead); 632Debug.Assert(_numWriteUpgradeWaiters == 0, "There can be at most one thread with the upgrade lock held."); 656Debug.Assert((_owners & WRITER_HELD) > 0); 752Debug.Assert((_owners & WRITER_HELD) > 0); 860Debug.Assert(_owners > 0, "ReleasingReaderLock: releasing lock and no read lock taken"); 864Debug.Assert(lrwc.readercount == 1); 914Debug.Assert((_owners & WRITER_HELD) > 0, "Calling ReleaseWriterLock when no write lock is held"); 1011Debug.Assert(enterLockType == EnterLockType.UpgradeToWrite); 1055Debug.Assert(enterLockType == EnterLockType.UpgradeToWrite); 1218Debug.Assert(_numReadWaiters != 0 || _numUpgradeWaiters != 0); 1568Debug.Assert( 1588Debug.Assert(DeprioritizeEnterAnyReadIncrement == (1 << 16)); 1597Debug.Assert(DeprioritizeEnterAnyWriteIncrement == 1); 1604Debug.Assert((reason & EnterSpinLockReason.Wait) != 0 || reason == (reason & EnterSpinLockReason.OperationMask)); 1605Debug.Assert( 1614Debug.Assert( 1625Debug.Assert((GetEnterDeprioritizationStateChange(reason) & DeprioritizeEnterAnyWriteIncrement) == 0); 1629Debug.Assert((GetEnterDeprioritizationStateChange(reason) & DeprioritizeEnterAnyWriteIncrement) != 0); 1690Debug.Assert( 1704Debug.Assert(_isLocked != 0, "Exiting spin lock that is not held");
System.Data (2965)
cdf\src\NetFx40\Tools\Microsoft.Tools.Common\Microsoft\Activities\Presentation\ExpressionSettingHelper.cs (2)
24Debug.Assert(modelTreeManager != null, "modelTreeManager is null."); 25Debug.Assert(targetFramework != null, "targetFramework is null.");
cdf\src\NetFx40\Tools\Microsoft.Tools.Common\Microsoft\VisualStudio\Activities\WorkflowDesignerExtensionManager.cs (3)
24Debug.Assert(logger != null, "Logger should not be null and is ensured by caller."); 167Debug.Assert(logger != null, "Logger should not be null and is ensured by caller."); 168Debug.Assert(extensionsDirectory != null, "extensionsDirectory should not be null and is ensured by caller.");
cdf\src\NetFx40\Tools\System.Activities.Presentation\System\Activities\Presentation\Annotations\AnnotationManager.cs (3)
502System.Diagnostics.Debug.WriteLine("ShowAnnotation called."); 529System.Diagnostics.Debug.WriteLine("HideAnnotation called."); 555System.Diagnostics.Debug.WriteLine("DockAnnotation called.");
cdf\src\NetFx40\Tools\System.Activities.Presentation\System\Activities\Presentation\Base\Core\Internal\PropertyEditing\CategoryList.cs (5)
326Debug.Fail("CategoryList should only be populated with CategoryEntries."); 357Debug.Fail("CategoryList expects the individual items to be CiderCategoryContainers"); 374Debug.Fail("Couldn't clean up event binding and store container state."); 1206Debug.Fail("Invalid PI state: " + stateString); 1216Debug.Fail("Invalid percentage width stored in PI state: " + percentage.ToString(CultureInfo.InvariantCulture));
cdf\src\NetFx40\Tools\System.Activities.Presentation\System\Activities\Presentation\Base\Core\Internal\PropertyEditing\CiderCategoryContainer.cs (1)
356Debug.Fail("UI for CategoryContainer changed. Need to update CiderCategoryContainer logic.");
cdf\src\NetFx40\Tools\System.Activities.Presentation\System\Activities\Presentation\Base\Core\Internal\PropertyEditing\EditModeSwitchButtonKeyboardFix.cs (2)
92Debug.Fail("EditModeSwitchButtonKeyboardFix.ApplyFix fix can only be applied to EditModeSwitchButton instances."); 146Debug.Fail(string.Format(
cdf\src\NetFx40\Tools\System.Activities.Presentation\System\Activities\Presentation\Base\Core\Internal\PropertyEditing\Editors\PropertyValueToDisplayNameConverter.cs (1)
65Debug.Fail("PropertyValueToDisplayNameConverter is being used for something other than ModelPropertyValues. Re-evaluate the correctness of its logic.");
cdf\src\NetFx40\Tools\System.Activities.Presentation\System\Activities\Presentation\Base\Core\Internal\PropertyEditing\ExtensibilityAccessor.cs (4)
348Debug.Fail("ExtensibilityAccessor.IsReadOnly: No properties specified."); 367Debug.Fail("No delegate to evaluate IsMixedValue specified."); 932Debug.Write(text); 937Debug.WriteLine(text);
cdf\src\NetFx40\Tools\System.Activities.Presentation\System\Activities\Presentation\Base\Core\Internal\PropertyEditing\FromExpression\Framework\Data\IsNullConverter.cs (1)
28Debug.Fail("IsNullConverter can only be used for BindType=OneWay");
cdf\src\NetFx40\Tools\System.Activities.Presentation\System\Activities\Presentation\Base\Core\Internal\PropertyEditing\FromExpression\Framework\PropertyInspector\CategoryContainer.xaml.cs (2)
432Debug.Fail("BasicProperties should not change in a way other than an add or a remove."); 458Debug.Fail("BasicProperties should not change in a way other than an add or a remove.");
cdf\src\NetFx40\Tools\System.Activities.Presentation\System\Activities\Presentation\Base\Core\Internal\PropertyEditing\Model\ModelCategoryEntry.cs (2)
132Debug.Fail("Invalid property bucket. The property sort order will be broken."); 169Debug.Fail("Invalid bucket specified. Property was not refreshed.");
cdf\src\NetFx40\Tools\System.Activities.Presentation\System\Activities\Presentation\Base\Core\Internal\PropertyEditing\Model\ModelPropertyValue.cs (1)
385Debug.WriteLine(e.Exception.ToString());
cdf\src\NetFx40\Tools\System.Activities.Presentation\System\Activities\Presentation\Base\Core\Internal\PropertyEditing\Model\ModelPropertyValueCollection.cs (2)
281Debug.Fail("Didn't find the expected item to remove"); 415Debug.Fail("A new class was introduced that derives from PropertyEntry. Need to update ModelPropertyValueCollection code as well.");
cdf\src\NetFx40\Tools\System.Activities.Presentation\System\Activities\Presentation\Base\Core\Internal\PropertyEditing\PropertyInspector.xaml.cs (2)
174Debug.WriteLine(e.ToString()); 187Debug.Fail("Shouldn't be able to set a selection name if no or more than one object is selected.");
cdf\src\NetFx40\Tools\System.Activities.Presentation\System\Activities\Presentation\Base\Core\Internal\PropertyEditing\PropertyToolBar.cs (2)
287Debug.Fail("This method shouldn't be called when there is no CategoryList instance to process."); 298Debug.Fail("This method shouldn't be called when there is no CategoryList instance to process.");
cdf\src\NetFx40\Tools\System.Activities.Presentation\System\Activities\Presentation\Base\Core\Internal\PropertyEditing\Selection\CategoryContainerSelectionPathInterpreter.cs (2)
58Debug.Fail("Invalid SelectionPath specified."); 64Debug.Fail("No CategoryList specified.");
cdf\src\NetFx40\Tools\System.Activities.Presentation\System\Activities\Presentation\Base\Core\Internal\PropertyEditing\Selection\CategoryEditorSelectionPathInterpreter.cs (3)
53Debug.Fail("Invalid SelectionPath specified."); 59Debug.Fail("No CategoryList specified."); 67Debug.Fail("Invalid SelectionPath specified.");
cdf\src\NetFx40\Tools\System.Activities.Presentation\System\Activities\Presentation\Base\Core\Internal\PropertyEditing\Selection\PropertySelectionPathInterpreter.cs (3)
53Debug.Fail("Invalid SelectionPath specified."); 59Debug.Fail("No CategoryList specified."); 66Debug.Fail("Invalid SelectionPath specified.");
cdf\src\NetFx40\Tools\System.Activities.Presentation\System\Activities\Presentation\Base\Core\Internal\PropertyEditing\Selection\SelectionPath.cs (1)
65Debug.Fail("Invalid SelectionPath State object");
cdf\src\NetFx40\Tools\System.Activities.Presentation\System\Activities\Presentation\Base\Core\Internal\PropertyEditing\Selection\SelectionPathResolver.cs (1)
46Debug.Fail(string.Format(System.Globalization.CultureInfo.CurrentCulture, "ISelectionPathInterpreter for path type of ID '{0}' already registered. Ignoring.", interpreter.PathTypeId));
cdf\src\NetFx40\Tools\System.Activities.Presentation\System\Activities\Presentation\Base\Core\Internal\PropertyEditing\State\AggregateStateContainer.cs (1)
45Debug.Fail("Invalid state to restore: " + (state == null ? "null" : state.ToString()));
cdf\src\NetFx40\Tools\System.Activities.Presentation\System\Activities\Presentation\Base\Core\Internal\PropertyEditing\State\PersistedStateContainer.cs (1)
79Debug.Fail("Invalid state. Deserialization failed: " + stateString);
cdf\src\NetFx40\Tools\System.Activities.Presentation\System\Activities\Presentation\Base\Core\Internal\PropertyEditing\State\PropertyViewManagerStateContainer.cs (3)
72Debug.Fail("Unknown IPropertyViewManager type: " + (propertyViewManagerTypeName ?? "null")); 151Debug.Fail("Invalid PropertyViewManager state: " + state.ToString()); 158Debug.Fail("Invalid PropertyViewManager state: " + state.ToString());
cdf\src\NetFx40\Tools\System.Activities.Presentation\System\Activities\Presentation\Base\Core\Metadata\MetadataStore.cs (1)
355Debug.Fail("Member " + member + " is not a member of type " + objectType.Name);
cdf\src\NetFx40\Tools\System.Activities.Presentation\System\Activities\Presentation\Base\Core\PropertyEditing\EditModeSwitchButton.cs (2)
104Debug.Fail(string.Format( 238Debug.Fail(string.Format(
cdf\src\NetFx40\Tools\System.Activities.Presentation\System\Activities\Presentation\Base\Core\PropertyEditing\PropertyContainer.cs (1)
761Debug.Fail(
cdf\src\NetFx40\Tools\System.Activities.Presentation\System\Activities\Presentation\DefaultCommandExtensionCallback.cs (1)
180System.Diagnostics.Debug.WriteLine(this.DisplayString);
cdf\src\NetFx40\Tools\System.Activities.Presentation\System\Activities\Presentation\DragDropHelper.cs (2)
918System.Diagnostics.Debug.WriteLine("DragShadow.ArrangeOverride " + this.content.DesiredSize); 925System.Diagnostics.Debug.WriteLine("DragShadow.MeasureOverride " + this.content.DesiredSize);
cdf\src\NetFx40\Tools\System.Activities.Presentation\System\Activities\Presentation\Hosting\WindowHelperService.cs (1)
135System.Diagnostics.Debug.WriteLine("UnregisterWindowMessageHandler - callback not in list");
cdf\src\NetFx40\Tools\System.Activities.Presentation\System\Activities\Presentation\MiniMap\MiniMapControl.xaml.cs (1)
509System.Diagnostics.Debug.WriteLine(string.Format(CultureInfo.InvariantCulture, "{0} ScrollViewer: EWidth {1}, EHeight {2}, AWidth {3}, AHeight {4}, ViewPortW {5} ViewPortH {6}", prefix, mapSource.ExtentWidth, mapSource.ExtentHeight, mapSource.ActualWidth, mapSource.ActualHeight, mapSource.ViewportWidth, mapSource.ViewportHeight));
cdf\src\NetFx40\Tools\System.Activities.Presentation\System\Activities\Presentation\Model\ModelTreeManager.cs (3)
1256Debug.Fail("Cannot find generic arguments for IDictionary<,>."); 1333Debug.Fail("ResetValue is not implemented."); 1339Debug.Fail("SetValue is not implemented.");
cdf\src\NetFx40\Tools\System.Activities.Presentation\System\Activities\Presentation\View\ArgumentDesigner.xaml.cs (1)
1395System.Diagnostics.Debug.WriteLine(err.ToString());
cdf\src\NetFx40\Tools\System.Activities.Presentation\System\Activities\Presentation\View\DataGridHelper.cs (12)
777System.Diagnostics.Debug.WriteLine("ResolveDynamicTemplateCallback not registered for column " + cell.Column.Header); 913System.Diagnostics.Debug.WriteLine(err.ToString()); 1218System.Diagnostics.Debug.WriteLine("DefaultControlBehavior.HandleControlLoaded"); 1225System.Diagnostics.Debug.WriteLine("DefaultControlBehavior.ControlUnloaded"); 1238System.Diagnostics.Debug.WriteLine("TextBoxBehavior.HandleControlLoaded"); 1259System.Diagnostics.Debug.WriteLine("TextBoxBehavior.ControlUnloaded"); 1272System.Diagnostics.Debug.WriteLine("VBIdentifierDesignerBehavior.HandleControlLoaded"); 1315System.Diagnostics.Debug.WriteLine("VBIdentifierDesignerBehavior.ControlUnloaded"); 1341System.Diagnostics.Debug.WriteLine("TypePresenterBehavior.HandleControlLoaded"); 1358System.Diagnostics.Debug.WriteLine("TypePresenterBehavior.ControlUnloaded"); 1407System.Diagnostics.Debug.WriteLine("ExpressionTextBoxBehavior.HandleControlLoaded"); 1434System.Diagnostics.Debug.WriteLine("ExpressionTextBoxBehavior.ControlUnloaded");
cdf\src\NetFx40\Tools\System.Activities.Presentation\System\Activities\Presentation\View\DesignerView.Commands.cs (2)
522System.Diagnostics.Debug.WriteLine(string.Format(CultureInfo.InvariantCulture, "{0} DesignerView.OnWorkflowViewContextMenuLoaded()", DateTime.Now.ToLocalTime())); 1393System.Diagnostics.Debug.WriteLine(target.GetType().Name + " " + target.GetHashCode());
cdf\src\NetFx40\Tools\System.Activities.Presentation\System\Activities\Presentation\View\DesignerView.xaml.cs (3)
651System.Diagnostics.Debug.WriteLine( 1646System.Diagnostics.Debug.WriteLine(e.ToString()); 1677System.Diagnostics.Debug.WriteLine(e.ToString());
cdf\src\NetFx40\Tools\System.Activities.Presentation\System\Activities\Presentation\View\ExtensionSurface.cs (3)
363System.Diagnostics.Debug.WriteLine("SetSize oldSize (" + window.Width + "," + window.Height + ") newSize (" + size.Width + "," + size.Height + ")"); 383System.Diagnostics.Debug.WriteLine(string.Format(CultureInfo.InvariantCulture, "ArrangeOverride Size({0},{1})", arrangeSize.Width, arrangeSize.Height)); 438System.Diagnostics.Debug.WriteLine("MO constraint:" + constraint.Width + "," + constraint.Height + " new: " + result.Width + "," + result.Height);
cdf\src\NetFx40\Tools\System.Activities.Presentation\System\Activities\Presentation\View\ExtensionWindowResizeGrip.cs (1)
62System.Diagnostics.Debug.WriteLine("NewSize = (" + newSize.Width + "," + newSize.Height + ")");
cdf\src\NetFx40\Tools\System.Activities.Presentation\System\Activities\Presentation\View\VisualBasicEditor.xaml.cs (1)
578Debug.Fail("Unable to find editor with the following editor name: " + this.editorName, ex.Message);
cdf\src\NetFx40\Tools\System.Activities.Presentation\System\Activities\Presentation\WorkflowViewElement.cs (8)
346System.Diagnostics.Debug.WriteLine(string.Format( 449System.Diagnostics.Debug.WriteLine(string.Format( 481System.Diagnostics.Debug.WriteLine(string.Format( 499System.Diagnostics.Debug.WriteLine(string.Format( 545System.Diagnostics.Debug.WriteLine( 640System.Diagnostics.Debug.WriteLine( 648System.Diagnostics.Debug.WriteLine( 811System.Diagnostics.Debug.WriteLine(
fx\src\data\Microsoft\SqlServer\Server\MemoryRecordBuffer.cs (2)
22Debug.Assert(null != metaData, "invalid attempt to instantiate MemoryRecordBuffer with null SmiMetaData[]"); 166Debug.Assert(offset == 0 && length <= value.Length, "Invalid string length or offset"); // for sqlvariant, length could be less than value.Length
fx\src\data\Microsoft\SqlServer\Server\MetadataUtilsSmi.cs (4)
437Debug.Assert( typeCode >= ExtendedClrTypeCode.Invalid && typeCode <= ExtendedClrTypeCode.Last, "Someone added a typecode without adding support here!" ); 476Debug.Assert(SmiContextFactory.YukonVersion == smiVersion, "Other versions should have been eliminated during link stage"); 649Debug.Assert(null != parent); 685Debug.Assert(null != parent);
fx\src\data\Microsoft\SqlServer\Server\SmiContextFactory.cs (3)
45Debug.Assert(false, "could not get InProcLink type"); 54Debug.Assert(false, "could not get InProcLink.Instance"); 119Debug.Assert(typeof(SmiContext).IsInstanceOfType(result), "didn't get SmiContext from GetCurrentContext?");
fx\src\data\Microsoft\SqlServer\Server\SmiEventSink_Default.cs (2)
92Debug.Assert( 0 != _errors.Count, "empty error collection?" ); // must be something in the collection 122Debug.Assert( null == _warnings || 0 != _warnings.Count, "empty warning collection?" );// must be something in the collection
fx\src\data\Microsoft\SqlServer\Server\SmiGettersStream.cs (4)
25Debug.Assert( null != sink ); 26Debug.Assert( null != getters ); 27Debug.Assert( 0 <= ordinal ); 28Debug.Assert( null != metaData );
fx\src\data\Microsoft\SqlServer\Server\SmiMetaData.cs (22)
272Debug.Assert( null == columns, "Row types not supported" ); 337Debug.Assert( IsSupportedDbType(dbType), "Invalid SqlDbType: " + dbType ); 382Debug.Assert( MinPrecision <= precision && SqlDecimal.MaxPrecision >= precision, "Invalid precision: " + precision ); 383Debug.Assert( MinScale <= scale && SqlDecimal.MaxScale >= scale, "Invalid scale: " + scale ); 384Debug.Assert( scale <= precision, "Precision: " + precision + " greater than scale: " + scale ); 392Debug.Assert((null != userDefinedType) || (0 <= maxLength || UnlimitedMaxLengthIndicator == maxLength), 412Debug.Assert(MinScale <= scale && scale <= MaxTimeScale, "Invalid time scale: " + scale); 417Debug.Assert(MinScale <= scale && scale <= MaxTimeScale, "Invalid time scale: " + scale); 422Debug.Assert(MinScale <= scale && scale <= MaxTimeScale, "Invalid time scale: " + scale); 427Debug.Assert( false, "How in the world did we get here? :" + dbType ); 440Debug.Assert(null != _extendedProperties && _extendedProperties.IsReadOnly, "SmiMetaData.ctor: _extendedProperties is " + (null!=_extendedProperties?"writeable":"null")); 441Debug.Assert(null != _fieldMetaData && _fieldMetaData.IsReadOnly, "SmiMetaData.ctor: _fieldMetaData is " + (null!=_fieldMetaData?"writeable":"null")); 498Debug.Assert( false, "How in the world did we get here? :" + dbType ); 572Debug.Assert(String.Empty == __typeNameByDatabaseType[(int)_databaseType], "unexpected udt?"); 577Debug.Assert(null != result, "unknown type name?"); 625Debug.Assert( IsSupportedDbType(dbType), "Unsupported SqlDbtype: " + dbType); 840Debug.Assert( null == columns, "Row types not supported" ); 933Debug.Assert(null == name || MaxNameLength >= name.Length, "Name is too long"); 1021Debug.Assert( null == columns, "Row types not supported" ); 1124Debug.Assert( ParameterDirection.Input == direction 1212Debug.Assert( null == columns, "Row types not supported" ); 1502Debug.Assert( null == columns, "Row types not supported" );
fx\src\data\Microsoft\SqlServer\Server\SmiMetaDataProperty.cs (3)
120Debug.Assert(0 == _columns.Count || countToMatch == _columns.Count, 181Debug.Assert(0 == _columns.Count || countToMatch == _columns.Count, 234Debug.Assert(0 == _defaults.Count || countToMatch == _defaults.Count,
fx\src\data\Microsoft\SqlServer\Server\SmiSettersStream.cs (4)
25Debug.Assert( null != sink ); 26Debug.Assert( null != setters ); 27Debug.Assert( 0 <= ordinal ); 28Debug.Assert( null != metaData );
fx\src\data\Microsoft\SqlServer\Server\SmiXetterAccessMap.cs (2)
106Debug.Assert( SmiXetterTypeCode.XetBoolean <= xetterType && SmiXetterTypeCode.XetDateTimeOffset >= xetterType ); 113Debug.Assert(SmiXetterTypeCode.XetBoolean <= xetterType && SmiXetterTypeCode.XetDateTimeOffset >= xetterType &&
fx\src\data\Microsoft\SqlServer\Server\sqlcontext.cs (1)
95Debug.Assert( null == _pipe || _smiContext.HasContextPipe, "Caching logic error for contained pipe!" );
fx\src\data\Microsoft\SqlServer\Server\SqlDataRecord.cs (2)
614Debug.Assert(null != recordBuffer, "invalid attempt to instantiate SqlDataRecord with null SmiRecordBuffer"); 615Debug.Assert(null != metaData, "invalid attempt to instantiate SqlDataRecord with null SmiExtendedMetaData[]");
fx\src\data\Microsoft\SqlServer\Server\sqlpipe.cs (6)
113Debug.Assert(_eventSink.HasMessages == false, "There should be no messages left in _eventsink at the end of the Send message!"); 163Debug.Assert(_eventSink.HasMessages == false, "There should be no messages left in _eventsink at the end of the Send reader!"); 213Debug.Assert(_eventSink.HasMessages == false, "There should be no messages left in _eventsink at the end of the Send record!"); 245Debug.Assert(_eventSink.HasMessages == false, "There should be no messages left in _eventsink at the end of the SendResultsStart!"); 290Debug.Assert(_eventSink.HasMessages == false, "There should be no messages left in _eventsink at the end of the SendResultsRow!"); 315Debug.Assert(_eventSink.HasMessages == false, "There should be no messages left in _eventsink at the end of the SendResultsEnd!");
fx\src\data\Microsoft\SqlServer\Server\SqlRecordBuffer.cs (50)
73Debug.Assert(!_isNull, "Null data type"); 74Debug.Assert(StorageType.Boolean == _type, "Wrong storage type: " + _type); 87Debug.Assert(!_isNull, "Null data type"); 88Debug.Assert(StorageType.Byte == _type, "Wrong storage type: " + _type); 101Debug.Assert(!_isNull, "Null data type"); 102Debug.Assert(StorageType.DateTime == _type, "Wrong storage type: " + _type); 122Debug.Assert(!_isNull, "Null data type"); 123Debug.Assert(StorageType.DateTimeOffset == _type, "Wrong storage type: " + _type); 136Debug.Assert(!_isNull, "Null data type"); 137Debug.Assert(StorageType.Double == _type, "Wrong storage type: " + _type); 150Debug.Assert(!_isNull, "Null data type"); 151Debug.Assert(StorageType.Guid == _type, "Wrong storage type: " + _type); 164Debug.Assert(!_isNull, "Null data type"); 165Debug.Assert(StorageType.Int16 == _type, "Wrong storage type: " + _type); 178Debug.Assert(!_isNull, "Null data type"); 179Debug.Assert(StorageType.Int32 == _type, "Wrong storage type: " + _type); 192Debug.Assert(!_isNull, "Null data type"); 193Debug.Assert(StorageType.Int64 == _type, "Wrong storage type: " + _type); 211Debug.Assert(!_isNull, "Null data type"); 212Debug.Assert(StorageType.Single == _type, "Wrong storage type: " + _type); 225Debug.Assert(!_isNull, "Null data type"); 234Debug.Assert(StorageType.ByteArray == _type, "Wrong storage type: " + _type); 240Debug.Assert(null != value, ""); 256Debug.Assert(!_isNull, "Null data type"); 257Debug.Assert(StorageType.SqlDecimal == _type, "Wrong storage type: " + _type); 262Debug.Assert(!value.IsNull, "Null input"); 272Debug.Assert(!_isNull, "Null data type"); 273Debug.Assert(StorageType.TimeSpan == _type, "Wrong storage type: " + _type); 286Debug.Assert(!_isNull, "Null data type"); 293Debug.Assert(StorageType.ByteArray == _type, "Wrong storage type: " + _type); 305Debug.Assert(!_isNull, "Null data type"); 306Debug.Assert(StorageType.ByteArray == _type, "Wrong storage type: " + _type); 307Debug.Assert(value > 0 && value <= ((byte[])_object).Length, "Invalid BytesLength"); 316Debug.Assert(!_isNull, "Null data type"); 317Debug.Assert(StorageType.CharArray == _type || StorageType.String == _type, "Wrong storage type: " + _type); 328Debug.Assert(!_isNull, "Null data type"); 329Debug.Assert(StorageType.CharArray == _type || StorageType.String == _type, "Wrong storage type: " + _type); 330Debug.Assert(value > 0 && 341Debug.Assert(!_isNull, "Null data type"); 342Debug.Assert(_metadata == null 370Debug.Assert(value != null && (value.SqlDbType == SqlDbType.Money || value.SqlDbType == SqlDbType.NVarChar), 381Debug.Assert(!_isNull, "Null data type"); 387Debug.Assert(StorageType.ByteArray == _type, "Wrong storage type: " + _type); 389Debug.Assert (null != buffer, "Null buffer"); 390Debug.Assert(ndataIndex + length <= BytesLength, "Invalid fieldOffset or length"); 400Debug.Assert(!_isNull, "Null data type"); 401Debug.Assert(StorageType.CharArray == _type || StorageType.String == _type, "Wrong storage type: " + _type); 402Debug.Assert (null != buffer, "Null buffer"); 403Debug.Assert(ndataIndex + length <= CharsLength, "Invalid fieldOffset or length"); 489Debug.Assert(StorageType.String == _type, "ConvertXmlStringToByteArray: Invalid storage type for conversion: " + _type.ToString());
fx\src\data\Microsoft\SqlServer\Server\ValueUtilsSmi.cs (179)
151Debug.Assert( length >= 0, "Invalid CheckXetParameters return length!" ); 169Debug.Assert( length >= 0, "Buffer.Length was invalid!" ); 696Debug.Assert( !ValueUtilsSmi.IsDBNull_Unchecked( sink, getters, ordinal ), "Should not try to get a SqlSequentialStreamSmi on a null column" ); 708Debug.Assert(!ValueUtilsSmi.IsDBNull_Unchecked(sink, getters, ordinal), "Should not try to get a SqlSequentialTextReaderSmi on a null column"); 811Debug.Assert(SqlDbType.Variant != metaData.SqlDbType, "Variant-within-variant causes endless recursion!"); 919Debug.Assert( SqlDbType.Variant != metaData.SqlDbType, "Variant-within-variant causes endless recursion!" ); 954Debug.Assert(SqlDbType.Variant != metaData.SqlDbType, "Variant-within-variant causes endless recursion!"); 1067Debug.Assert( SqlDbType.Variant != metaData.SqlDbType, "Variant-within-variant causes endless recursion!" ); 1123Debug.Assert(t != null, "Unexpected null of Udt type on NullUdtInstance!"); 1129Debug.Assert(index >= 0 && index < __dbTypeToStorageType.Length, string.Format(CultureInfo.InvariantCulture, "Unexpected dbType value: {0}", dbType)); 1229Debug.Assert( SqlDbType.Variant != metaData.SqlDbType, "Variant-within-variant not supposed to be possible!" ); 1239Debug.Assert( false, "Unexpected SqlDbType" ); 1268Debug.Assert( SqlDbType.Variant != metaData.SqlDbType, "Variant-within-variant not supposed to be possible!" ); 1355Debug.Assert( length >= 0, "Buffer.Length was invalid!" ); 1390Debug.Assert( length >= 0, "Buffer.Length was invalid!" ); 1578Debug.Assert( typeCode == ExtendedClrTypeCode.Invalid || 1636Debug.Assert( false, "Unvalidated extendedtypecode: " + typeCode ); 1657Debug.Assert((ExtendedClrTypeCode.DataTable != typeCode && 1692Debug.Assert( (ExtendedClrTypeCode.DataTable != typeCode && 1729Debug.Assert( CanAccessSetterDirectly( metaData[i], ExtendedClrTypeCode.Int64 ) ); 1733Debug.Assert( CanAccessSetterDirectly( metaData[i], ExtendedClrTypeCode.SqlBytes ) ); 1737Debug.Assert( CanAccessSetterDirectly( metaData[i], ExtendedClrTypeCode.Boolean ) ); 1741Debug.Assert( CanAccessSetterDirectly( metaData[i], ExtendedClrTypeCode.SqlChars ) ); 1745Debug.Assert( CanAccessSetterDirectly( metaData[i], ExtendedClrTypeCode.DateTime ) ); 1749Debug.Assert( CanAccessSetterDirectly( metaData[i], ExtendedClrTypeCode.SqlDecimal ) ); 1753Debug.Assert( CanAccessSetterDirectly( metaData[i], ExtendedClrTypeCode.Double ) ); 1757Debug.Assert( CanAccessSetterDirectly( metaData[i], ExtendedClrTypeCode.SqlBytes ) ); 1761Debug.Assert( CanAccessSetterDirectly( metaData[i], ExtendedClrTypeCode.Int32 ) ); 1765Debug.Assert( CanAccessSetterDirectly( metaData[i], ExtendedClrTypeCode.SqlMoney ) ); 1771Debug.Assert( CanAccessSetterDirectly( metaData[i], ExtendedClrTypeCode.SqlChars ) ); 1775Debug.Assert( CanAccessSetterDirectly( metaData[i], ExtendedClrTypeCode.Single ) ); 1779Debug.Assert( CanAccessSetterDirectly( metaData[i], ExtendedClrTypeCode.Guid ) ); 1783Debug.Assert( CanAccessSetterDirectly( metaData[i], ExtendedClrTypeCode.DateTime ) ); 1787Debug.Assert( CanAccessSetterDirectly( metaData[i], ExtendedClrTypeCode.Int16 ) ); 1791Debug.Assert( CanAccessSetterDirectly( metaData[i], ExtendedClrTypeCode.SqlMoney ) ); 1795Debug.Assert( CanAccessSetterDirectly( metaData[i], ExtendedClrTypeCode.SqlChars ) ); 1799Debug.Assert( CanAccessSetterDirectly( metaData[i], ExtendedClrTypeCode.SqlBytes ) ); 1803Debug.Assert( CanAccessSetterDirectly( metaData[i], ExtendedClrTypeCode.Byte ) ); 1807Debug.Assert( CanAccessSetterDirectly( metaData[i], ExtendedClrTypeCode.SqlBytes ) ); 1811Debug.Assert( CanAccessSetterDirectly( metaData[i], ExtendedClrTypeCode.String ) ); 1815Debug.Assert( CanAccessSetterDirectly( metaData[i], ExtendedClrTypeCode.SqlXml ) ); 1825Debug.Assert( CanAccessSetterDirectly( metaData[i], ExtendedClrTypeCode.SqlBytes ) ); 1835Debug.Assert( false, "unsupported DbType:" + metaData[i].SqlDbType.ToString() ); 1855Debug.Assert(CanAccessSetterDirectly(metaData[i], ExtendedClrTypeCode.Int64)); 1859Debug.Assert(CanAccessSetterDirectly(metaData[i], ExtendedClrTypeCode.ByteArray)); 1863Debug.Assert(CanAccessSetterDirectly(metaData[i], ExtendedClrTypeCode.Boolean)); 1867Debug.Assert(CanAccessSetterDirectly(metaData[i], ExtendedClrTypeCode.CharArray)); 1871Debug.Assert(CanAccessSetterDirectly(metaData[i], ExtendedClrTypeCode.DateTime)); 1875Debug.Assert(CanAccessSetterDirectly(metaData[i], ExtendedClrTypeCode.SqlDecimal)); 1887Debug.Assert(CanAccessSetterDirectly(metaData[i], ExtendedClrTypeCode.Double)); 1891Debug.Assert(CanAccessSetterDirectly(metaData[i], ExtendedClrTypeCode.ByteArray)); 1895Debug.Assert(CanAccessSetterDirectly(metaData[i], ExtendedClrTypeCode.Int32)); 1899Debug.Assert(CanAccessSetterDirectly(metaData[i], ExtendedClrTypeCode.SqlMoney)); 1905Debug.Assert(CanAccessSetterDirectly(metaData[i], ExtendedClrTypeCode.CharArray)); 1909Debug.Assert(CanAccessSetterDirectly(metaData[i], ExtendedClrTypeCode.Single)); 1913Debug.Assert(CanAccessSetterDirectly(metaData[i], ExtendedClrTypeCode.Guid)); 1917Debug.Assert(CanAccessSetterDirectly(metaData[i], ExtendedClrTypeCode.DateTime)); 1921Debug.Assert(CanAccessSetterDirectly(metaData[i], ExtendedClrTypeCode.Int16)); 1925Debug.Assert(CanAccessSetterDirectly(metaData[i], ExtendedClrTypeCode.SqlMoney)); 1929Debug.Assert(CanAccessSetterDirectly(metaData[i], ExtendedClrTypeCode.CharArray)); 1933Debug.Assert(CanAccessSetterDirectly(metaData[i], ExtendedClrTypeCode.ByteArray)); 1937Debug.Assert(CanAccessSetterDirectly(metaData[i], ExtendedClrTypeCode.Byte)); 1941Debug.Assert(CanAccessSetterDirectly(metaData[i], ExtendedClrTypeCode.ByteArray)); 1945Debug.Assert(CanAccessSetterDirectly(metaData[i], ExtendedClrTypeCode.String)); 1949Debug.Assert(CanAccessSetterDirectly(metaData[i], ExtendedClrTypeCode.SqlXml)); 1984Debug.Assert(CanAccessSetterDirectly(metaData[i], ExtendedClrTypeCode.ByteArray)); 1993Debug.Assert(CanAccessSetterDirectly(metaData[i], ExtendedClrTypeCode.DateTime)); 1997Debug.Assert(CanAccessSetterDirectly(metaData[i], ExtendedClrTypeCode.TimeSpan)); 2009Debug.Assert(CanAccessSetterDirectly(metaData[i], ExtendedClrTypeCode.DateTimeOffset)); 2027Debug.Assert(false, "unsupported DbType:" + metaData[i].SqlDbType.ToString()); 2049Debug.Assert( CanAccessSetterDirectly( metaData[i], ExtendedClrTypeCode.Int64 ) ); 2053Debug.Assert( CanAccessSetterDirectly( metaData[i], ExtendedClrTypeCode.SqlBytes ) ); 2057Debug.Assert( CanAccessSetterDirectly( metaData[i], ExtendedClrTypeCode.Boolean ) ); 2061Debug.Assert( CanAccessSetterDirectly( metaData[i], ExtendedClrTypeCode.SqlChars ) ); 2065Debug.Assert( CanAccessSetterDirectly( metaData[i], ExtendedClrTypeCode.DateTime ) ); 2069Debug.Assert( CanAccessSetterDirectly( metaData[i], ExtendedClrTypeCode.SqlDecimal ) ); 2073Debug.Assert( CanAccessSetterDirectly( metaData[i], ExtendedClrTypeCode.Double ) ); 2077Debug.Assert( CanAccessSetterDirectly( metaData[i], ExtendedClrTypeCode.SqlBytes ) ); 2081Debug.Assert( CanAccessSetterDirectly( metaData[i], ExtendedClrTypeCode.Int32 ) ); 2085Debug.Assert( CanAccessSetterDirectly( metaData[i], ExtendedClrTypeCode.SqlMoney ) ); 2091Debug.Assert( CanAccessSetterDirectly( metaData[i], ExtendedClrTypeCode.SqlChars ) ); 2095Debug.Assert( CanAccessSetterDirectly( metaData[i], ExtendedClrTypeCode.Single ) ); 2099Debug.Assert( CanAccessSetterDirectly( metaData[i], ExtendedClrTypeCode.Guid ) ); 2103Debug.Assert( CanAccessSetterDirectly( metaData[i], ExtendedClrTypeCode.DateTime ) ); 2107Debug.Assert( CanAccessSetterDirectly( metaData[i], ExtendedClrTypeCode.Int16 ) ); 2111Debug.Assert( CanAccessSetterDirectly( metaData[i], ExtendedClrTypeCode.SqlMoney ) ); 2115Debug.Assert( CanAccessSetterDirectly( metaData[i], ExtendedClrTypeCode.SqlChars ) ); 2119Debug.Assert( CanAccessSetterDirectly( metaData[i], ExtendedClrTypeCode.SqlBytes ) ); 2123Debug.Assert( CanAccessSetterDirectly( metaData[i], ExtendedClrTypeCode.Byte ) ); 2127Debug.Assert( CanAccessSetterDirectly( metaData[i], ExtendedClrTypeCode.SqlBytes ) ); 2131Debug.Assert( CanAccessSetterDirectly( metaData[i], ExtendedClrTypeCode.String ) ); 2135Debug.Assert( CanAccessSetterDirectly( metaData[i], ExtendedClrTypeCode.SqlXml ) ); 2144Debug.Assert( CanAccessSetterDirectly( metaData[i], ExtendedClrTypeCode.SqlBytes ) ); 2148Debug.Assert( false, "unsupported DbType:" + metaData[i].SqlDbType.ToString() ); 2172Debug.Assert(CanAccessSetterDirectly(metaData[i], ExtendedClrTypeCode.Int64)); 2176Debug.Assert(CanAccessSetterDirectly(metaData[i], ExtendedClrTypeCode.SqlBytes)); 2180Debug.Assert(CanAccessSetterDirectly(metaData[i], ExtendedClrTypeCode.Boolean)); 2184Debug.Assert(CanAccessSetterDirectly(metaData[i], ExtendedClrTypeCode.SqlChars)); 2188Debug.Assert(CanAccessSetterDirectly(metaData[i], ExtendedClrTypeCode.DateTime)); 2192Debug.Assert(CanAccessSetterDirectly(metaData[i], ExtendedClrTypeCode.SqlDecimal)); 2196Debug.Assert(CanAccessSetterDirectly(metaData[i], ExtendedClrTypeCode.Double)); 2200Debug.Assert(CanAccessSetterDirectly(metaData[i], ExtendedClrTypeCode.SqlBytes)); 2204Debug.Assert(CanAccessSetterDirectly(metaData[i], ExtendedClrTypeCode.Int32)); 2208Debug.Assert(CanAccessSetterDirectly(metaData[i], ExtendedClrTypeCode.SqlMoney)); 2214Debug.Assert(CanAccessSetterDirectly(metaData[i], ExtendedClrTypeCode.SqlChars)); 2218Debug.Assert(CanAccessSetterDirectly(metaData[i], ExtendedClrTypeCode.Single)); 2222Debug.Assert(CanAccessSetterDirectly(metaData[i], ExtendedClrTypeCode.Guid)); 2226Debug.Assert(CanAccessSetterDirectly(metaData[i], ExtendedClrTypeCode.DateTime)); 2230Debug.Assert(CanAccessSetterDirectly(metaData[i], ExtendedClrTypeCode.Int16)); 2234Debug.Assert(CanAccessSetterDirectly(metaData[i], ExtendedClrTypeCode.SqlMoney)); 2238Debug.Assert(CanAccessSetterDirectly(metaData[i], ExtendedClrTypeCode.SqlChars)); 2242Debug.Assert(CanAccessSetterDirectly(metaData[i], ExtendedClrTypeCode.SqlBytes)); 2246Debug.Assert(CanAccessSetterDirectly(metaData[i], ExtendedClrTypeCode.Byte)); 2250Debug.Assert(CanAccessSetterDirectly(metaData[i], ExtendedClrTypeCode.SqlBytes)); 2254Debug.Assert(CanAccessSetterDirectly(metaData[i], ExtendedClrTypeCode.String)); 2258Debug.Assert(CanAccessSetterDirectly(metaData[i], ExtendedClrTypeCode.SqlXml)); 2267Debug.Assert(CanAccessSetterDirectly(metaData[i], ExtendedClrTypeCode.SqlBytes)); 2272Debug.Assert(CanAccessSetterDirectly(metaData[i], ExtendedClrTypeCode.DateTime)); 2277Debug.Assert(CanAccessSetterDirectly(metaData[i], ExtendedClrTypeCode.TimeSpan)); 2293Debug.Assert(CanAccessSetterDirectly(metaData[i], ExtendedClrTypeCode.DateTimeOffset)); 2309Debug.Assert(false, "unsupported DbType:" + metaData[i].SqlDbType.ToString()); 2381Debug.Assert(t != null, "Unexpected null of udtType on GetUdt_LengthChecked!"); 2383Debug.Assert(result != null); 2398Debug.Assert( SqlDbType.Money == metaData.SqlDbType || 2410Debug.Assert( SqlDbType.Money == metaData.SqlDbType || 2475Debug.Assert( length >= 0, "buffer.Length was invalid!" ); 2481Debug.Assert( length >= 0, "buffer.Length was invalid!" ); 2489Debug.Assert( length >= 0, "value.Length was invalid!" ); 2705Debug.Assert( length >= 0, "value.Length was invalid!" ); 2712Debug.Assert( length >= 0, "value.Length was invalid!" ); 2745Debug.Assert( ExtendedClrTypeCode.First == 0 && (int)ExtendedClrTypeCode.Last == __canAccessGetterDirectly.GetLength(0) - 1, "ExtendedClrTypeCodes does not match with __canAccessGetterDirectly" ); 2746Debug.Assert( SqlDbType.BigInt == 0 && (int)SqlDbType.DateTimeOffset == __canAccessGetterDirectly.GetLength(1) - 1, "SqlDbType does not match with __canAccessGetterDirectly" ); 2747Debug.Assert( ExtendedClrTypeCode.First <= setterTypeCode && ExtendedClrTypeCode.Last >= setterTypeCode ); 2748Debug.Assert( SqlDbType.BigInt <= metaData.SqlDbType && SqlDbType.DateTimeOffset >= metaData.SqlDbType ); 2765Debug.Assert( ExtendedClrTypeCode.First == 0 && (int)ExtendedClrTypeCode.Last == __canAccessSetterDirectly.GetLength(0) - 1, "ExtendedClrTypeCodes does not match with __canAccessSetterDirectly" ); 2766Debug.Assert( SqlDbType.BigInt == 0 && (int)SqlDbType.DateTimeOffset == __canAccessSetterDirectly.GetLength(1) - 1, "SqlDbType does not match with __canAccessSetterDirectly" ); 2767Debug.Assert( ExtendedClrTypeCode.First <= setterTypeCode && ExtendedClrTypeCode.Last >= setterTypeCode ); 2768Debug.Assert( SqlDbType.BigInt <= metaData.SqlDbType && SqlDbType.DateTimeOffset >= metaData.SqlDbType ); 2849Debug.Assert( 0 > maxLength || 0 > actualLength || 2855Debug.Assert(length >= 0, "result < 0, actualLength/fieldOffset problem?"); 2859Debug.Assert(length >= 0, "Result < 0, maxlen/fieldoffset problem?"); 2996Debug.Assert( !IsDBNull_Unchecked( sink, getters, ordinal ) ); 3004Debug.Assert( !IsDBNull_Unchecked( sink, getters, ordinal ) ); 3012Debug.Assert( !IsDBNull_Unchecked( sink, getters, ordinal ) ); 3025Debug.Assert( !IsDBNull_Unchecked( sink, getters, ordinal ) ); 3026Debug.Assert(ordinal >= 0, string.Format("Invalid ordinal: {0}", ordinal)); 3027Debug.Assert(sink != null, "Null SmiEventSink"); 3028Debug.Assert(getters != null, "Null getters"); 3029Debug.Assert(fieldOffset >= 0, string.Format("Invalid field offset: {0}", fieldOffset)); 3030Debug.Assert(buffer != null, "Null buffer"); 3031Debug.Assert(bufferOffset >= 0 && length >= 0 && bufferOffset + length <= buffer.Length, string.Format("Bad offset or length. bufferOffset: {0}, length: {1}, buffer.Length{2}", bufferOffset, length, buffer.Length)); 3039Debug.Assert( !IsDBNull_Unchecked( sink, getters, ordinal ) ); 3048Debug.Assert( !IsDBNull_Unchecked( sink, getters, ordinal ) ); 3061Debug.Assert( !IsDBNull_Unchecked( sink, getters, ordinal ) ); 3062Debug.Assert(ordinal >= 0, string.Format("Invalid ordinal: {0}", ordinal)); 3063Debug.Assert(sink != null, "Null SmiEventSink"); 3064Debug.Assert(getters != null, "Null getters"); 3065Debug.Assert(fieldOffset >= 0, string.Format("Invalid field offset: {0}", fieldOffset)); 3066Debug.Assert(buffer != null, "Null buffer"); 3067Debug.Assert(bufferOffset >= 0 && length >= 0 && bufferOffset + length <= buffer.Length, string.Format("Bad offset or length. bufferOffset: {0}, length: {1}, buffer.Length{2}", bufferOffset, length, buffer.Length)); 3075Debug.Assert( !IsDBNull_Unchecked( sink, getters, ordinal ) ); 3083Debug.Assert( !IsDBNull_Unchecked( sink, getters, ordinal ) ); 3091Debug.Assert(!IsDBNull_Unchecked(sink, getters, ordinal)); 3099Debug.Assert( !IsDBNull_Unchecked( sink, getters, ordinal ) ); 3107Debug.Assert( !IsDBNull_Unchecked( sink, getters, ordinal ) ); 3115Debug.Assert( !IsDBNull_Unchecked( sink, getters, ordinal ) ); 3123Debug.Assert( !IsDBNull_Unchecked( sink, getters, ordinal ) ); 3131Debug.Assert( !IsDBNull_Unchecked( sink, getters, ordinal ) ); 3139Debug.Assert( !IsDBNull_Unchecked( sink, getters, ordinal ) ); 3147Debug.Assert( !IsDBNull_Unchecked( sink, getters, ordinal ) ); 3154Debug.Assert( !IsDBNull_Unchecked( sink, getters, ordinal ) ); 3162Debug.Assert( !IsDBNull_Unchecked( sink, getters, ordinal ) ); 3170Debug.Assert( !IsDBNull_Unchecked( sink, getters, ordinal ) ); 3189Debug.Assert( !IsDBNull_Unchecked( sink, getters, ordinal ) ); 3201Debug.Assert(!IsDBNull_Unchecked(sink, getters, ordinal)); 3233Debug.Assert(readSize >= 0); 3262Debug.Assert(readSize >= 0); 3323Debug.Assert(SqlDbType.Variant == metaData.SqlDbType, "Invalid type. This should be called only when the type is variant."); 3331Debug.Assert(SqlDbType.Variant == metaData.SqlDbType, "Invalid type. This should be called only when the type is variant.");
fx\src\data\System\Data\Common\AdapterUtil.cs (10)
102Debug.Assert(null != e, "TraceException: null Exception"); 112Debug.Assert(ADP.IsCatchableExceptionType(e), "Invalid exception type, should have been re-thrown!"); 116Debug.Assert(ADP.IsCatchableExceptionType(e), "Invalid exception type, should have been re-thrown!"); 377Debug.Assert(e != null, "Unexpected null exception!"); 396Debug.Assert(e != null, "Unexpected null exception!"); 1596Debug.Assert(null != value, "null value on conversion failure"); 1597Debug.Assert(null != inner, "null inner on conversion failure"); 2346Debug.Assert(0 == (rowStates & dataRow.RowState), "flagged RowState"); 2368Debug.Assert(0 == (rowStates & dataRow.RowState), "flagged RowState"); 2449Debug.Assert(8 == ADP.PtrSize, "8 != IntPtr.Size"); // MDAC 73747
fx\src\data\System\Data\Common\BigIntegerStorage.cs (3)
44System.Diagnostics.Debug.Assert(0 <= recordNo, "Invalid record"); 45System.Diagnostics.Debug.Assert(null != value, "null value"); 117System.Diagnostics.Debug.Assert(null != value, "null value");
fx\src\data\System\Data\Common\BooleanStorage.cs (3)
89System.Diagnostics.Debug.Assert(0 <= recordNo, "Invalid record"); 90System.Diagnostics.Debug.Assert(null != value, "null value"); 133System.Diagnostics.Debug.Assert(null != value, "null value");
fx\src\data\System\Data\Common\ByteStorage.cs (3)
155System.Diagnostics.Debug.Assert(0 <= recordNo, "Invalid record"); 156System.Diagnostics.Debug.Assert(null != value, "null value"); 199System.Diagnostics.Debug.Assert(null != value, "null value");
fx\src\data\System\Data\Common\CharStorage.cs (3)
89System.Diagnostics.Debug.Assert(0 <= recordNo, "Invalid record"); 90System.Diagnostics.Debug.Assert(null != value, "null value"); 133System.Diagnostics.Debug.Assert(null != value, "null value");
fx\src\data\System\Data\Common\DataAdapter.cs (1)
478Debug.Assert(null != dataTables[i], "null DataTable Fill");
fx\src\data\System\Data\Common\DataColumnMapping.cs (3)
103Debug.Assert(null != columns, "GetDataColumnBySchemaAction: unexpected null DataColumnCollection"); 108Debug.Assert(null != dataColumn, "GetDataColumnBySchemaAction: unexpected null dataColumn"); 138Debug.Assert(dataTable != null, "Should not call with a null DataTable");
fx\src\data\System\Data\Common\DataColumnMappingCollection.cs (2)
293Debug.Assert((null != items) && (0 <= index) && (index < Count), "RemoveIndex, invalid"); 318Debug.Assert((null != items) && (0 <= index) && (index < Count), "RemoveIndex, invalid");
fx\src\data\System\Data\Common\DataRecordInternal.cs (4)
28Debug.Assert(null != schemaInfo, "invalid attempt to instantiate DataRecordInternal with null schema information"); 29Debug.Assert(null != values, "invalid attempt to instantiate DataRecordInternal with null value[]"); 38Debug.Assert(null != values, "invalid attempt to instantiate DataRecordInternal with null value[]"); 45Debug.Assert(null == _schemaInfo, "invalid attempt to override DataRecordInternal schema information");
fx\src\data\System\Data\Common\DataStorage.cs (13)
143Debug.Assert(storageType == GetStorageType(type), "Incorrect storage type specified"); 223System.Diagnostics.Debug.Assert(false, "not a String or SqlString column"); 262Debug.Assert(typeCode == GetStorageType(dataType), "Incorrect storage type specified"); 319System.Diagnostics.Debug.Assert(false, "shouldn't be here"); 413Debug.Assert(result == dataType.IsValueType, "typeCode mismatches dataType"); 426Debug.Assert(typeCode == GetStorageType(dataType), "typeCode mismatches dataType"); 450Debug.Assert(nullable == typeof(System.Data.SqlTypes.INullable).IsAssignableFrom(dataType), "INullable"); 451Debug.Assert(changeTracking == typeof(System.ComponentModel.IChangeTracking).IsAssignableFrom(dataType), "IChangeTracking"); 452Debug.Assert(revertibleChangeTracking == typeof(System.ComponentModel.IRevertibleChangeTracking).IsAssignableFrom(dataType), "IRevertibleChangeTracking"); 453Debug.Assert(xmlSerializable == typeof(System.Xml.Serialization.IXmlSerializable).IsAssignableFrom(dataType), "IXmlSerializable"); 457Debug.Assert(dataType != null, "Type should not be null"); 467Debug.Assert(typeCode == GetStorageType(dataType), "typeCode mismatches dataType"); 528Debug.Assert(null != type, "null type");
fx\src\data\System\Data\Common\DataTableMappingCollection.cs (1)
296Debug.Assert((null != items) && (0 <= index) && (index < Count), "RemoveIndex, invalid");
fx\src\data\System\Data\Common\DateTimeOffsetStorage.cs (3)
93System.Diagnostics.Debug.Assert(0 <= recordNo, "Invalid record"); 94System.Diagnostics.Debug.Assert(null != value, "null value"); 133System.Diagnostics.Debug.Assert(null != value, "null value");
fx\src\data\System\Data\Common\DateTimeStorage.cs (3)
94System.Diagnostics.Debug.Assert(0 <= recordNo, "Invalid record"); 95System.Diagnostics.Debug.Assert(null != value, "null value"); 135System.Diagnostics.Debug.Assert(null != value, "null value");
fx\src\data\System\Data\Common\DBCommandBuilder.cs (12)
175Debug.Assert(_isMutatedName[iMutatedName], String.Format(CultureInfo.InvariantCulture, "{0} expected to be a mutated name", _baseParameterNames[iMutatedName])); 542Debug.Assert(false, "Rowcount expected to be 1"); 708Debug.Assert (!ADP.IsEmpty(_quotedBaseTableName), "no table name"); 728Debug.Assert (!ADP.IsEmpty(_quotedBaseTableName), "no table name"); 814Debug.Assert (!ADP.IsEmpty(_quotedBaseTableName), "no table name"); 1022Debug.Assert(!ADP.IsEmpty(sourceColumn), "empty source column"); 1049Debug.Assert(null != _parameterNames, "How can we have a parameterName without a _parameterNames collection?"); 1050Debug.Assert(null != _parameterMarkerFormat, "How can we have a _parameterNames collection but no _parameterMarkerFormat?"); 1092Debug.Assert(null != _parameterNames, "How can we have a parameterName without a _parameterNames collection?"); 1093Debug.Assert(null != _parameterMarkerFormat, "How can we have a _parameterNames collection but no _parameterMarkerFormat?"); 1250Debug.Assert(null != p, "null CreateParameter"); 1375Debug.Assert(false, "how did we get here?");
fx\src\data\System\Data\Common\DbConnectionOptions.cs (3)
536Debug.Assert(!UseOdbcRules, "ExpandKeyword not ready for Odbc"); 878Debug.Assert(null != connectionString, "null connectionstring"); 959Debug.Assert(expanded, "password/pwd was not removed");
fx\src\data\System\Data\Common\DBConnectionString.cs (16)
75Debug.Assert(null != connectionOptions, "null connectionOptions"); 255Debug.Assert(!_hasPassword || ContainsKey(KEY.Password) || ContainsKey(KEY.Pwd), "OnDeserialized password mismatch this"); 256Debug.Assert(null == entry || !entry._hasPassword || entry.ContainsKey(KEY.Password) || entry.ContainsKey(KEY.Pwd), "OnDeserialized password mismatch entry"); 267Debug.Assert(combinedSet != null, "The combined connection string should not be null"); 274Debug.Assert(combinedSet._restrictionValues.Except(componentSet._restrictionValues).Count() == 0, "Combined set allows values not allowed by component set"); 281Debug.Assert(false, string.Format("Unknown behavior for combined set: {0}", combinedSet._behavior)); 289Debug.Assert(combinedSet._restrictionValues.Intersect(componentSet._restrictionValues).Count() == 0, "Combined values allows values prevented by component set"); 295Debug.Assert(componentSet._restrictionValues.Except(combinedSet._restrictionValues).Count() == 0, "Combined values does not prevent all of the values prevented by the component set"); 298Debug.Assert(false, string.Format("Unknown behavior for combined set: {0}", combinedSet._behavior)); 302Debug.Assert(false, string.Format("Unknown behavior for component set: {0}", componentSet._behavior)); 313Debug.Assert(!_hasPassword || ContainsKey(KEY.Password) || ContainsKey(KEY.Pwd), "OnDeserialized password mismatch this"); 314Debug.Assert(!entry._hasPassword || entry.ContainsKey(KEY.Password) || entry.ContainsKey(KEY.Pwd), "OnDeserialized password mismatch entry"); 337Debug.Assert(false, "invalid KeyRestrictionBehavior"); 469Debug.Assert(!ADP.IsEmpty(restrictionValues[i-1]), "empty restriction"); 470Debug.Assert(!ADP.IsEmpty(restrictionValues[i]), "empty restriction"); 471Debug.Assert(0 >= StringComparer.Ordinal.Compare(restrictionValues[i-1], restrictionValues[i]));
fx\src\data\System\Data\Common\DbConnectionStringBuilder.cs (1)
210Debug.Assert(null != values[i], "null value " + keylist.Current);
fx\src\data\System\Data\Common\DbConnectionStringCommon.cs (17)
244Debug.Assert(null != value, "ConvertToBoolean(null)"); 274Debug.Assert(null != value, "ConvertToIntegratedSecurity(null)"); 333Debug.Assert(Enum.GetNames(typeof(PoolBlockingPeriod)).Length == 3, "PoolBlockingPeriod enum has changed, update needed"); 334Debug.Assert(null != value, "TryConvertToPoolBlockingPeriod(null,...)"); 360Debug.Assert(Enum.GetNames(typeof(PoolBlockingPeriod)).Length == 3, "PoolBlockingPeriod enum has changed, update needed"); 366Debug.Assert(IsValidPoolBlockingPeriodValue(value)); 394Debug.Assert(null != value, "ConvertToPoolBlockingPeriod(null)"); 468Debug.Assert(Enum.GetNames(typeof(ApplicationIntent)).Length == 2, "ApplicationIntent enum has changed, update needed"); 469Debug.Assert(null != value, "TryConvertToApplicationIntent(null,...)"); 490Debug.Assert(Enum.GetNames(typeof(ApplicationIntent)).Length == 2, "ApplicationIntent enum has changed, update needed"); 496Debug.Assert(IsValidApplicationIntentValue(value)); 519Debug.Assert(null != value, "ConvertToApplicationIntent(null)"); 594Debug.Assert(Enum.GetNames(typeof(SqlAuthenticationMethod)).Length == 5, "SqlAuthenticationMethod enum has changed, update needed"); 660Debug.Assert(Enum.GetNames(typeof(SqlConnectionColumnEncryptionSetting)).Length == 2, "SqlConnectionColumnEncryptionSetting enum has changed, update needed"); 670Debug.Assert(IsValidColumnEncryptionSetting(value), "value is not a valid connection level column encryption setting."); 684Debug.Assert(Enum.GetNames(typeof(SqlAuthenticationMethod)).Length == 5, "SqlAuthenticationMethod enum has changed, update needed"); 694Debug.Assert(IsValidAuthenticationTypeValue(value));
fx\src\data\System\Data\Common\DbDataAdapter.cs (25)
649Debug.Assert(DbType.Int32 == parameter.DbType, "unexpected DbType"); 784Debug.Assert(null != tableMapping, "null TableMapping when MissingMappingAction.Error"); 808Debug.Assert((null != dataRows) && (0 < dataRows.Length), "Update: bad dataRows"); 809Debug.Assert(null != tableMapping, "Update: bad DataTableMapping"); 871Debug.Assert(false, "InvalidDataRowState"); 1228Debug.Assert(null == rowUpdatedEvent.Errors, "Continue - but contains an exception"); 1238Debug.Assert(null != connection, "unexpected null connection"); 1239Debug.Assert(null != connection, "unexpected null connection"); 1267Debug.Assert(null != rowUpdatedEvent, "null rowUpdatedEvent"); 1268Debug.Assert(null != dataCommand, "null dataCommand"); 1269Debug.Assert(rowUpdatedEvent.Command == dataCommand, "dataCommand differs from rowUpdatedEvent"); 1318Debug.Assert(false, "unexpected StatementType"); 1340Debug.Assert(null == rowUpdatedEvent.Errors, "Continue - but contains an exception"); 1351Debug.Assert(null != rowUpdatedEvent, "null rowUpdatedEvent"); 1371Debug.Assert(null != batchCommands, "null batchCommands?"); 1387Debug.Assert(null != row, "null dataRow?"); 1400Debug.Assert(null != batchCommands, "null batchCommands?"); 1414Debug.Assert(null != row, "null dataRow?"); 1443Debug.Assert(null != batchCommands, "null batchCommands?"); 1449Debug.Assert(null != row, "null dataRow?"); 1458Debug.Assert(null != dataRow, "null dataRow"); 1496Debug.Assert(null != command, "GetConnection3: null command"); 1497Debug.Assert(!ADP.IsEmpty(method), "missing method name"); 1506Debug.Assert(null != command, "GetConnection4: null command"); 1541Debug.Assert(null != connection, "QuietOpen: null connection");
fx\src\data\System\Data\Common\dbenumerator.cs (1)
63Debug.Assert(null != _schemaInfo && null != _descriptors, "unable to build schema information!");
fx\src\data\System\Data\Common\DbProviderFactories.cs (7)
74Debug.Assert(providerInstance.IsPublic, "field not public"); 75Debug.Assert(providerInstance.IsStatic, "field not static"); 147Debug.Assert(providerInstance.IsPublic, "field not public"); 148Debug.Assert(providerInstance.IsStatic, "field not static"); 193Debug.Assert(providerInstance.IsPublic, "field not public"); 194Debug.Assert(providerInstance.IsStatic, "field not static"); 247Debug.Assert(false, "unexpected state");
fx\src\data\System\Data\Common\DBSchemaRow.cs (3)
36Debug.Assert(null != dataRows, "GetSchemaRows: unexpected null dataRows"); 59Debug.Assert(null != schemaTable.ColumnName, "no column ColumnName"); 86Debug.Assert(null != schemaTable.Size, "no column Size");
fx\src\data\System\Data\Common\DecimalStorage.cs (3)
154System.Diagnostics.Debug.Assert(0 <= recordNo, "Invalid record"); 155System.Diagnostics.Debug.Assert(null != value, "null value"); 190System.Diagnostics.Debug.Assert(null != value, "null value");
fx\src\data\System\Data\Common\DoubleStorage.cs (3)
154System.Diagnostics.Debug.Assert(0 <= recordNo, "Invalid record"); 155System.Diagnostics.Debug.Assert(null != value, "null value"); 197System.Diagnostics.Debug.Assert(null != value, "null value");
fx\src\data\System\Data\Common\FieldNameLookup.cs (2)
48Debug.Assert(null != fieldNames[i], "MDAC 66681"); 61Debug.Assert(null != fieldNames[i], "MDAC 66681");
fx\src\data\System\Data\Common\Int16Storage.cs (3)
162System.Diagnostics.Debug.Assert(0 <= recordNo, "Invalid record"); 163System.Diagnostics.Debug.Assert(null != value, "null value"); 203System.Diagnostics.Debug.Assert(null != value, "null value");
fx\src\data\System\Data\Common\Int32Storage.cs (3)
161System.Diagnostics.Debug.Assert(0 <= recordNo, "Invalid record"); 162System.Diagnostics.Debug.Assert(null != value, "null value"); 202System.Diagnostics.Debug.Assert(null != value, "null value");
fx\src\data\System\Data\Common\Int64Storage.cs (3)
156System.Diagnostics.Debug.Assert(0 <= recordNo, "Invalid record"); 157System.Diagnostics.Debug.Assert(null != value, "null value"); 197System.Diagnostics.Debug.Assert(null != value, "null value");
fx\src\data\System\Data\Common\NameValuePair.cs (2)
25System.Diagnostics.Debug.Assert(!ADP.IsEmpty(name), "empty keyname"); 37Debug.Assert(0 < _length, "NameValuePair zero Length usage");
fx\src\data\System\Data\Common\NameValuePermission.cs (3)
65Debug.Assert(null != entry, "null DBConnectionString"); 89Debug.Assert(entries.Contains(kv._entry), "entries doesn't contain entry"); 104Debug.Assert(entries.Contains(kentry), "entries doesn't contain entry");
fx\src\data\System\Data\Common\ObjectStorage.cs (3)
204System.Diagnostics.Debug.Assert(null != value, "null value"); 347Debug.Assert(xmlReader is DataTextReader, "Invalid DataTextReader is being passed to customer"); 411Debug.Assert(xmlWriter is DataTextWriter, "Invalid DataTextWriter is being passed to customer");
fx\src\data\System\Data\Common\SByteStorage.cs (3)
155System.Diagnostics.Debug.Assert(0 <= recordNo, "Invalid record"); 156System.Diagnostics.Debug.Assert(null != value, "null value"); 199System.Diagnostics.Debug.Assert(null != value, "null value");
fx\src\data\System\Data\Common\SingleStorage.cs (3)
155System.Diagnostics.Debug.Assert(0 <= recordNo, "Invalid record"); 156System.Diagnostics.Debug.Assert(null != value, "null value"); 198System.Diagnostics.Debug.Assert(null != value, "null value");
fx\src\data\System\Data\Common\SQLConvert.cs (16)
19Debug.Assert(value != null, "null argument in ConvertToSqlByte"); 37Debug.Assert(value != null, "null argument in ConvertToSqlInt16"); 58Debug.Assert(value != null, "null argument in ConvertToSqlInt32"); 86Debug.Assert(value != null, "null argument in ConvertToSqlInt64"); 119Debug.Assert(value != null, "null argument in ConvertToSqlDouble"); 167Debug.Assert(value != null, "null argument in ConvertToSqlDecimal"); 209Debug.Assert(value != null, "null argument in ConvertToSqlSingle"); 253Debug.Assert(value != null, "null argument in ConvertToSqlMoney"); 294Debug.Assert(value != null, "null argument in ConvertToSqlDateTime"); 312Debug.Assert(value != null, "null argument in ConvertToSqlBoolean"); 330Debug.Assert(value != null, "null argument in ConvertToSqlGuid"); 348Debug.Assert(value != null, "null argument in ConvertToSqlBinary"); 366Debug.Assert(value != null, "null argument in ConvertToSqlString"); 384Debug.Assert(value != null, "null argument in ConvertToSqlChars"); 399Debug.Assert(value != null, "null argument in ConvertToSqlBytes"); 617Debug.Assert(value is string || type == typeof(string) , "invalid call to ChangeTypeForXML");
fx\src\data\System\Data\Common\SQLTypes\SQLBinaryStorage.cs (2)
105Debug.Assert(!DataStorage.IsObjectNull(value), "we should have null here"); 106Debug.Assert((value.GetType() == typeof(SqlBinary)), "wrong input type");
fx\src\data\System\Data\Common\SQLTypes\SQlBooleanStorage.cs (2)
134Debug.Assert(!DataStorage.IsObjectNull(value), "we should have null here"); 135Debug.Assert((value.GetType() == typeof(SqlBoolean)), "wrong input type");
fx\src\data\System\Data\Common\SQLTypes\SQLBytesStorage.cs (2)
104Debug.Assert(!DataStorage.IsObjectNull(value), "we shouldn't have null here"); 105Debug.Assert((value.GetType() == typeof(SqlBytes)), "wrong input type");
fx\src\data\System\Data\Common\SQLTypes\SQLByteStorage.cs (2)
203Debug.Assert(!DataStorage.IsObjectNull(value), "we shouldn't have null here"); 204Debug.Assert((value.GetType() == typeof(SqlByte)), "wrong input type");
fx\src\data\System\Data\Common\SQLTypes\SQLCharsStorage.cs (2)
106Debug.Assert(!DataStorage.IsObjectNull(value), "we shouldn't have null here"); 107Debug.Assert((value.GetType() == typeof(SqlChars)), "wrong input type");
fx\src\data\System\Data\Common\SQLTypes\SQLDateTimeStorage.cs (2)
136Debug.Assert(!DataStorage.IsObjectNull(value), "we shouldn't have null here"); 137Debug.Assert((value.GetType() == typeof(SqlDateTime)), "wrong input type");
fx\src\data\System\Data\Common\SQLTypes\SQLDecimalStorage.cs (2)
201Debug.Assert(!DataStorage.IsObjectNull(value), "we shouldn't have null here"); 202Debug.Assert((value.GetType() == typeof(SqlDecimal)), "wrong input type");
fx\src\data\System\Data\Common\SQLTypes\SQLDoubleStorage.cs (2)
202Debug.Assert(!DataStorage.IsObjectNull(value), "we shouldn't have null here"); 203Debug.Assert((value.GetType() == typeof(SqlDouble)), "wrong input type");
fx\src\data\System\Data\Common\SQLTypes\SQLGuidStorage.cs (2)
105Debug.Assert(!DataStorage.IsObjectNull(value), "we shouldn't have null here"); 106Debug.Assert((value.GetType() == typeof(SqlGuid)), "wrong input type");
fx\src\data\System\Data\Common\SQLTypes\SQLInt16Storage.cs (2)
202Debug.Assert(!DataStorage.IsObjectNull(value), "we shouldn't have null here"); 203Debug.Assert((value.GetType() == typeof(SqlInt16)), "wrong input type");
fx\src\data\System\Data\Common\SQLTypes\SQLInt32Storage.cs (2)
202Debug.Assert(!DataStorage.IsObjectNull(value), "we shouldn't have null here"); 203Debug.Assert((value.GetType() == typeof(SqlInt32)), "wrong input type");
fx\src\data\System\Data\Common\SQLTypes\SQLInt64Storage.cs (2)
203Debug.Assert(!DataStorage.IsObjectNull(value), "we shouldn't have null here"); 204Debug.Assert((value.GetType() == typeof(SqlInt64)), "wrong input type");
fx\src\data\System\Data\Common\SQLTypes\SQLMoneyStorage.cs (2)
202Debug.Assert(!DataStorage.IsObjectNull(value), "we shouldn't have null here"); 203Debug.Assert((value.GetType() == typeof(SqlMoney)), "wrong input type");
fx\src\data\System\Data\Common\SQLTypes\SQLSingleStorage.cs (2)
203Debug.Assert(!DataStorage.IsObjectNull(value), "we should have null here"); 204Debug.Assert((value.GetType() == typeof(SqlSingle)), "wrong input type");
fx\src\data\System\Data\Common\SQLTypes\SQLStringStorage.cs (2)
159Debug.Assert(!DataStorage.IsObjectNull(value), "we shouldn't have null here"); 160Debug.Assert((value.GetType() == typeof(SqlString)), "wrong input type");
fx\src\data\System\Data\Common\SQLTypes\SqlUDTStorage.cs (2)
170Debug.Assert(xmlReader is DataTextReader, "Invalid DataTextReader is being passed to customer"); 197Debug.Assert(xmlWriter is DataTextWriter, "Invalid DataTextWriter is being passed to customer");
fx\src\data\System\Data\Common\StringStorage.cs (3)
95Debug.Assert(recordNo != -1, "Invalid (-1) parameter: 'recordNo'"); 96Debug.Assert(null != value, "null value"); 148System.Diagnostics.Debug.Assert(null != value, "null value");
fx\src\data\System\Data\Common\TimeSpanStorage.cs (3)
145System.Diagnostics.Debug.Assert(0 <= recordNo, "Invalid record"); 146System.Diagnostics.Debug.Assert(null != value, "null value"); 207System.Diagnostics.Debug.Assert(null != value, "null value");
fx\src\data\System\Data\Common\UInt16Storage.cs (3)
161System.Diagnostics.Debug.Assert(0 <= recordNo, "Invalid record"); 162System.Diagnostics.Debug.Assert(null != value, "null value"); 202System.Diagnostics.Debug.Assert(null != value, "null value");
fx\src\data\System\Data\Common\UInt32Storage.cs (3)
161System.Diagnostics.Debug.Assert(0 <= recordNo, "Invalid record"); 162System.Diagnostics.Debug.Assert(null != value, "null value"); 202System.Diagnostics.Debug.Assert(null != value, "null value");
fx\src\data\System\Data\Common\UInt64Storage.cs (3)
155System.Diagnostics.Debug.Assert(0 <= recordNo, "Invalid record"); 156System.Diagnostics.Debug.Assert(null != value, "null value"); 196System.Diagnostics.Debug.Assert(null != value, "null value");
fx\src\data\System\Data\ConstraintCollection.cs (3)
262Debug.Assert(constraint != null, "Attempt to add null constraint to constraint array"); 507Debug.Assert(a1 != null && a2 != null, "Invalid Arguments"); 598Debug.Assert (name != null);
fx\src\data\System\Data\ConstraintEnumerator.cs (3)
47Debug.Assert(constraints.Current is Constraint, "ConstraintEnumerator, contains object which is not constraint"); 60Debug.Assert (currentObject != null, "GetObject should never be called w/ null currentObject."); 88Debug.Assert (CurrentObject != null, "GetObject should never be called w/ null currentObject.");
fx\src\data\System\Data\DataColumn.cs (40)
435Debug.Assert(this.encodedColumnName != null && this.encodedColumnName.Length != 0); 493Debug.Assert(value != null); 669Debug.Assert(defaultValue != null, "It should not have been set to null."); 887Debug.Assert(null != _storage, "no storage"); 894Debug.Assert(null != _storage, "no storage"); 901Debug.Assert(null != _storage, "no storage"); 914Debug.Assert(this.simpleType.CanHaveMaxLength(), "expected simpleType to be string"); 1048Debug.Assert(2 <= sortIndex.RefCount, "bad sortIndex refcount"); 1151Debug.Assert(null != _storage, "null storage"); 1157Debug.Assert(null != _storage, "no storage"); 1158Debug.Assert(null != value, "setting null, expecting dbnull"); 1160Debug.Assert(null != this.table, "storage with no DataTable on column"); 1183Debug.Assert(null != _storage, "no storage"); 1189Debug.Assert(null != value, "setting null, expecting dbnull"); 1190Debug.Assert(null != this.table, "storage with no DataTable on column"); 1191Debug.Assert(null != _storage, "no storage"); 1206Debug.Assert(null != _storage, "no storage"); 1243Debug.Assert(oldConstraint != null, "Should have found a column to remove from the collection."); 1256Debug.Assert(table.Constraints.FindKeyConstraint(this) == null, "Should not be a duplication constraint in collection"); 1372Debug.Assert(IsStringType, "not a String or SqlString column"); 1386Debug.Assert(IsStringType, "not a String or SqlString column"); 1422Debug.Assert(null != _storage, "no storage"); 1438Debug.Assert(null != _storage, "null storage"); 1462Debug.Assert(null != _storage, "null storage"); 1467Debug.Assert(null != _storage, "null storage"); 1472Debug.Assert(null != _storage, "null storage"); 1546Debug.Assert(null != _storage, "no storage"); 1554Debug.Assert(null != _storage, "no storage"); 1593Debug.Assert(null != _storage, "no storage"); 1604Debug.Assert(rels != null, "Invalid ParentRelations"); 1607Debug.Assert(key.HasValue, "Invalid child key (null)"); 1613Debug.Assert(rels != null, "Invalid ChildRelations"); 1616Debug.Assert(key.HasValue, "Invalid parent key (null)"); 1714Debug.Assert(s != null, "Caller is resposible for missing element/attribure case"); 1726Debug.Assert(value != null && (value != DBNull.Value), "Caller is resposible for checking on DBNull"); 1732Debug.Assert(value != null && (value != DBNull.Value), "Caller is resposible for checking on DBNull"); 1743Debug.Assert(null != _storage, "no storage"); 1756Debug.Assert(!dependentColumns.Contains(expressionColumn), "duplicate column - expected to be unique"); 1774Debug.Assert(null != col, "null datacolumn in expression dependencies"); 1881Debug.Assert(null != value && DataColumn.IsAutoIncrementType(value.GetType()) && !(value is System.Numerics.BigInteger), "unexpected value for autoincrement");
fx\src\data\System\Data\DataColumnCollection.cs (3)
489Debug.Assert(col.Computed, "invalid (non an expression) column in the expression dependent columns"); 751Debug.Assert (name != null); 781Debug.Assert (name != null, "Must specify a name");
fx\src\data\System\Data\DataError.cs (4)
51Debug.Assert(column != null, "Invalid (null) argument"); 52Debug.Assert(column.Table != null, "Invalid (loose) column"); 88Debug.Assert(column.errors >= 0, "missing error counts"); 96Debug.Assert(errorList[i].column.errors >= 0, "missing error counts");
fx\src\data\System\Data\DataException.cs (1)
246Debug.Assert(null != e, "TraceException: null Exception");
fx\src\data\System\Data\DataKey.cs (2)
136Debug.Assert(false, "don't put DataKey into a Hashtable"); 149Debug.Assert(false, "need to directly call Equals(DataKey)");
fx\src\data\System\Data\DataRelation.cs (4)
417Debug.Assert(DataSet == null || ! nested, "this relation supposed to be not in dataset or not nested"); 482Debug.Assert(ChildTable != null, "On a DataSet, but not on Table. Bad state"); 569Debug.Assert(parentKeyConstraint == null || value == null, "ParentKeyConstraint should not have been set already."); 613Debug.Assert(childKeyConstraint == null || value == null, "ChildKeyConstraint should not have been set already.");
fx\src\data\System\Data\DataRelationCollection.cs (1)
371Debug.Assert (name != null);
fx\src\data\System\Data\DataRow.cs (16)
319Debug.Assert(!inChangingEvent, "how are we in a changing event to cancel?"); 320Debug.Assert(-1 != tempRecord, "how no propsed record to cancel?"); 335Debug.Assert(!inChangingEvent, "how are we in a changing event to end?"); 462Debug.Assert(!inChangingEvent, "how are we in a changing event to cancel?"); 463Debug.Assert(-1 != tempRecord, "how no propsed record to cancel?"); 480Debug.Assert(!inChangingEvent, "how are we in a changing event to end?"); 552Debug.Assert(-1 != tempRecord, "missing temp record"); 553Debug.Assert(0 == _countColumnChange, "unexpected column change count"); 554Debug.Assert(null == _lastChangedColumn, "unexpected last column change"); 570Debug.Assert(-1 == tempRecord, "unexpected temp record"); 950Debug.Assert(0 != (DataViewRowState.Unchanged & viewState), "not DataViewRowState.Unchanged"); 954Debug.Assert(0 != (DataViewRowState.Added & viewState), "not DataViewRowState.Added"); 958Debug.Assert(_action==DataRowAction.Rollback || 0 != (DataViewRowState.Deleted & viewState), "not DataViewRowState.Deleted"); 964Debug.Assert(0 != (DataViewRowState.ModifiedOriginal & viewState), "not DataViewRowState.ModifiedOriginal"); 1232Debug.Assert(relation != null, "The relation should not be null here."); 1313Debug.Assert(valueFromStorage.Equals(column.DataExpression.Evaluate(this, version)),
fx\src\data\System\Data\DataSet.cs (8)
270Debug.Assert(info != null); 780Debug.Assert(null != _culture, "DataSet.Locale: null culture"); 1247Debug.Assert(value && !_rowChanges[index], "setting twice or to false"); 1276Debug.Assert(0 <= bitMatrix[i].HasChanges, "negative change count"); 1286Debug.Assert(bitMatrix[i].HasChanges <= table.Rows.Count, "to many changes"); 1316Debug.Assert(DataRowState.Added == rowState || 2062Debug.Assert(root.NamespaceURI != null, "root.NamespaceURI should not ne null, it should be empty string"); 2258Debug.Assert(reader.NodeType != XmlNodeType.Whitespace, "Should not be on Whitespace node");
fx\src\data\System\Data\DataTable.cs (64)
263Debug.Assert(ds.RemotingFormat == SerializationFormat.Xml, "RemotingFormat must be SerializationFormat.Xml"); 300Debug.Assert(ds.Tables.Count == 1, "There should be exactly 1 table here"); 420Debug.Assert(Columns.Count == 0, "There is column in Table"); 482Debug.Assert(DataSet != null); 507Debug.Assert(fk != null); 569Debug.Assert(con.Equals("F")); 783Debug.Assert(bitStates != null); 784Debug.Assert(bitStates.Length > bitIndex); 804Debug.Assert(Rows.Count > rowIndex); 805Debug.Assert(rowErrors != null); 806Debug.Assert(colErrors != null); 830Debug.Assert(Rows.Count > rowIndex); 831Debug.Assert(rowErrors != null); 832Debug.Assert(colErrors != null); 843Debug.Assert(columnsInError.Length == columnErrors.Length); 1312Debug.Assert(null != _culture, "null culture"); 1313Debug.Assert(_cultureUserSet || (null == dataSet) || _culture.Equals(dataSet.Locale), "Locale mismatch"); 1372Debug.Assert(null != culture, "SetLocaleValue: no locale"); 1533Debug.Assert(2 <= primaryKey.ConstraintIndex.RefCount, "bad primaryKey index RefCount"); 1606Debug.Assert(Constraints.FindConstraint(primaryKey) == primaryKey, "PrimaryKey is not in ConstraintCollection"); 1947Debug.Assert(value != null, "Value shoud not be null ??"); 1948Debug.Assert(value.ColumnMapping == MappingType.SimpleContent, "should be text node here"); 1994Debug.Assert(ndx != null); 2010Debug.Assert(action == DataRowAction.Delete, "Unexpected SetNewRecord action in merge function."); 2080Debug.Assert(saveIdxRecord == ((saveRowState == DataRowState.Added) ? targetRow.newRecord : targetRow.oldRecord), "oops, you change index record without noticing it"); 2209Debug.Assert(clone != null, "The table passed in has to be newly created empty DataTable."); 2620Debug.Assert(null == rowDiffId, "wasn't previously cleared"); 2865Debug.Assert(Enum.GetUnderlyingType(typeof(DataRowState)) == typeof(Int32), "Invalid DataRowState type"); 3065Debug.Assert(key.HasValue); 3231Debug.Assert(e != null, "e should not be null"); 3239Debug.Assert(e != null, "e should not be null"); 3290Debug.Assert((null != e) && ((null != onRowChangedDelegate) || IsTypedDataTable), "OnRowChanged arguments"); 3303Debug.Assert((null != e) && ((null != onRowChangingDelegate) || IsTypedDataTable), "OnRowChanging arguments"); 3316Debug.Assert((null != e) && ((null != onRowDeletingDelegate) || IsTypedDataTable), "OnRowDeleting arguments"); 3329Debug.Assert((null != e) && ((null != onRowDeletedDelegate) || IsTypedDataTable), "OnRowDeleted arguments"); 3413Debug.Assert (record != -1, "Record number must be given"); 3434Debug.Assert (oldIndex.Length == newIndex.Length, "Size oldIndexes and newIndexes should be the same"); 3435Debug.Assert (oldIndex.Length == shadowIndexes.Count, "Size of OldIndexes should be the same as size of Live indexes"); 3666Debug.Assert(null != indexes, "unexpected null indexes"); 3851Debug.Assert(row != null, "Row can't be null."); 3862Debug.Assert(fireEvent, "SetNewRecord is called with wrong parameter"); 3868Debug.Assert(!row.inChangingEvent, "How can this row be in an infinite loop?"); 4089Debug.Assert(1 <= shadowCount, "unexpected negative shadow count"); 4098Debug.Assert(0 == shadowCount, "unexpected count"); 4103Debug.Assert(1 <= shadowCount, "unexpected negative shadow count"); 4110Debug.Assert(0 < indexes.Count, "unexpected"); 4136Debug.Assert(null == loadIndex, "loadIndex should already be null"); 4217Debug.Assert(2 <= loadIndex.RefCount, "bad loadIndex.RefCount"); 4223Debug.Assert (row != null, "Row can't be null for index record"); 4265Debug.Assert(loadIndexwithCurrentDeleted != null, "loadIndexwithCurrentDeleted should not be null" ); 4275Debug.Assert(loadIndexwithOriginalAdded != null, "loadIndexwithOriginalAdded should not be null"); 4283Debug.Assert(2 <= indextoUse.RefCount, "bad indextoUse.RefCount"); 4311Debug.Assert (row != null, "Row can't be null for index record"); 4374Debug.Assert(parentKey != null, "AddForeignKey: Invalid paramter.. related primary key is null"); 4620Debug.Assert(false, "LoadOption.Upsert with deleted row, should not be here"); 4654Debug.Assert(dataRow.tempRecord == recordNo, "tempRecord has been changed in event handler"); 4951Debug.Assert(tableList != null, "tableList shouldnot be null"); 6029Debug.Assert(_targetTable == null, "do not reuse this section"); 6030Debug.Assert(table != null); 6031Debug.Assert(table.rowDiffId == null, "rowDiffId wasn't previously cleared"); 6082Debug.Assert(_targetDS == null, "do not reuse this section"); 6083Debug.Assert(ds != null); 6099Debug.Assert(table.rowDiffId == null, "rowDiffId wasn't previously cleared"); 6258Debug.Assert(column.Computed, "Only computed columns should be re-evaluated.");
fx\src\data\System\Data\DataTableCollection.cs (2)
557Debug.Assert(_list.Count == tableList.Count, "Both lists should have equal numbers of tables"); 668Debug.Assert (name != null);
fx\src\data\System\Data\DataView.cs (24)
294Debug.Assert(rowViewCache.Count == CountFromIndex, "DataView.Count mismatch"); 400Debug.Assert(null != predicate, "null predicate"); 406Debug.Assert(DataRowVersion.Default != version, "not expecting Default"); 407Debug.Assert(DataRowVersion.Proposed != version, "not expecting Proposed"); 617Debug.Assert(null == addNewRow, "AddNew addNewRow is not null"); 836Debug.Assert(null != addNewRow, "null addNewRow"); 856Debug.Assert(flag, "didn't remove addNewRow"); 1158Debug.Assert (property != null, "property is null"); 1328Debug.Assert(null != row, "MaintainDataView.ItemAdded with null DataRow"); 1333Debug.Assert(flag, "row actually removed"); 1339Debug.Assert(0 <= index, "ItemAdded was actually deleted"); 1348Debug.Assert(false, "ItemAdded DataRow already in view"); 1352Debug.Assert(null != row, "MaintainDataView.ItemDeleted with null DataRow"); 1353Debug.Assert(row != addNewRow, "addNewRow being deleted"); 1362Debug.Assert(false, "ItemDeleted DataRow not in view tracking"); 1366Debug.Assert(false, "ItemDeleted DataRow not in view"); 1370Debug.Assert(null == row, "MaintainDataView.Reset with non-null DataRow"); 1379Debug.Assert(false, "unexpected"); 1403Debug.Assert(((ListChangedType.ItemChanged == e.ListChangedType) && ((e.NewIndex == e.OldIndex) || (-1 == e.OldIndex))) || 1407Debug.Assert(0 <= e.NewIndex, "negative NewIndex"); 1495Debug.Assert(null != drv, "didn't contain addNewRow"); 1498Debug.Assert(rvc.Count == CountFromIndex, "didn't add expected count"); 1544Debug.Assert((0 == (DataViewRowState.ModifiedCurrent & newRowStates)) || 1557Debug.Assert(null == _comparison, "RelatedView should not have a comparison function");
fx\src\data\System\Data\DataViewListener.cs (2)
84Debug.Assert(null == _table, "DataViewListener already registered table"); 136Debug.Assert(null == _index, "DataviewListener already registered index");
fx\src\data\System\Data\Filter\AggregateNode.cs (3)
49Debug.Assert(columnName != null, "Invalid parameter column name (null)."); 113Debug.Assert(column != null, "Failed to bind column " + columnName); 184Debug.Assert(DataRowVersion.Original == version, "wrong version");
fx\src\data\System\Data\Filter\BinaryNode.cs (4)
841Debug.Assert((!DataStorage.IsObjectNull(vLeft))&& (!DataStorage.IsObjectNull(vRight)), "Imposible.."); 988Debug.Assert(false, "Invalid (unmapped) precedence " + code.ToString()); 1279Debug.Assert(false, "Unexpected LIKE kind"); 1354Debug.Assert(patchars[length-1] == '*' || patchars[length-1] == '%', "Invalid LIKE pattern formed.. ");
fx\src\data\System\Data\Filter\ConstNode.cs (1)
62Debug.Assert(false, "NYI");
fx\src\data\System\Data\Filter\DataExpression.cs (2)
83Debug.Assert(parsed, "Invalid calling order: Bind() before Parse()"); 186Debug.Assert(dependency != null, "GetDependencies: null, we should have created an empty list");
fx\src\data\System\Data\Filter\ExpressionParser.cs (34)
284Debug.Assert(text[start] == '\'' && text[pos-1] == '\'', "The expression contains an invalid string constant"); 285Debug.Assert(pos - start > 1, "The expression contains an invalid string constant"); 291Debug.Assert(text[start] == '#' && text[pos-1] == '#', "The expression contains invalid date constant."); 292Debug.Assert(pos - start > 2, "The expression contains invalid date constant '{0}'."); 298Debug.Assert(false, "unhandled token"); 311Debug.Assert(topOperator > 0, "Empty operator stack!!"); 376Debug.Assert(topOperator > 1, "melformed operator stack."); 385Debug.Assert(opInfo.priority == Operators.priParen, "melformed operator stack."); 395Debug.Assert(topNode > 0 && NodePeek().GetType() == typeof(FunctionNode), "The function node should be created on '('"); 522Debug.Assert(topNode == 1 || topNode == 0, "Invalid Node Stack"); 535Debug.Assert(token == Tokens.LeftParen, "ParseAggregateArgument(): Invalid argument, token <> '('"); 590Debug.Assert(topNode > 0, "NodePop(): Corrupted node stack"); 592Debug.Assert(null != node, "null NodePop"); 610Debug.Assert(null != node, "null NodePush"); 626Debug.Assert(pri > Operators.priStart && pri <= Operators.priMax, "Invalid priority value"); 631Debug.Assert(topOperator > 0, "Empty operator stack!!"); 637Debug.Assert(opInfo.priority >= pri, "Invalid prioriry value"); 674Debug.Assert(opInfo.op == Operators.Plus || 683Debug.Assert(nodeLeft != null, "Invalid left operand"); 684Debug.Assert(nodeRight != null, "Invalid right operand"); 713Debug.Assert(nodeLeft == null, "Invalid left operand"); 714Debug.Assert(nodeRight != null, "Invalid right operand"); 725Debug.Assert(false, "Unhandled operator type"); 728Debug.Assert(expr != null, "Failed to create expression"); 937Debug.Assert(pos != 0, "We have at least one digit in the buffer, ScanNumeric()"); 938Debug.Assert(IsDigit(text[pos-1]), "We have at least one digit in the buffer, ScanNumeric(), not a digit"); 990Debug.Assert(chEnd != '\0', "Invalid bracket value"); 991Debug.Assert(esc != '\0', "Invalid escape value"); 1005Debug.Assert(text[pos] == chEnd, "Invalid bracket value"); 1043Debug.Assert(token == Tokens.Name, "Exprecing an identifier."); 1044Debug.Assert(pos > start, "Exprecing an identifier."); 1047Debug.Assert(name != null, "Make sure the arguments for Compare method are OK"); 1056Debug.Assert(reservedwords[i].word != null, "Make sure the arguments for Compare method are OK"); 1073Debug.Assert(token == Tokens.Name, "Exprecing an identifier.");
fx\src\data\System\Data\Filter\FilterException.cs (1)
113Debug.Fail(err);
fx\src\data\System\Data\Filter\FunctionNode.cs (23)
106Debug.Assert(info < funcs.Length && info >= 0, "Invalid function info."); 110Debug.Assert(this.argumentCount == funcs[info].argumentCount || funcs[info].IsVariantArgumentList, "Invalid argument argumentCount."); 167Debug.Assert(this.info > -1, "All function nodes should be bound at this point."); // default info is -1, it means if not bounded, it should be -1, not 0!! 212Debug.Assert(this.info > -1, "Optimizing unbound function "); // default info is -1, it means if not bounded, it should be -1, not 0!! 258Debug.Assert(argumentCount == 1, "Invalid argument argumentCount for " + funcs[info].name + " : " + argumentCount.ToString(FormatProvider)); 269Debug.Assert(argumentCount == 1, "Invalid argument argumentCount for " + funcs[info].name + " : " + argumentCount.ToString(FormatProvider)); 286Debug.Assert(argumentCount == 1, "Invalid argument argumentCount for " + funcs[info].name + " : " + argumentCount.ToString(FormatProvider)); 290Debug.Assert(argumentCount == 1, "Invalid argument argumentCount for " + funcs[info].name + " : " + argumentCount.ToString(FormatProvider)); 294Debug.Assert(argumentCount == 1, "Invalid argument argumentCount for " + funcs[info].name + " : " + argumentCount.ToString(FormatProvider)); 298Debug.Assert(argumentCount == 1, "Invalid argument argumentCount for " + funcs[info].name + " : " + argumentCount.ToString(FormatProvider)); 302Debug.Assert(argumentCount == 2, "Invalid argument argumentCount for " + funcs[info].name + " : " + argumentCount.ToString(FormatProvider)); 304Debug.Assert(argumentValues[0] is string, "Invalid argument type for " + funcs[info].name); 305Debug.Assert(argumentValues[1] is string, "Invalid argument type for " + funcs[info].name); 319Debug.Assert(argumentCount == 3, "Invalid argument argumentCount: " + argumentCount.ToString(FormatProvider)); 336Debug.Assert(argumentCount == 2, "Invalid argument argumentCount: "); 344Debug.Assert(argumentCount == 1, "Invalid argument argumentCount for " + funcs[info].name + " : " + argumentCount.ToString(FormatProvider)); 345Debug.Assert((argumentValues[0] is string)||(argumentValues[0] is SqlString), "Invalid argument type for " + funcs[info].name); 360Debug.Assert(argumentCount == 3, "Invalid argument argumentCount: " + argumentCount.ToString(FormatProvider)); 361Debug.Assert((argumentValues[0] is string)||(argumentValues[0] is SqlString), "Invalid first argument " + argumentValues[0].GetType().FullName + " in " + funcs[info].name); 362Debug.Assert(argumentValues[1] is int, "Invalid second argument " + argumentValues[1].GetType().FullName + " in " + funcs[info].name); 363Debug.Assert(argumentValues[2] is int, "Invalid third argument " + argumentValues[2].GetType().FullName + " in " + funcs[info].name); 400Debug.Assert(argumentCount == 1, "Invalid argument argumentCount for " + funcs[info].name + " : " + argumentCount.ToString(FormatProvider)); 401Debug.Assert((argumentValues[0] is string)||(argumentValues[0] is SqlString), "Invalid argument type for " + funcs[info].name);
fx\src\data\System\Data\Filter\LookupNode.cs (2)
57Debug.Assert(relation != null, "Invalid relation: no parent table."); 58Debug.Assert(columnName != null, "All Lookup expressions have columnName set.");
fx\src\data\System\Data\Filter\NameNode.cs (3)
63Debug.Assert(column != null, "Failed to bind column " + name); 153Debug.Assert(text[checked((int)pos-1)] == '`', "Invalid identifyer bracketing, pos = " + pos.ToString(CultureInfo.InvariantCulture) + ", end = " + text[checked((int)pos-1)].ToString(CultureInfo.InvariantCulture)); 160Debug.Assert(text[checked((int)pos-1)] == ']', "Invalid identifyer bracketing of name " + new string(text, start, pos-start) + " pos = " + pos.ToString(CultureInfo.InvariantCulture) + ", end = " + text[checked((int)pos-1)].ToString(CultureInfo.InvariantCulture));
fx\src\data\System\Data\Filter\UnaryNode.cs (1)
110Debug.Assert(false, "Missing a type conversion");
fx\src\data\System\Data\Filter\ZeroOpNode.cs (2)
25Debug.Assert(op == Operators.True || op == Operators.False || op == Operators.Null, "Invalid zero-op"); 40Debug.Assert(op == Operators.True || op == Operators.False || op == Operators.Null, "Invalid zero-op");
fx\src\data\System\Data\ForeignKeyConstraint.cs (6)
336Debug.Assert(false, "Unknown Rule value"); 445Debug.Assert(false, "Unknown Rule value"); 458Debug.Assert(Table.DataSet != null, "Relation " + ConstraintName + " isn't part of a DataSet, so this check shouldn't be happening."); 467Debug.Assert(Table.DataSet != null, "ForeignKeyConstraint " + ConstraintName + " isn't part of a DataSet, so this check shouldn't be happening."); 491Debug.Assert(false, "attempt to cascade unknown action: " + ((Enum) action).ToString()); 669Debug.Assert(this.Table == this.RelatedTable, "We call this clone just if we have the same datatable as parent and child ");
fx\src\data\System\Data\Merger.cs (3)
229Debug.Assert(MissingSchemaAction.Ignore == missingSchemaAction, "MergeSchema failed"); 433Debug.Assert(MissingSchemaAction.Error == missingSchemaAction || 519Debug.Assert(MissingSchemaAction.Error == missingSchemaAction, "Unexpected value of MissingSchemaAction parameter : " + ((Enum) missingSchemaAction).ToString());
fx\src\data\System\Data\Odbc\Odbc32.cs (2)
154Debug.Assert(false, "Unknown enumerator passed to RetcodeToString method"); 736Debug.Assert(retcode!=ODBC32.RetCode.INVALID_HANDLE, "retcode must never be ODBC32.RetCode.INVALID_HANDLE");
fx\src\data\System\Data\Odbc\OdbcCommand.cs (3)
248Debug.Assert(null == _cmdWrapper, "has CMDWrapper when setting connection"); 382Debug.Assert(null != _connection, "GetStatementHandle without connection?"); 725Debug.Assert(false, "ExecuteReaderObjectcalled with unsupported ODBC API method.");
fx\src\data\System\Data\Odbc\OdbcCommandBuilder.cs (2)
218Debug.Assert(false, "Unexpected Parametertype while DeriveParamters"); 275Debug.Assert(adapter is OdbcDataAdapter, "!OdbcDataAdapter");
fx\src\data\System\Data\Odbc\OdbcConnection.cs (15)
51Debug.Assert(null == _connectionHandle, "reopening a connection?"); 154Debug.Assert(null != this.PoolGroup, "PoolGroup must never be null when accessing ProviderInfo"); 247Debug.Assert((escapeCharString.Length <= 1), "Can't handle multichar quotes"); 258Debug.Assert((quoteCharString.Length <= 1), "Can't handle multichar quotes"); 463Debug.Assert(retcode!=ODBC32.RetCode.INVALID_HANDLE, "retcode must never be ODBC32.RetCode.INVALID_HANDLE"); 494Debug.Assert(null == e, "success exception"); 497Debug.Assert(null != e, "failure without exception"); 630Debug.Assert (false, "Can't flag unknown Attribute"); 647Debug.Assert (false, "Can't flag unknown Attribute"); 661Debug.Assert (false, "Can't flag unknown Attribute"); 668Debug.Assert (false, "Can't flag unknown Attribute"); 678Debug.Assert ((Int16) odbcFunction != 0,"SQL_API_ALL_FUNCTIONS is not supported"); 684Debug.Assert (false, "GetFunctions called and ConnectionHandle is null (connection is disposed?)"); 728Debug.Assert(false, "Testing that sqltype is currently not supported"); 760Debug.Assert(false, "Testing that sqltype is currently not supported");
fx\src\data\System\Data\Odbc\OdbcConnectionFactory.cs (4)
43Debug.Assert(!ADP.IsEmpty(connectionString), "empty connectionString"); 65Debug.Assert (internalConnection != null,"internalConnection may not be null."); 69Debug.Assert(odbcOuterConnection != null,"outer connection may not be null."); 112Debug.Assert (XMLStream != null,"XMLstream may not be null.");
fx\src\data\System\Data\Odbc\OdbcConnectionHandle.cs (3)
67Debug.Assert(HandleState.Connected <= _handleState, "AutoCommitOff while in wrong state?"); 186Debug.Assert(HandleState.Allocated == _handleState, "SQLDriverConnect while in wrong state?"); 219Debug.Assert(HandleState.Allocated == _handleState, "not expected HandleState.Allocated");
fx\src\data\System\Data\Odbc\OdbcConnectionStringbuilder.cs (4)
55Debug.Assert(2 == hash.Count, "initial expected size is incorrect"); 89Debug.Assert(false, "unexpected keyword"); 209Debug.Assert(false, "unexpected keyword"); 280Debug.Assert(false, "unexpected keyword");
fx\src\data\System\Data\Odbc\OdbcDataReader.cs (23)
70Debug.Assert(command != null, "Command null on OdbcDataReader ctor"); 81Debug.Assert(false, "object is disposed"); 306Debug.Assert(null != Connection, "null cmd connection"); 825Debug.Assert(lengthOrIndicator >= 0 || lengthOrIndicator == ODBC32.SQL_NO_TOTAL, "unexpected lengthOrIndicator value"); 865Debug.Assert(lengthOrIndicator >= 0 || lengthOrIndicator == ODBC32.SQL_NO_TOTAL, "unexpected lengthOrIndicator value"); 876Debug.Assert(cbMissing == -1 && lengthOrIndicator <= cbMaxData); 986Debug.Assert((cachedObj != null), "internalGetString should always return non-null or raise exception"); 990Debug.Assert((cachedObj != null), "internalGetBytes should always return non-null or raise exception"); 1161Debug.Assert(bufferIndex >= 0, "Negative buffer index"); 1162Debug.Assert(bytesOrCharsLength >= 0, "Negative number of bytes or chars to read"); 1165Debug.Assert(buffer == null || bytesOrCharsLength <= (buffer.Length - bufferIndex), "Not enough space in user's buffer"); 1230Debug.Assert((cbTotal > 0), "GetData returned negative value, which is not SQL_NO_TOTAL"); 1301Debug.Assert(flag, "internalGetBytes - unexpected invalid result inside if-block"); 1440Debug.Assert (false, "Non-V3 driver. Must not call GetDescFieldStr"); 1512Debug.Assert (null != StatementHandle, "Statement handle is null in DateReader"); 1515Debug.Assert(this.dataCache == null || !Convert.IsDBNull(this.dataCache[i]), "Cannot call GetData without checking for cache first!"); 1520Debug.Assert(cb <= Buffer.Length-2, "GetData needs to Reallocate. Perf bug"); 1678Debug.Assert(!disposing || !allresults, "both disposing & allresults are true"); 1749Debug.Assert(!disposing, "errors while disposing"); 2048Debug.Assert(buffer.Length >= 264, "Native buffer to small (_buffer.Length < 264)"); 2214Debug.Assert(buffer.Length >= 544, "Native buffer to small (_buffer.Length < 544)"); 2516Debug.Assert (str.Length > 1, "Illegal string, only one char that is a quote"); 2517Debug.Assert (str[str.Length-1] == quoteChar, "Missing quote at end of string that begins with quote");
fx\src\data\System\Data\Odbc\OdbcHandle.cs (5)
44Debug.Assert(null == parentHandle, "did not expect a parent handle"); 50Debug.Assert(null != parentHandle, "expected a parent handle"); // safehandle can't be null 57Debug.Assert(false, "unexpected handleType"); 88Debug.Assert((ODBC32.SQL_ATTR.APP_PARAM_DESC == attribute) || (ODBC32.SQL_ATTR.APP_ROW_DESC == attribute), "invalid attribute"); 156Debug.Assert(ADP.PtrZero == handle, "unknown handle type");
fx\src\data\System\Data\Odbc\odbcmetadatafactory.cs (1)
481Debug.Assert(allRestrictions.Length >= restrictionsCount);
fx\src\data\System\Data\Odbc\OdbcParameter.cs (8)
309Debug.Assert((ODBC32.SQL_C.WCHAR == _bindtype._sql_c) || (ODBC32.SQL_C.BINARY == _bindtype._sql_c), "not wchar or binary"); 374Debug.Assert((0 <= cch) && (cch < 0x3fffffff), String.Format((IFormatProvider)null, "GetColumnSize: cch = {0} out of range, _internalShouldSerializeSize = {1}, _internalSize = {2}",cch, _internalShouldSerializeSize, _internalSize)); 410Debug.Assert((0 <= cch) && (cch < 0x3fffffff), String.Format((IFormatProvider)null, "GetValueSize: cch = {0} out of range, _internalShouldSerializeSize = {1}, _internalSize = {2}",cch, _internalShouldSerializeSize, _internalSize)); 425Debug.Assert((ODBC32.SQL_C.WCHAR == _bindtype._sql_c) || (ODBC32.SQL_C.BINARY == _bindtype._sql_c), "not wchar or binary"); 468Debug.Assert((0 <= ccb) && (ccb < 0x3fffffff), "GetParameterSize: out of range " + ccb); 857Debug.Assert(ODBC32.SQL_C.NUMERIC == _typemap._sql_c, "unexpected"); 899Debug.Assert(null != _typemap, "GetParameterValue: null _typemap"); 965Debug.Assert (false, "Unexpected Direction Property on Parameter");
fx\src\data\System\Data\Odbc\OdbcReferenceCollection.cs (3)
33Debug.Assert(false, "shouldn't be here"); 41Debug.Assert(false, "shouldn't be here"); 45Debug.Assert(false, "shouldn't be here");
fx\src\data\System\Data\Odbc\OdbcUtils.cs (14)
39Debug.Assert((cb > 0), "Character count negative "); 40Debug.Assert((Length >= cb), "Native buffer too small "); 47Debug.Assert((cb > 0), "Character count negative "); 48Debug.Assert((Length >= cb), "Native buffer too small "); 145Debug.Assert (false, "UnknownSQLCType"); 168Debug.Assert(value is string || value is char[],"Only string or char[] can be marshaled to WCHAR"); 178Debug.Assert(rgChars.Length < (base.Length - valueOffset), "attempting to extend parameter buffer!"); 189Debug.Assert(rgChars.Length < (base.Length - valueOffset), "attempting to extend parameter buffer!"); 203Debug.Assert ((valueOffset <= length), "Offset out of Range" ); 217Debug.Assert(length < (base.Length - valueOffset), "attempting to extend parameter buffer!"); 310Debug.Assert (false, "UnknownSQLCType"); 432Debug.Assert((_sqlstatement[curidx] == '['), "GetTokenFromQuote: character at starting position must be same as quotechar"); 446Debug.Assert(_quote != ' ', "ODBC driver doesn't support quoted identifiers -- GetTokenFromQuote should not be used in this case"); 447Debug.Assert((_sqlstatement[curidx] == _quote), "GetTokenFromQuote: character at starting position must be same as quotechar");
fx\src\data\System\Data\OleDb\ColumnBinding.cs (111)
58Debug.Assert(null != rowbinding, "null rowbinding"); 59Debug.Assert(null != bindings, "null bindings"); 60Debug.Assert(ODB.SizeOf_tagDBBINDING <= offset, "invalid offset" + offset); 77Debug.Assert(0 <= _offsetStatus, "negative _offsetStatus"); 78Debug.Assert(0 <= _offsetLength, "negative _offsetLength"); 79Debug.Assert(0 <= _offsetValue, "negative _offsetValue"); 146Debug.Assert(null != _dataReader, "null DataReader"); 151Debug.Assert((null != _parameter) && (null != parameter), "null parameter"); 172Debug.Assert(0 <= value, "negative LengthValue"); 177Debug.Assert(null != _parameter, "null parameter"); 534Debug.Assert(false, "unknown DBTYPE"); 557Debug.Assert((NativeDBType.BOOL == DbType), "Value_BOOL"); 558Debug.Assert((DBStatus.S_OK == StatusValue()), "Value_BOOL"); 563Debug.Assert((NativeDBType.BOOL == DbType), "Value_BOOL"); 570Debug.Assert((NativeDBType.BSTR == DbType), "Value_BSTR"); 571Debug.Assert((DBStatus.S_OK == StatusValue()), "Value_BSTR"); 591Debug.Assert((null != value), "Value_BSTR null"); 592Debug.Assert((NativeDBType.BSTR == DbType), "Value_BSTR"); 599Debug.Assert(((NativeDBType.BYREF | NativeDBType.BYTES) == DbType), "Value_ByRefBYTES"); 600Debug.Assert((DBStatus.S_OK == StatusValue()), "Value_ByRefBYTES"); 621Debug.Assert(null != value, "Value_ByRefBYTES null"); 622Debug.Assert((NativeDBType.BYREF | NativeDBType.BYTES) == DbType, "Value_ByRefBYTES"); 640Debug.Assert((NativeDBType.BYREF | NativeDBType.WSTR) == DbType, "Value_ByRefWSTR"); 641Debug.Assert((DBStatus.S_OK == StatusValue()) || (DBStatus.S_TRUNCATED == StatusValue()), "Value_ByRefWSTR"); 662Debug.Assert(null != value, "Value_ByRefWSTR null"); 663Debug.Assert((NativeDBType.BYREF | NativeDBType.WSTR) == DbType, "Value_ByRefWSTR"); 679Debug.Assert(null != value, "Value_ByRefWSTR null"); 680Debug.Assert((NativeDBType.BYREF | NativeDBType.WSTR) == DbType, "Value_ByRefWSTR"); 697Debug.Assert(NativeDBType.BYTES == DbType, "Value_BYTES"); 698Debug.Assert((DBStatus.S_OK == StatusValue()) || (DBStatus.S_TRUNCATED == StatusValue()), "Value_BYTES"); 705Debug.Assert(null != value, "Value_BYTES null"); 716Debug.Assert(NativeDBType.CY == DbType, "Value_CY"); 717Debug.Assert(DBStatus.S_OK == StatusValue(), "Value_CY"); 721Debug.Assert(NativeDBType.CY == DbType, "Value_CY"); 728Debug.Assert(NativeDBType.DATE == DbType, "Value_DATE"); 729Debug.Assert(DBStatus.S_OK == StatusValue(), "Value_DATE"); 733Debug.Assert(NativeDBType.DATE == DbType, "Value_DATE"); 740Debug.Assert(NativeDBType.DBDATE == DbType, "Value_DBDATE"); 741Debug.Assert(DBStatus.S_OK == StatusValue(), "Value_DBDATE"); 745Debug.Assert(NativeDBType.DBDATE == DbType, "Value_DATE"); 752Debug.Assert(NativeDBType.DBTIME == DbType, "Value_DBTIME"); 753Debug.Assert(DBStatus.S_OK == StatusValue(), "Value_DBTIME"); 757Debug.Assert(NativeDBType.DBTIME == DbType, "Value_DBTIME"); 764Debug.Assert(NativeDBType.DBTIMESTAMP == DbType, "Value_DBTIMESTAMP"); 765Debug.Assert(DBStatus.S_OK == StatusValue(), "Value_DBTIMESTAMP"); 769Debug.Assert(NativeDBType.DBTIMESTAMP == DbType, "Value_DBTIMESTAMP"); 776Debug.Assert(NativeDBType.DECIMAL == DbType, "Value_DECIMAL"); 777Debug.Assert(DBStatus.S_OK == StatusValue(), "Value_DECIMAL"); 788Debug.Assert(NativeDBType.DECIMAL == DbType, "Value_DECIMAL"); 807Debug.Assert(NativeDBType.ERROR == DbType, "Value_ERROR"); 808Debug.Assert(DBStatus.S_OK == StatusValue(), "Value_ERROR"); 812Debug.Assert(NativeDBType.ERROR == DbType, "Value_ERROR"); 819Debug.Assert(NativeDBType.FILETIME == DbType, "Value_FILETIME"); 820Debug.Assert(DBStatus.S_OK == StatusValue(), "Value_FILETIME"); 825Debug.Assert(NativeDBType.FILETIME == DbType, "Value_FILETIME"); 833Debug.Assert(NativeDBType.GUID == DbType, "Value_GUID"); 834Debug.Assert(DBStatus.S_OK == StatusValue(), "Value_GUID"); 838Debug.Assert(NativeDBType.GUID == DbType, "Value_GUID"); 846Debug.Assert(NativeDBType.HCHAPTER == DbType, "Value_HCHAPTER"); 847Debug.Assert(DBStatus.S_OK == StatusValue(), "Value_HCHAPTER"); 853Debug.Assert(NativeDBType.I1 == DbType, "Value_I1"); 854Debug.Assert(DBStatus.S_OK == StatusValue(), "Value_I1"); 859Debug.Assert(NativeDBType.I1 == DbType, "Value_I1"); 866Debug.Assert(NativeDBType.I2 == DbType, "Value_I2"); 867Debug.Assert(DBStatus.S_OK == StatusValue(), "Value_I2"); 871Debug.Assert(NativeDBType.I2 == DbType, "Value_I2"); 878Debug.Assert(NativeDBType.I4 == DbType, "Value_I4"); 879Debug.Assert(DBStatus.S_OK == StatusValue(), "Value_I4"); 883Debug.Assert(NativeDBType.I4 == DbType, "Value_I4"); 890Debug.Assert(NativeDBType.I8 == DbType, "Value_I8"); 891Debug.Assert(DBStatus.S_OK == StatusValue(), "Value_I8"); 895Debug.Assert(NativeDBType.I8 == DbType, "Value_I8"); 902Debug.Assert(NativeDBType.IDISPATCH == DbType, "Value_IDISPATCH"); 903Debug.Assert(DBStatus.S_OK == StatusValue(), "Value_IDISPATCH"); 923Debug.Assert(NativeDBType.IDISPATCH == DbType, "Value_IDISPATCH"); 931Debug.Assert(NativeDBType.IUNKNOWN == DbType, "Value_IUNKNOWN"); 932Debug.Assert(DBStatus.S_OK == StatusValue(), "Value_IUNKNOWN"); 952Debug.Assert(NativeDBType.IUNKNOWN == DbType, "Value_IUNKNOWN"); 960Debug.Assert(NativeDBType.NUMERIC == DbType, "Value_NUMERIC"); 961Debug.Assert(DBStatus.S_OK == StatusValue(), "Value_NUMERIC"); 965Debug.Assert(NativeDBType.NUMERIC == DbType, "Value_NUMERIC"); 979Debug.Assert(NativeDBType.R4 == DbType, "Value_R4"); 980Debug.Assert(DBStatus.S_OK == StatusValue(), "Value_R4"); 985Debug.Assert(NativeDBType.R4 == DbType, "Value_R4"); 992Debug.Assert(NativeDBType.R8 == DbType, "Value_R8"); 993Debug.Assert(DBStatus.S_OK == StatusValue(), "Value_R8"); 998Debug.Assert(NativeDBType.R8 == DbType, "Value_I4"); 1005Debug.Assert(NativeDBType.UI1 == DbType, "Value_UI1"); 1006Debug.Assert(DBStatus.S_OK == StatusValue(), "Value_UI1"); 1010Debug.Assert(NativeDBType.UI1 == DbType, "Value_UI1"); 1017Debug.Assert(NativeDBType.UI2 == DbType, "Value_UI2"); 1018Debug.Assert(DBStatus.S_OK == StatusValue(), "Value_UI2"); 1022Debug.Assert(NativeDBType.UI2 == DbType, "Value_UI2"); 1029Debug.Assert(NativeDBType.UI4 == DbType, "Value_UI4"); 1030Debug.Assert(DBStatus.S_OK == StatusValue(), "Value_UI4"); 1034Debug.Assert(NativeDBType.UI4 == DbType, "Value_UI4"); 1041Debug.Assert(NativeDBType.UI8 == DbType, "Value_UI8"); 1042Debug.Assert(DBStatus.S_OK == StatusValue(), "Value_UI8"); 1046Debug.Assert(NativeDBType.UI8 == DbType, "Value_UI8"); 1053Debug.Assert(NativeDBType.WSTR == DbType, "Value_WSTR"); 1054Debug.Assert((DBStatus.S_OK == StatusValue()) || (DBStatus.S_TRUNCATED == StatusValue()), "Value_WSTR"); 1055Debug.Assert(2 < ColumnBindingMaxLen, "Value_WSTR"); 1060Debug.Assert(null != value, "Value_BYTES null"); 1061Debug.Assert(NativeDBType.WSTR == DbType, "Value_WSTR"); 1073Debug.Assert(null != value, "Value_BYTES null"); 1074Debug.Assert(NativeDBType.WSTR == DbType, "Value_WSTR"); 1085Debug.Assert((NativeDBType.VARIANT == DbType) || (NativeDBType.PROPVARIANT == DbType), "Value_VARIANT"); 1086Debug.Assert(DBStatus.S_OK == StatusValue(), "Value_VARIANT"); 1090Debug.Assert((NativeDBType.VARIANT == DbType) || (NativeDBType.PROPVARIANT == DbType), "Value_VARIANT"); 1466Debug.Assert(false, "CheckStatusValue: unhandled data with ok status"); 1469Debug.Assert(false, "CheckStatusValue: unhandled data with truncated status");
fx\src\data\System\Data\OleDb\DBBindings.cs (14)
75Debug.Assert((0 <= value) && (value < _count), "bad binding index"); 81Debug.Assert(null != _columnBindings, "null ColumnBindings"); 86Debug.Assert(null != _parameters, "null Parameters"); 165Debug.Assert(0 <= value, "invalid MaxLen"); 226Debug.Assert(null == _rowBinding, "row binding already allocated"); 227Debug.Assert(null == _columnBindings, "column bindings already allocated"); 233Debug.Assert(null != columnBindings, "null column bindings"); 237Debug.Assert(columnBindings.Length == _dbcolumns.Length, "length mismatch"); 286Debug.Assert(null != collection, "null parameter collection"); 287Debug.Assert(null != _parameters, "null parameters"); 294Debug.Assert(null != binding, "null column binding"); 295Debug.Assert(binding.Parameter() == _parameters[i], "parameter mismatch"); 331Debug.Assert(null != _rowBinding, "no row binding"); 332Debug.Assert(null != _columnBindings, "no column bindings");
fx\src\data\System\Data\OleDb\DBPropSet.cs (6)
50Debug.Assert(null != properties, "null IDBProperties"); 67Debug.Assert(null != properties, "null IRowsetInfo"); 84Debug.Assert(null != properties, "null ICommandProperties"); 200Debug.Assert(Guid.Empty != propertySet, "invalid propertySet"); 201Debug.Assert((null != properties) && (0 < properties.Length), "invalid properties"); 231Debug.Assert(null != properties[i], "null tagDBPROP " + i.ToString(CultureInfo.InvariantCulture));
fx\src\data\System\Data\OleDb\OLEDB_Util.cs (5)
52Debug.Assert(false, "CommandParameterStatus: unexpected E_CANTCREATE"); 61Debug.Assert(false, "CommandParameterStatus: unexpected E_PERMISSIONDENIED"); 65Debug.Assert(false, "CommandParameterStatus: unexpected E_INTEGRITYVIOLATION"); 69Debug.Assert(false, "CommandParameterStatus: unexpected E_SCHEMAVIOLATION"); 73Debug.Assert(false, "CommandParameterStatus: unexpected E_BADSTATUS");
fx\src\data\System\Data\OleDb\OleDbCommand.cs (18)
347Debug.Assert(null != _icommandText, "IAccessor: null ICommandText"); 354Debug.Assert(null != _icommandText, "ICommandProperties: null ICommandText"); 361Debug.Assert(null != _icommandText, "ICommandPrepare: null ICommandText"); 368Debug.Assert(null != _icommandText, "ICommandWithParameters: null ICommandText"); 377Debug.Assert(System.Data.CommandType.Text == CommandType || System.Data.CommandType.StoredProcedure == CommandType, "CreateAccessor: incorrect CommandType"); 378Debug.Assert(null == _dbBindings, "CreateAccessor: already has dbBindings"); 379Debug.Assert(HasParameters(), "CreateAccessor: unexpected, no parameter collection"); 480Debug.Assert(null != _connection, "no connection, CloseInternal"); 492Debug.Assert(_dbBindings == bindings, "bindings with two owners"); 518Debug.Assert(null != _connection, "no connection, CloseInternalParameters"); 638Debug.Assert(false, "ExecuteReaderInternal: unknown result type"); 658Debug.Assert(null != dataReader, "ExecuteReader should never return a null DataReader"); 774Debug.Assert(0 == (CommandBehavior.SingleRow & this.commandBehavior), "SingleRow implies SingleResult"); 808Debug.Assert(_executeQuery, "ExecuteNonQuery should always use ExecuteCommandTextForSingleResult"); 845Debug.Assert(null != e, "missing inner exception"); 1029Debug.Assert(null != _connection, "ExpandStoredProcedureToText: null Connection"); 1046Debug.Assert(null != _connection, "InitializeCommand: null OleDbConnection"); 1186Debug.Assert(!_isPrepared, "null command isPrepared");
fx\src\data\System\Data\OleDb\OleDbCommandBuilder.cs (1)
355Debug.Assert(adapter is OleDbDataAdapter, "!OleDbDataAdapter");
fx\src\data\System\Data\OleDb\OleDbConnection.cs (11)
244Debug.Assert(false, "Unknown 'Connection Status' value " + connectionStatus.ToString("G", CultureInfo.InvariantCulture)); 269Debug.Assert(null != GetOpenConnection(), "ICommandText closed"); 274Debug.Assert(null != GetOpenConnection(), "IDBProperties closed"); 279Debug.Assert(null != GetOpenConnection(), "IOpenRowset closed"); 284Debug.Assert(null != this.OleDbConnectionStringValue, "no OleDbConnectionString SqlSupport"); 289Debug.Assert(null != this.OleDbConnectionStringValue, "no OleDbConnectionString SupportMultipleResults"); 294Debug.Assert(null != this.OleDbConnectionStringValue, "no OleDbConnectionString SupportIRow"); 299Debug.Assert(null != this.OleDbConnectionStringValue, "no OleDbConnectionString QuotedIdentifierCase"); 482Debug.Assert(null != GetOpenConnection(), "GetSchemaRowset closed"); 550Debug.Assert(1 == propSet.PropertySetCount, "too many PropertySets"); 553Debug.Assert(1 == dbprops.Length, "too many Properties");
fx\src\data\System\Data\OleDb\OleDbConnectionFactory.cs (4)
43Debug.Assert(!ADP.IsEmpty(connectionString), "null connectionString"); 55Debug.Assert (internalConnection != null,"internalConnection may not be null."); 61Debug.Assert(oleDbOuterConnection != null,"outer connection may not be null."); 98Debug.Assert (XMLStream != null,"XMLstream may not be null.");
fx\src\data\System\Data\OleDb\OleDbConnectionInternal.cs (20)
91Debug.Assert((null != constr) && !constr.IsEmpty, "empty connectionstring"); 106Debug.Assert(!_datasrcwrp.IsInvalid, "bad DataSource"); 124Debug.Assert(null != e, "CreateSessionError"); 127Debug.Assert(!_sessionwrp.IsInvalid, "bad Session"); 189Debug.Assert(null != _datasrcwrp, "IDBProperties: null datasource"); 195Debug.Assert(null != _datasrcwrp, "IOpenRowset: null datasource"); 196Debug.Assert(null != _sessionwrp, "IOpenRowset: null session"); 202Debug.Assert(null != _datasrcwrp, "IDBInfo: null datasource"); 208Debug.Assert(null != _datasrcwrp, "IDBSchemaRowset: null datasource"); 209Debug.Assert(null != _sessionwrp, "IDBSchemaRowset: null session"); 215Debug.Assert(null != _datasrcwrp, "ITransactionJoin: null datasource"); 216Debug.Assert(null != _sessionwrp, "ITransactionJoin: null session"); 222Debug.Assert(null != _datasrcwrp, "IDBCreateCommand: null datasource"); 223Debug.Assert(null != _sessionwrp, "IDBCreateCommand: null session"); 228Debug.Assert((0 <= hr) || (null == icommandText), "CreateICommandText: error with ICommandText"); 258Debug.Assert(null != _datasrcwrp, "ITransactionLocal: null datasource"); 259Debug.Assert(null != _sessionwrp, "ITransactionLocal: null session"); 297Debug.Assert(null == LocalTransaction, "why was Deactivate not called first"); 680Debug.Assert(null != wrapper, "GetObjectPool: null dataInitialize"); 713Debug.Assert(null != head, "unexcpted Transaction state");
fx\src\data\System\Data\OleDb\oledbconnectionstring.cs (3)
142Debug.Assert(!ADP.IsEmpty(this[KEY.Provider]), "no Provider"); 246Debug.Assert(!ADP.IsEmpty(udlfilename), "empty filename didn't fail"); 249Debug.Assert(udlfilename == ADP.GetFullPath(udlfilename), "only cache full path filenames"); // MDAC 82833
fx\src\data\System\Data\OleDb\OledbConnectionStringbuilder.cs (5)
72Debug.Assert(5 == hash.Count, "initial expected size is incorrect"); 116Debug.Assert(false, "unexpected keyword"); 297Debug.Assert(false, "unexpected keyword"); 339Debug.Assert(false, "unexpected keyword"); 568Debug.Assert(false, "new standard propertyid");
fx\src\data\System\Data\OleDb\OleDbDataAdapter.cs (4)
217Debug.Assert(null != data, "FillFromADODB: null data object"); 218Debug.Assert(null != adodb, "FillFromADODB: null ADODB"); 219Debug.Assert(!(adodb is DataTable), "call Fill( (DataTable) value)"); 220Debug.Assert(!(adodb is DataSet), "call Fill( (DataSet) value)");
fx\src\data\System\Data\OleDb\OleDbDataReader.cs (54)
123Debug.Assert(_singleRow, "SingleRow not already set"); 170Debug.Assert((_singleRow && !_isClosed && !_isRead && (null == _irow) && (null == _irowset)) || 227Debug.Assert(false, "object is disposed"); 236Debug.Assert(false, "object is disposed"); 269Debug.Assert(null == _metadata, "BuildMetaInfo: already built, by _metadata"); 282Debug.Assert(null != _bindings, "unexpected dbBindings"); 299Debug.Assert(null == _dbSchemaTable, "BuildSchemaTable: schema table already exists"); 300Debug.Assert(null != metadata, "BuildSchemaTable: no _metadata"); 420Debug.Assert(null == _dbSchemaTable, "non-null SchemaTable"); 421Debug.Assert(null == _metadata, "non-null metadata"); 422Debug.Assert(null != handle, "unexpected null rowset"); 459Debug.Assert(0 < columnCount, "BuildSchemaTableInfoTable - no column"); 515Debug.Assert(ODB.DBKIND_PGUID_NAME != dbColumnInfo.columnid.eKind, "OLE DB providers never return pGuid-style bindings."); 516Debug.Assert(ODB.DBKIND_PGUID_PROPID != dbColumnInfo.columnid.eKind, "OLE DB providers never return pGuid-style bindings."); 559Debug.Assert(null == _dbSchemaTable, "BuildSchemaTableRowset - non-null SchemaTable"); 560Debug.Assert(null != handle, "BuildSchemaTableRowset(object) - unexpected null handle"); 571Debug.Assert((0 == hr) || prgOptColumns.IsInvalid, "GetAvailableCOlumns: unexpected return"); 578Debug.Assert((0 <= hr) || (null == rowset), "if GetColumnsRowset failed, rowset should be null"); 956Debug.Assert(null != _metadata[index].columnName, "MDAC 66681"); 1001Debug.Assert(null != binding, "null binding"); 1005Debug.Assert(_nextAccessorForRetrieval <= binding.IndexForAccessor, "backwards index for accessor"); 1006Debug.Assert(_nextAccessorForRetrieval == i, "failed to increment"); 1098Debug.Assert(!_hasRowsReadCheck, "_hasRowsReadCheck not reset"); 1142Debug.Assert(OleDbHResult.DB_E_OBJECTOPEN == hr, "unexpected"); 1172Debug.Assert(false, "<oledb.OleDbDataReader.NextResultsInfinite|INFO> System.Data.OleDb.OleDbDataReader: 2000 IMultipleResult.GetResult(NULL, DBRESULTFLAG_DEFAULT, IID_NULL, NULL, NULL) iterations with 0 records affected. Stopping suspect infinite loop. To work-around try using ExecuteReader() and iterating through results with NextResult().\n"); 1192Debug.Assert(null == _irow, "NextResult: row loop check"); 1193Debug.Assert(null == _irowset, "NextResult: rowset loop check"); 1290Debug.Assert(null != _irowset, "ReadRow: null IRowset"); 1291Debug.Assert(0 <= _metadata.Length, "incorrect state for fieldCount"); 1302Debug.Assert(0 == _currentRow, "incorrect state for _currentRow"); 1303Debug.Assert(0 <= _metadata.Length, "incorrect state for fieldCount"); 1304Debug.Assert(0 == _nextAccessorForRetrieval, "incorrect state for nextAccessorForRetrieval"); 1305Debug.Assert(0 == _nextValueForRetrieval, "incorrect state for nextValueForRetrieval"); 1314Debug.Assert(null != _irowset, "ReleaseCurrentRow: no rowset"); 1320Debug.Assert(null != bindings, "ReleaseCurrentRow: null dbBindings"); 1335Debug.Assert(null == _bindings, "CreateAccessor: dbBindings already exists"); 1336Debug.Assert(null != _irowset, "CreateAccessor: no IRowset available"); 1337Debug.Assert(null != _metadata && 0 < _metadata.Length, "no columns"); 1430Debug.Assert(indexToBinding[index] < dbbindings.Length, "bad indexToAccessor"); 1448Debug.Assert(NativeDBType.STR != getType, "Should have bound as WSTR"); 1449Debug.Assert(!NativeDBType.HasHighBit(getType), "CreateAccessor - unexpected high bits on datatype"); 1520Debug.Assert(count == columnBindings[k].Index, "column binding mismatch"); 1532Debug.Assert(0 < (int)_rowHandleFetchCount, "GetRowHandles: bad _rowHandleFetchCount"); 1533Debug.Assert(!_isRead, "GetRowHandles: _isRead"); 1550Debug.Assert(rowHandleBuffer.DangerousGetHandle() == rowHandlesPtr, "rowhandlebuffer changed"); 1578Debug.Assert(null != _bindings, "GetRowDataFromHandle: null dbBindings"); 1579Debug.Assert(null != _rowHandleNativeBuffer, "GetRowDataFromHandle: null dbBindings"); 1622Debug.Assert(0 < (int)_rowFetchedCount, "invalid _rowFetchedCount"); 1674Debug.Assert(null != _irow, "GetRowValue: null IRow"); 1675Debug.Assert(null != _metadata, "GetRowValue: null MetaData"); 1680Debug.Assert(_nextValueForRetrieval <= columnBindings[0].Index, "backwards retrieval"); 1743Debug.Assert(null != _connection, "null connection"); 1744Debug.Assert(null != _metadata, "no _metadata"); 2022Debug.Assert(null == dataReader._fieldNameLookup, "lookup already exists");
fx\src\data\System\Data\OleDb\OleDbException.cs (2)
36Debug.Assert(null != errors, "OleDbException without OleDbErrorCollection"); 119Debug.Assert(0 < exceptions.Count, "missing exceptions");
fx\src\data\System\Data\OleDb\OleDbInfoMessageEvent.cs (1)
18Debug.Assert(null != exception, "OleDbInfoMessageEventArgs without OleDbException");
fx\src\data\System\Data\OleDb\OleDbMetaDataFactory.cs (2)
382Debug.Assert(sourceColumns.Length == targetColumns.Length); 527Debug.Assert(numberOfSupportedRestictions != -1, "PrepareCollection was called for an collection that is not supported.");
fx\src\data\System\Data\OleDb\OleDbParameter.cs (7)
37Debug.Assert(!(value is OleDbType), "use OleDbParameter(string, OleDbType)"); 38Debug.Assert(!(value is SqlDbType), "use OleDbParameter(string, OleDbType)"); 333Debug.Assert(NativeDBType.STR != dbtype.wType, "should have ANSI binding, describing is okay"); 355Debug.Assert(NativeDBType.STR != dbtype.wType, "should have ANSI binding, describing is okay"); 399Debug.Assert(_changeID == changeID, "parameter has unexpectedly changed"); 409Debug.Assert(null != destinationType, "null destinationType"); 472Debug.Assert(IsParameterComputed(), "Prepare computed parameter");
fx\src\data\System\Data\OleDb\OleDbReferenceCollection.cs (1)
38Debug.Assert(false, "shouldn't be here");
fx\src\data\System\Data\OleDb\OleDbTransaction.cs (2)
55Debug.Assert(_mustComplete, "transaction already completed"); 79Debug.Assert(_mustComplete, "transaction already completed");
fx\src\data\System\Data\OleDb\OleDbWrapper.cs (8)
72Debug.Assert(null != e, "CreateProviderError"); 79Debug.Assert(!datasrcWrapper.IsInvalid, "bad DataSource"); 273Debug.Assert(constr.HaveQueriedForCreateCommand, "expected HaveQueriedForCreateCommand"); 274Debug.Assert(null != constr.DangerousIDBCreateCommandCreateCommand, "expected DangerousIDBCreateCommandCreateCommand"); 369Debug.Assert(null != _value, "null IDBProperties"); 374Debug.Assert(null != _value, "null IDBProperties"); 421Debug.Assert(null != _value, "null IOpenRowsetWrapper"); 426Debug.Assert(null != _value, "null IDBProperties");
fx\src\data\System\Data\OleDb\RowBinding.cs (29)
56Debug.Assert(0 < _bindingCount, "bad _bindingCount"); 57Debug.Assert(0 < _headerLength, "bad _headerLength"); 58Debug.Assert(0 < _dataLength, "bad _dataLength"); 59Debug.Assert(_bindingCount * 3 * IntPtr.Size <= _dataLength, "_dataLength too small"); 60Debug.Assert(_headerLength + _dataLength <= _emptyStringOffset, "bad string offset"); 61Debug.Assert(_headerLength + _dataLength + 8 <= length, "bad length"); 66Debug.Assert(false, "previous row not yet cleared"); 116else Debug.Assert(false, "unknown accessor buffer"); 125Debug.Assert(null != bindings, "null bindings"); 126Debug.Assert(dbbindings.Length == BindingCount(), "count mismatch"); 164Debug.Assert(_needToReset, "data type requires reseting and _needToReset is false"); 165Debug.Assert(0 == (ODB.SizeOf_Variant % 8), "unexpected VARIANT size mutiplier"); 166Debug.Assert(0 == offset%8, "invalid alignment"); 190Debug.Assert(_needToReset, "data type requires reseting and _needToReset is false"); 191Debug.Assert(0 == (ODB.SizeOf_Variant % 8), "unexpected VARIANT size mutiplier"); 192Debug.Assert(0 == offset%8, "invalid alignment"); 226Debug.Assert(_needToReset, "data type requires reseting and _needToReset is false"); 227Debug.Assert(0 == offset%ADP.PtrSize, "invalid alignment"); 257Debug.Assert(_needToReset, "data type requires reseting and _needToReset is false"); 258Debug.Assert(0 == offset%ADP.PtrSize, "invalid alignment"); 354Debug.Assert(ADP.PtrZero != buffer && _needToReset && _haveData, "shouldn't be calling ResetValues"); 427Debug.Assert (0 == valueOffset % 8, "unexpected unaligned ptr offset"); 441Debug.Assert (0 == valueOffset % 8, "unexpected unaligned ptr offset"); 465Debug.Assert (0 == valueOffset % 8, "unexpected unaligned ptr offset"); 490Debug.Assert(0 == (ODB.SizeOf_Variant % 8), "unexpected VARIANT size mutiplier"); 491Debug.Assert (0 == valueOffset % 8, "unexpected unaligned ptr offset"); 516Debug.Assert(0 == (NativeOledbWrapper.SizeOfPROPVARIANT % 8), "unexpected PROPVARIANT size mutiplier"); 517Debug.Assert (0 == valueOffset % 8, "unexpected unaligned ptr offset"); 541Debug.Assert(0 == offset%ADP.PtrSize, "invalid alignment");
fx\src\data\System\Data\OleDb\SafeHandles.cs (1)
96Debug.Assert(ODB.DB_NULL_HROW != value, "bad rowHandle");
fx\src\data\System\Data\ProviderBase\DataReaderContainer.cs (6)
31Debug.Assert(null != dataReader, "null dataReader"); 50Debug.Assert(null != fieldName, "null GetName"); 72Debug.Assert(null != dataReader, "null dbDataReader"); 85Debug.Assert(0 <= fieldCount, "negative FieldCount"); 92Debug.Assert(null != fieldType, "null FieldType"); 117Debug.Assert(0 <= fieldCount, "negative FieldCount");
fx\src\data\System\Data\ProviderBase\DbBuffer.cs (38)
68Debug.Assert(0 == offset%ADP.PtrSize, "invalid alignment"); 93Debug.Assert(0 == offset%ADP.PtrSize, "invalid alignment"); 115Debug.Assert(0 == offset%4, "invalid alignment"); 142Debug.Assert(0 == offset%ADP.PtrSize, "invalid alignment"); 143Debug.Assert(null != destination, "null destination"); 144Debug.Assert(startIndex + length <= destination.Length, "destination too small"); 170Debug.Assert(0 == offset%ADP.PtrSize, "invalid alignment"); 171Debug.Assert(null != destination, "null destination"); 172Debug.Assert(startIndex + length <= destination.Length, "destination too small"); 198Debug.Assert(0 == offset%2, "invalid alignment"); 220Debug.Assert(0 == offset%ADP.PtrSize, "invalid alignment"); 221Debug.Assert(null != destination, "null destination"); 222Debug.Assert(startIndex + length <= destination.Length, "destination too small"); 242Debug.Assert(0 == offset%4, "invalid alignment"); 264Debug.Assert(0 == offset%ADP.PtrSize, "invalid alignment"); 265Debug.Assert(null != destination, "null destination"); 266Debug.Assert(startIndex + length <= destination.Length, "destination too small"); 286Debug.Assert(0 == offset%IntPtr.Size, "invalid alignment"); 308Debug.Assert(0 == offset%ADP.PtrSize, "invalid alignment"); 343Debug.Assert(null != structure, "null structure"); 346Debug.Assert(0 == offset%ADP.PtrSize, "invalid alignment"); 366Debug.Assert(0 == offset%4, "invalid alignment"); 386Debug.Assert(0 == offset%ADP.PtrSize, "invalid alignment"); 387Debug.Assert(null != source, "null source"); 388Debug.Assert(startIndex + length <= source.Length, "source too small"); 408Debug.Assert(0 == offset%ADP.PtrSize, "invalid alignment"); 409Debug.Assert(null != source, "null source"); 410Debug.Assert(startIndex + length <= source.Length, "source too small"); 434Debug.Assert(0 == offset%2, "invalid alignment"); 454Debug.Assert(0 == offset%ADP.PtrSize, "invalid alignment"); 455Debug.Assert(null != source, "null source"); 456Debug.Assert(startIndex + length <= source.Length, "source too small"); 476Debug.Assert(0 == offset%4, "invalid alignment"); 496Debug.Assert(0 == offset%ADP.PtrSize, "invalid alignment"); 497Debug.Assert(null != source, "null source"); 498Debug.Assert(startIndex + length <= source.Length, "source too small"); 518Debug.Assert(0 == offset%IntPtr.Size, "invalid alignment"); 538Debug.Assert(0 == offset%IntPtr.Size, "invalid alignment");
fx\src\data\System\Data\ProviderBase\DbConnectionClosed.cs (1)
125Debug.Assert(retry.Task.Status == TaskStatus.RanToCompletion, "retry task must be completed successfully");
fx\src\data\System\Data\ProviderBase\DbConnectionFactory.cs (18)
96Debug.Assert(key != null, "key cannot be null"); 125Debug.Assert(null != owningConnection, "null owningConnection?"); 126Debug.Assert(null != poolGroup, "null poolGroup?"); 142Debug.Assert(null != pool, "null pool?"); 164Debug.Assert(key != null, "key cannot be null"); 187Debug.Assert(null != owningConnection, "null owningConnection?"); 300Debug.Assert(!(oldConnection is DbConnectionClosed), "Force new connection, but there is no old connection"); 339Debug.Assert(null != owningObject, "null owningObject?"); 340Debug.Assert(null != connectionPoolGroup, "null connectionPoolGroup?"); 359Debug.Assert(null != connectionOptions, "prevent expansion of connectionString"); 362Debug.Assert(null != connectionPoolGroup, "null connectionPoolGroup?"); 432Debug.Assert(!connectionPoolGroup.IsDisabled, "Disabled pool entry discovered"); 435Debug.Assert(null != connectionPoolGroup, "how did we not create a pool entry?"); 436Debug.Assert(null != userConnectionOptions, "how did we not have user connection options?"); 445Debug.Assert (connectionPoolGroup != null, "connectionPoolGroup may not be null."); 523Debug.Assert(!entry.Value.IsDisabled, "Disabled pool entry discovered"); 545Debug.Assert (null != pool, "null pool?"); 562Debug.Assert (null != poolGroup, "null poolGroup?");
fx\src\Data\System\Data\ProviderBase\DbConnectionHelper.cs (12)
140Debug.Assert(null != value, "null poolGroup"); 304Debug.Assert(DbConnectionClosedConnecting.SingletonInstance == _innerConnection, "not connecting"); 313Debug.Assert(null != userConnectionOptions, "null UserConnectionOptions"); 326Debug.Assert(null != _innerConnection, "null InnerConnection"); 327Debug.Assert(null != to, "to null InnerConnection"); 346Debug.Assert(false, "unexpected state switch"); 361Debug.Assert(null != _innerConnection, "null InnerConnection"); 362Debug.Assert(null != from, "from null InnerConnection"); 363Debug.Assert(null != to, "to null InnerConnection"); 373Debug.Assert(null != _innerConnection, "null InnerConnection"); 374Debug.Assert(null != to, "to null InnerConnection"); 385System.Diagnostics.Debug.Assert(false, "unexpected SecurityException for current codepath");
fx\src\data\System\Data\ProviderBase\DbConnectionInternal.cs (6)
279Debug.Assert(_pooledCount <= 1 && _pooledCount >= -1, "Pooled count for object is invalid"); 415Debug.Assert(null != owningObject, "null owningObject"); 416Debug.Assert(null != connectionFactory, "null connectionFactory"); 618Debug.Assert(outerConnection != null,"outerConnection may not be null."); 621Debug.Assert(metaDataFactory != null,"metaDataFactory may not be null."); 730Debug.Assert(!IsEmancipated,"pooled object not in pool");
fx\src\data\System\Data\ProviderBase\DbConnectionPool.cs (42)
80Debug.Assert(null != pool, "null pool?"); 102Debug.Assert(null != transaction, "null transaction?"); 123Debug.Assert ( connections != null ); 145Debug.Assert(null != transaction, "null transaction?"); 146Debug.Assert(null != transactedObject, "null transactedObject?"); 159Debug.Assert ( connections != null ); 164Debug.Assert(0 > connections.IndexOf(transactedObject), "adding to pool a second time?"); 195Debug.Assert ( connections != null ); 200Debug.Assert(0 > connections.IndexOf(transactedObject), "adding to pool a second time?"); 262Debug.Assert ( connections != null ); 347Debug.Assert(0 == SEMAPHORE_HANDLE, "SEMAPHORE_HANDLE"); 348Debug.Assert(1 == ERROR_HANDLE, "ERROR_HANDLE"); 349Debug.Assert(2 == CREATION_HANDLE, "CREATION_HANDLE"); 469Debug.Assert(ADP.IsWindowsNT, "Attempting to construct a connection pool on Win9x?"); 470Debug.Assert(null != connectionPoolGroup, "null connectionPoolGroup"); 643Debug.Assert(obj != null, "null connection is not expected"); 695Debug.Assert(obj != null, "null connection is not expected"); 699Debug.Assert(!obj.IsEmancipated, "pooled object not in pool"); 700Debug.Assert(obj.CanBePooled, "pooled object is not poolable"); 731Debug.Assert(obj != null, "null connection is not expected"); 736Debug.Assert(obj != null, "null connection is not expected"); 786Debug.Fail("Unknown PoolBlockingPeriod. Please specify explicit results in above switch case statement."); 818Debug.Assert(oldConnectionPool._state == State.ShuttingDown, "Old connections pool should be shutting down"); 864Debug.Assert(timerIsNotDisposed, "ErrorCallback timer has been disposed"); 896Debug.Assert ( _state == State.Running || _state == State.ShuttingDown ); 948Debug.Assert ( _transactedConnectionPool != null, "Transacted connection pool was not expected to be null."); 990Debug.Assert ( destroyObject == false ); 1006Debug.Assert ( rootTxn == true || returnToGeneralPool == true || destroyObject == true ); 1026Debug.Assert(removed, "attempt to DestroyObject not in list"); 1070Debug.Assert(!Thread.CurrentThread.IsThreadPoolThread, "This thread may block for a long time. Threadpool threads should not be used."); 1154Debug.Assert(connection != null, "connection should never be null in success case"); 1255Debug.Assert(2 == waitHandleCount || 3 == waitHandleCount, "unexpected waithandle count"); 1316Debug.Assert(2 == CREATION_HANDLE, "creation handle changed value"); 1357Debug.Assert(waitForMultipleObjectsExHR != 0, "WaitForMultipleObjectsEx failed but waitForMultipleObjectsExHR remained 0"); 1455Debug.Assert(obj != null, "null connection is not expected"); 1459Debug.Assert(obj != null, "null connection is not expected"); 1616Debug.Assert(null != obj, "why are we adding a null object to the pool?"); 1633Debug.Assert(null != obj, "null obj?"); 1659Debug.Assert(null != obj, "null pooledObject?"); 1660Debug.Assert(obj.EnlistedTransaction == null, "pooledObject is still enlisted?"); 1776Debug.Assert(null != transaction, "null transaction?"); 1777Debug.Assert(null != transactedObject, "null transactedObject?");
fx\src\data\System\Data\ProviderBase\DbConnectionPoolAuthenticationContext.cs (5)
56Debug.Assert(accessToken != null && accessToken.Length > 0); 57Debug.Assert(expirationTime > DateTime.MinValue && expirationTime < DateTime.MaxValue); 72Debug.Assert(context1 != null, "context1 should not be null."); 73Debug.Assert(context2 != null, "context2 should not be null."); 105Debug.Assert(oldValue == STATUS_LOCKED);
fx\src\data\System\Data\ProviderBase\DbConnectionPoolAuthenticationContextKey.cs (2)
53Debug.Assert(!string.IsNullOrWhiteSpace(stsAuthority)); 54Debug.Assert(!string.IsNullOrWhiteSpace(servicePrincipalName));
fx\src\data\System\Data\ProviderBase\DbConnectionPoolCounters.cs (1)
267Debug.Assert(result.Length == CounterInstanceNameMaxLength,
fx\src\data\System\Data\ProviderBase\DbConnectionPoolGroup.cs (6)
54Debug.Assert(null != connectionOptions, "null connection options"); 55Debug.Assert(null == poolGroupOptions || ADP.IsWindowsNT, "should not have pooling options on Win9x"); 168Debug.Assert(ADP.IsWindowsNT, "should not be pooling on Win9x"); 201Debug.Assert(addResult, "No other pool with current identity should exist at this point"); 207Debug.Assert(PoolGroupStateDisabled == _state, "state should be disabled"); 216Debug.Assert(PoolGroupStateActive == _state, "state should be active since a pool exists and lock holds");
fx\src\data\System\Data\ProviderBase\DbMetaDataFactory.cs (3)
135Debug.Assert(requestedCollectionRow != null); 315Debug.Assert(dataSourceInfoTable.TableName == DbMetaDataCollectionNames.DataSourceInformation); 380Debug.Assert (_metaDataCollectionsDataSet != null);
fx\src\Data\System\Data\ProviderBase\DbParameterCollectionHelper.cs (2)
220Debug.Assert((null != items) && (0 <= index) && (index < Count), "RemoveIndex, invalid"); 228Debug.Assert((null != items) && (0 <= index) && (index < Count), "Replace Index invalid");
fx\src\data\System\Data\ProviderBase\DbReferenceCollection.cs (8)
24Debug.Assert(!HasTarget, "Entry already has a valid target"); 25Debug.Assert(tag != 0, "Bad tag"); 26Debug.Assert(target != null, "Invalid target"); 78Debug.Assert(null != value && 0 != tag, "AddItem with null value or 0 tag"); 86Debug.Assert(_items[i].HasTarget, "missing expected target"); 104Debug.Assert(_items[i].HasTarget, "missing expected target"); 171Debug.Assert(!_items[index].HasTarget, "Unexpected target after notifying"); 197Debug.Assert(null != value, "RemoveItem with null");
fx\src\data\System\Data\ProviderBase\SchemaMapping.cs (19)
66Debug.Assert(null != adapter, "adapter"); 67Debug.Assert(null != dataReader, "dataReader"); 68Debug.Assert(0 < dataReader.FieldCount, "FieldCount"); 69Debug.Assert(null != dataset || null != datatable, "SchemaMapping - null dataSet"); 70Debug.Assert(SchemaType.Mapped == schemaType || SchemaType.Source == schemaType, "SetupSchema - invalid schemaType"); 243Debug.Assert(_mappedLength == _indexMap.Length, "incorrect precomputed length"); 255Debug.Assert(_mappedLength == Math.Min(_readerDataValues.Length, _mappedDataValues.Length), "incorrect precomputed length"); 309Debug.Assert(0 == _mappedMode, "incorrect mappedMode"); 310Debug.Assert((null == _chapterMap) && (null == _indexMap) && (null == _mappedDataValues), "incorrect MappedValues"); 313Debug.Assert((null == _chapterMap) && (null == _indexMap) && (null != _mappedDataValues), "incorrect MappedValues"); 317Debug.Assert((null == _chapterMap) && (null != _indexMap) && (null != _mappedDataValues), "incorrect MappedValues"); 321Debug.Assert((null != _chapterMap) && (null == _indexMap) && (null != _mappedDataValues), "incorrect MappedValues"); 325Debug.Assert((null != _chapterMap) && (null != _indexMap) && (null != _mappedDataValues), "incorrect MappedValues"); 359Debug.Assert(false, "unexpected LoadOption"); 397Debug.Assert(null != _dataSet, "if chapters, then Fill(DataSet,...) not Fill(DataTable,...)"); 441Debug.Assert(rgcol != null, "invalid call to ResizeArray"); 442Debug.Assert(len <= rgcol.Length, "invalid len passed to ResizeArray"); 643Debug.Assert(null != schemaRows, "SchemaSetup - null DbSchemaRow[]"); 644Debug.Assert(_dataReader.FieldCount <= schemaRows.Length, "unexpected fewer rows in Schema than FieldCount");
fx\src\data\System\Data\ProviderBase\TimeoutTimer.cs (5)
53Debug.Assert(timeout != null); // Need a valid timeouttimer if no error 64Debug.Assert(0 <= milliseconds); 75Debug.Assert(timeout != null); // Need a valid timeouttimer if no error 88Debug.Assert(0 <= seconds || InfiniteTimeout == seconds); // no need to support negative seconds at present 181Debug.Assert(0<=milliseconds); // This property guarantees no negative return values
fx\src\data\System\Data\RbTree.cs (15)
318Debug.Assert(_inUseNodeCount-1 == SubTreeSize(root), "count mismatch"); 367Debug.Assert(page.Slots[slotId].leftId == NIL, "node not cleared"); 368Debug.Assert(page.Slots[slotId].rightId == NIL, "node not cleared"); 369Debug.Assert(page.Slots[slotId].parentId == NIL, "node not cleared"); 370Debug.Assert(page.Slots[slotId].nextId == NIL, "node not cleared"); 373Debug.Assert(page.Slots[slotId].nodeColor == NodeColor.red, "node not cleared"); 560Debug.Assert(-1 == position, "KEY_SEARCH_AND_INDEX with bad position"); 808Debug.Assert(_accessMethod == TreeAccessMethod.INDEX_ONLY, "not expecting anything else"); 1294Debug.Assert(NIL != node, "GetIndexByNode(NIL)"); 1450Debug.Assert(NIL == Next(x_id), "has unexpected satellite tree"); 1617Debug.Assert(nodeId != NIL, " in SetParent nodeId == NIL"); 1628Debug.Assert(nodeId != NIL, " in SetColor nodeId == NIL"); 1659Debug.Assert(nodeId != NIL && 1704Debug.Assert(myCorrectSize == size, "VerifySize"); 1903Debug.Assert((SlotMap[segmentPos] & freeSlot) == 0,"Slot position segment[segmentPos ]: [freeSlot] is in use. Expected to be empty");
fx\src\data\System\Data\RecordManager.cs (9)
107Debug.Assert(record >=0 && record < recordCapacity, "NewRecord: Invalid record"); 112Debug.Assert(-1 <= record && record < recordCapacity, "invalid record"); 164Debug.Assert(record >= 0 && record < rows.Length, "Invalid record number"); 168Debug.Assert(record >= 0 && record < rows.Length, "Invalid record number"); 186Debug.Assert(src != null, "Can not Merge record without a table"); 239Debug.Assert((record < lastFreeRecord) && (-1 == freeRecordList.IndexOf(record)), "accesing free record"); 240Debug.Assert((null == rows[record]) || 248Debug.Assert((record < lastFreeRecord) && (-1 == freeRecordList.IndexOf(record)), "accesing free record"); 249Debug.Assert((null == rows[record]) || (row == rows[record]), "record of a different row");
fx\src\data\System\Data\RelatedView.cs (2)
28Debug.Assert(this.Table == childKey.Table, "Key.Table Must be equal to Current Table"); 38Debug.Assert (this.Table == childKey.Table, "Key.Table Must be equal to Current Table");
fx\src\data\System\Data\Select.cs (8)
398Debug.Assert(matchedCandidates > 0 && matchedCandidates <= lenId, "BuildLinearExpression : Invalid Index"); 401Debug.Assert(canColumn != null && canColumn.expr != null, "BuildLinearExpression : Must be a matched candidate"); 464Debug.Assert(!needSorting, "What are we doing here if no real reuse of this index ?"); 594default: Debug.Assert(true, "Unsupported Binary Search Operator!"); break; 621Debug.Assert(candidateColumns[columnOrdinal] != null, "How come this is not a candidate column"); 622Debug.Assert(candidateColumns[columnOrdinal].expr != null, "How come there is no associated expression"); 663Debug.Assert(matchedCandidates <= index.IndexFields.Length, "GetBinaryFilteredRecords : Invalid Index"); 669Debug.Assert (lo <= hi, "GetBinaryFilteredRecords : Invalid Search Results");
fx\src\data\System\Data\Selection.cs (24)
21Debug.Assert(column != null, "null column"); 115Debug.Assert(indexFields != null); 116Debug.Assert(null != table, "null table"); 188Debug.Assert (recordIndex >= 0 && recordIndex < recordCount, "recordIndex out of range"); 261Debug.Assert(0 <= refCount, "AddRef on disposed index"); 262Debug.Assert(null != records, "null records"); 333Debug.Assert(null != table.recordManager[record1], "record1 no datarow"); 334Debug.Assert(null != table.recordManager[record2], "record2 no datarow"); 368Debug.Assert(null != table.recordManager[record1], "record1 no datarow"); 369Debug.Assert(null != table.recordManager[record2], "record2 no datarow"); 453Debug.Assert(null != _comparison, "missing comparison"); 476Debug.Assert(record == row.newRecord, "newRecord has change during GetIndex"); 480Debug.Assert(record == row.oldRecord, "oldRecord has change during GetIndex"); 811Debug.Assert(DoListChanged, "supposed to check DoListChanged before calling to delay create ListChangedEventArgs"); 821Debug.Assert(-1 <= record, "bad record#"); 879Debug.Assert((-1 == oldRecord) || (-1 == newRecord) || 998Debug.Assert(null != listener, "null listener"); 999Debug.Assert(!Index.ContainsReference(listeners, listener), "already contains reference"); 1009Debug.Assert(null != listener, "null listener"); 1012Debug.Assert(0 <= index, "listeners don't contain listener"); 1025Debug.Assert(null != action, "no action"); 1026Debug.Assert(0 <= _listenerReaderCount, "negative _listEventCount"); 1060Debug.Assert((-1 == nullIndex) || (null == listeners[nullIndex]), "non-null listener"); 1061Debug.Assert(0 == _listenerReaderCount, "0 < _listenerReaderCount");
fx\src\data\System\Data\Sql\SqlDataSourceEnumerator.cs (5)
81Debug.Assert(false, "GetDataSources:SNIServerEnumRead returned bad length"); 122Debug.Assert(instanceName == null); 128Debug.Assert(String.Compare(_Cluster, 0, instance2, 0, _clusterLength, StringComparison.OrdinalIgnoreCase) == 0); 132Debug.Assert(version == null); 133Debug.Assert(String.Compare(_Version, 0, instance2, 0, _versionLength, StringComparison.OrdinalIgnoreCase) == 0);
fx\src\data\System\Data\Sql\sqlnorm.cs (1)
43Debug.Assert(normalizer!=null, "normalizer argument should not be null!");
fx\src\data\System\Data\SqlClient\assemblycache.cs (1)
54Debug.Assert(t != null, "Type object cant be NULL");
fx\src\data\System\Data\SqlClient\LocalDBAPI.cs (5)
188Debug.Assert(hrCode < 0, "HRCode does not indicate error"); 222Debug.Assert((localDbError == 0) || (sniError == 0), "LocalDB error and SNI error cannot be specified simultaneously"); 223Debug.Assert(!string.IsNullOrEmpty(errorMessage), "Error message should not be null or empty"); 316Debug.Assert(confElement.Name != null && confElement.Version != null, "Both name and version should not be null"); 340Debug.Assert(!instance.Contains("\0"), "Instance name should contain embedded nulls");
fx\src\data\System\Data\SqlClient\SqlAeadAes256CbcHmac256Algorithm.cs (16)
111Debug.Assert (null != encryptionKey, "Null encryption key detected in AeadAes256CbcHmac256 algorithm"); 112Debug.Assert (0x01 == algorithmVersion, "Unknown algorithm version passed to AeadAes256CbcHmac256"); 120Debug.Assert (SqlClientEncryptionType.Randomized == encryptionType, "Invalid Encryption Type detected in SqlAeadAes256CbcHmac256Algorithm, this should've been caught in factory class"); 151Debug.Assert(plainText != null); 208Debug.Assert(encryptor.CanTransformMultipleBlocks, "AES Encryptor can transform multiple blocks"); 223Debug.Assert(hmac.CanTransformMultipleBlocks, "HMAC can't transform multiple blocks"); 231Debug.Assert(hash.Length >= authenticationTagLen, "Unexpected hash size"); 266Debug.Assert(cipherText != null); 319Debug.Assert((iv != null) && (cipherText != null)); 320Debug.Assert (offset > -1 && count > -1); 321Debug.Assert ((count+offset) <= cipherText.Length); 378Debug.Assert(cipherText != null); 392Debug.Assert(retVal == _version.Length); 394Debug.Assert(retVal == iv.Length); 396Debug.Assert(retVal == length); 401Debug.Assert (computedHash.Length >= authenticationTag.Length);
fx\src\data\System\Data\SqlClient\SqlAeadAes256CbcHmac256Factory.cs (2)
34Debug.Assert(encryptionKey != null); 35Debug.Assert(string.Equals(encryptionAlgorithm, SqlAeadAes256CbcHmac256Algorithm.AlgorithmName, StringComparison.OrdinalIgnoreCase) == true);
fx\src\data\System\Data\SqlClient\SqlAes256CbcFactory.cs (2)
37Debug.Assert(encryptionKey != null); 38Debug.Assert(string.Equals(encryptionAlgorithm, SqlAes256CbcAlgorithm.AlgorithmName, StringComparison.OrdinalIgnoreCase) == true);
fx\src\data\System\Data\SqlClient\SqlBuffer.cs (28)
146Debug.Assert (IsEmpty, "setting value a second time?"); 163Debug.Assert (IsEmpty, "setting value a second time?"); 227Debug.Assert (IsEmpty, "setting value a second time?"); 252Debug.Assert (IsEmpty, "setting value a second time?"); 269Debug.Assert (IsEmpty, "setting value a second time?"); 286Debug.Assert (IsEmpty, "setting value a second time?"); 303Debug.Assert (IsEmpty, "setting value a second time?"); 435Debug.Assert (IsEmpty, "setting value a second time?"); 477Debug.Assert (IsEmpty, "setting value a second time?"); 495Debug.Assert (IsEmpty, "setting value a second time?"); 553Debug.Assert (IsEmpty, "setting value a second time?"); 672Debug.Assert(null != _object); 814Debug.Assert (IsEmpty, "setting value a second time?"); 822Debug.Assert (IsEmpty, "setting value a second time?"); 835Debug.Assert (IsEmpty, "setting value a second time?"); 842Debug.Assert (IsEmpty, "setting value a second time?"); 849Debug.Assert (IsEmpty, "setting value a second time?"); 856Debug.Assert(IsEmpty, "setting value a second time?"); 864Debug.Assert(IsEmpty, "setting value a second time?"); 872Debug.Assert(IsEmpty, "setting value a second time?"); 880Debug.Assert(IsEmpty, "setting value a second time?"); 889Debug.Assert(IsEmpty, "setting value a second time?"); 898Debug.Assert(IsEmpty, "setting value a second time?"); 908Debug.Assert(IsEmpty, "setting value a second time?"); 918Debug.Assert(IsEmpty, "setting value a second time?"); 930Debug.Assert(3 <= length && length <= 5, "invalid data length for timeInfo: " + length); 931Debug.Assert(0 <= scale && scale <= 7, "invalid scale: " + scale); 932Debug.Assert(0 <= denormalizedScale && denormalizedScale <= 7, "invalid denormalized scale: " + denormalizedScale);
fx\src\data\System\Data\SqlClient\SqlBulkCopy.cs (42)
516Debug.Assert(_isAsyncBulkCopy, "Execution pended when not doing async bulk copy"); 519Debug.Assert(!t.IsCanceled, "Execution task was canceled"); 542Debug.Assert((internalResults != null), "Where are the results from the initial query?"); 681Debug.Assert(rowvalue is SqlString); 760Debug.Assert(_isAsyncBulkCopy, "Execution pended when not doing async bulk copy"); 762Debug.Assert(!t.IsCanceled, "Execution task was canceled"); 805Debug.Assert(_internalTransaction == null, "Internal transaction exists during dispose"); 861Debug.Assert(_SqlDataReaderRowSource != null, "Should not be reading row as an XmlReader if bulk copy source is not a SqlDataReader"); 864Debug.Assert(false, string.Format("Current column is marked as being a DataFeed, but no DataFeed compatible method was provided. Method: {0}", _currentRowMetadata[destRowIndex].Method)); 889Debug.Assert(false, string.Format("Current column is marked as being a SqlType, but no SqlType compatible method was provided. Method: {0}", _currentRowMetadata[destRowIndex].Method)); 935Debug.Assert(_currentRow != null, "uninitialized _currentRow"); 936Debug.Assert(sourceOrdinal < _currentRowLength, "inconsistency of length of rows from rowsource!"); 981Debug.Assert(false, string.Format("Current column is marked as being a SqlType, but no SqlType compatible method was provided. Method: {0}", _currentRowMetadata[destRowIndex].Method)); 991Debug.Assert(false, "ValueSourcType unspecified"); 1039Debug.Assert(_rowEnumerator != null, "uninitialized _rowEnumerator"); 1040Debug.Assert((_rowStateToSkip & DataRowState.Deleted) != 0, "Deleted is a permitted rowstate?"); 1056Debug.Assert(false, "ValueSourcType unspecified"); 1084Debug.Assert(false, string.Format("Unknown value source: {0}", _rowSourceType)); 1261Debug.Assert(name[l - 1] == ']', "Name starts with [ but doesn not end with ]"); 1324Debug.Assert (_parser.ShouldEncryptValuesForBulkCopy()); 1434Debug.Assert((value is XmlReader) || (value is SqlCachedBuffer) || (value is string) || (value is SqlString) || (value is XmlDataFeed), "Invalid value type of Xml datatype"); 1443Debug.Assert(false, "Unknown TdsType!" + type.NullableType.ToString("x2", (IFormatProvider)null)); 1576Debug.Assert(null != table, "How can we have rows without a table?"); 1626Debug.Assert(null != table, "How can we have rows without a table?"); 1774Debug.Assert(_parserLock == null, "Previous parser lock not cleaned"); 1970Debug.Assert (_parser.ShouldEncryptValuesForBulkCopy()); 1984Debug.Assert (!metadata.isEncrypted, "Can't encrypt SQL Variant type"); 2118Debug.Assert(writeTask == null, "Task should not pend while doing sync bulk copy"); 2145Debug.Assert(source != null, "source should already be initialized if task is not null"); 2148Debug.Assert(newSource == null, "Shouldn't create a new source when one already exists"); 2230Debug.Assert(source == null || !source.Task.IsCompleted, "Called into CopyBatchesAsync with a completed task!"); 2256Debug.Assert(_isAsyncBulkCopy, "Task should not pend while doing sync bulk copy"); 2295Debug.Assert(source == null || !source.Task.IsCompleted, "Called into CopyBatchesAsync with a completed task!"); 2308Debug.Assert(_isAsyncBulkCopy, "Task should not pend while doing sync bulk copy"); 2340Debug.Assert(source == null || !source.Task.IsCompleted, "Called into CopyBatchesAsync with a completed task!"); 2351Debug.Assert(_isAsyncBulkCopy, "Task should not pend while doing sync bulk copy"); 2398Debug.Assert(task == null, "Write should not pend when error occurs"); 2523Debug.Fail("Unexpected exception during CleanUpstateObjectOnError (ignored)", cleanupEx.ToString()); 2537Debug.Fail("Unexpected exception during CleanUpstateObjectOnError (ignored)", cleanupEx.ToString()); 2555Debug.Assert(_hasMoreRowToCopy, "first time it is true, otherwise this method would not have been called."); 2645Debug.Assert(internalResults != null, "Executing initial query finished synchronously, but there were no results"); 2698Debug.Assert(_isAsyncBulkCopy, "Read must not return a Task in the Sync mode");
fx\src\data\System\Data\SqlClient\SqlBulkCopyColumnMappingCollection.cs (1)
56Debug.Assert(ADP.IsEmpty(bulkCopyColumnMapping.SourceColumn) || bulkCopyColumnMapping._internalSourceColumnOrdinal == -1, "BulkLoadAmbigousSourceColumn");
fx\src\data\System\Data\SqlClient\SqlCachedBuffer.cs (4)
59Debug.Assert(metadata.metaType.IsPlp, "SqlCachedBuffer call on a non-plp data"); 69Debug.Assert(cb == byteArr.Length); 81Debug.Assert(stateObj._longlen == 0 && stateObj._longlenleft == 0); 93Debug.Assert(cachedBytes.Count == 0);
fx\src\data\System\Data\SqlClient\SqlClientEncryptionAlgorithmFactoryList.cs (1)
72Debug.Assert (null != factory, "Null Algorithm Factory class detected");
fx\src\data\System\Data\SqlClient\SqlClientWrapperSmiStream.cs (2)
22Debug.Assert( null != sink ); 23Debug.Assert( null != stream );
fx\src\data\System\Data\SqlClient\SqlClientWrapperSmiStreamChars.cs (2)
25Debug.Assert( null != sink ); 26Debug.Assert( null != stream );
fx\src\data\System\Data\SqlClient\SqlColumnEncryptionCertificateStoreProvider.cs (18)
158Debug.Assert(hash != null, @"hash should not be null while decrypting encrypted column encryption key."); 215Debug.Assert(cipherText.Length == keySizeInBytes, @"cipherText length does not match the RSA key size"); 232Debug.Assert(signedHash.Length == keySizeInBytes, @"signed hash length does not match the RSA key size"); 233Debug.Assert(RSAVerifySignature(hash, signedHash, certificate), @"Invalid signature of the encrypted column encryption key computed."); 394Debug.Assert(!string.IsNullOrEmpty(keyPath)); 510Debug.Assert(plainText != null); 511Debug.Assert(certificate != null); 512Debug.Assert(certificate.HasPrivateKey, "Attempting to encrypt with cert without privatekey"); 526Debug.Assert((cipherText != null) && (cipherText.Length != 0)); 527Debug.Assert(certificate != null); 528Debug.Assert(certificate.HasPrivateKey, "Attempting to decrypt with cert without privatekey"); 542Debug.Assert((dataToSign != null) && (dataToSign.Length != 0)); 543Debug.Assert(certificate != null); 544Debug.Assert(certificate.HasPrivateKey, "Attempting to sign with cert without privatekey"); 568Debug.Assert((dataToVerify != null) && (dataToVerify.Length != 0)); 569Debug.Assert((signature != null) && (signature.Length != 0)); 570Debug.Assert(certificate != null); 571Debug.Assert(certificate.HasPrivateKey, "Attempting to sign with cert without privatekey");
fx\src\data\System\Data\SqlClient\SqlColumnEncryptionCngProvider.cs (14)
138Debug.Assert(hash != null, @"hash should not be null while decrypting encrypted column encryption key."); 195Debug.Assert(cipherText.Length == keySizeInBytes, @"cipherText length does not match the RSA key size"); 212Debug.Assert(signedHash.Length == keySizeInBytes, @"signed hash length does not match the RSA key size"); 213Debug.Assert(RSAVerifySignature(hash, signedHash, rsaCngProvider), @"Invalid signature of the encrypted column encryption key computed."); 318Debug.Assert(columnEncryptionKey != null); 319Debug.Assert(rsaCngProvider != null); 332Debug.Assert((encryptedColumnEncryptionKey != null) && (encryptedColumnEncryptionKey.Length != 0)); 333Debug.Assert(rsaCngProvider != null); 346Debug.Assert((dataToSign != null) && (dataToSign.Length != 0)); 347Debug.Assert(rsaCngProvider != null); 361Debug.Assert((dataToVerify != null) && (dataToVerify.Length != 0)); 362Debug.Assert((signature != null) && (signature.Length != 0)); 363Debug.Assert(rsaCngProvider != null); 375Debug.Assert(rsaCngProvider != null);
fx\src\data\System\Data\SqlClient\SqlColumnEncryptionCspProvider.cs (14)
144Debug.Assert(hash != null, @"hash should not be null while decrypting encrypted column encryption key."); 201Debug.Assert(cipherText.Length == keySizeInBytes, @"cipherText length does not match the RSA key size"); 218Debug.Assert(signedHash.Length == keySizeInBytes, @"signed hash length does not match the RSA key size"); 219Debug.Assert(RSAVerifySignature(hash, signedHash, rsaProvider), @"Invalid signature of the encrypted column encryption key computed."); 326Debug.Assert(columnEncryptionKey != null); 327Debug.Assert(rscp != null); 341Debug.Assert((encryptedColumnEncryptionKey != null) && (encryptedColumnEncryptionKey.Length != 0)); 342Debug.Assert(rscp != null); 355Debug.Assert((dataToSign != null) && (dataToSign.Length != 0)); 356Debug.Assert(rscp != null); 370Debug.Assert((dataToVerify != null) && (dataToVerify.Length != 0)); 371Debug.Assert((signature != null) && (signature.Length != 0)); 372Debug.Assert(rscp != null); 384Debug.Assert(rscp != null);
fx\src\data\System\Data\SqlClient\SqlCommand.cs (126)
214Debug.Assert(activeConnection != null, "Unexpected null connection argument on SetActiveConnectionAndResult!"); 354Debug.Assert(SmiContextFactory.Instance.NegotiatedSmiVersion >= SmiContextFactory.YukonVersion); 366Debug.Assert(SmiContextFactory.Instance.NegotiatedSmiVersion >= SmiContextFactory.KatmaiVersion); 541Debug.Assert(_activeConnection != null, "The active connection is null!"); 933Debug.Assert(_cachedMetaData == null || !_dirty, "dirty query should not have cached metadata!"); // can have cached metadata if dirty because of parameters 940Debug.Assert(_execType != EXECTYPE.PREPARED, "Invalid attempt to Prepare already Prepared command!"); 941Debug.Assert(_activeConnection != null, "must have an open connection to Prepare"); 942Debug.Assert(null != _stateObj, "TdsParserStateObject should not be null"); 943Debug.Assert(null != _stateObj.Parser, "TdsParser class should not be null in Command.Execute!"); 944Debug.Assert(_stateObj.Parser == _activeConnection.Parser, "stateobject parser not same as connection parser"); 945Debug.Assert(false == _inPrepare, "Already in Prepare cycle, this.inPrepare should be false!"); 965Debug.Assert(true == IsPrepared, "Invalid attempt to Unprepare a non-prepared command!"); 966Debug.Assert(_activeConnection != null, "must have an open connection to UnPrepare"); 967Debug.Assert(false == _inPrepare, "_inPrepare should be false!"); 1372Debug.Assert(_reconnectionCompletionSource == null || _reconnectionCompletionSource.Task.IsCanceled, "ReconnectCompletionSource should be null or cancelled"); 1443Debug.Assert(!_internalEndExecuteInitiated || _stateObj == null); 1533Debug.Assert(_stateObj == null); 1548Debug.Assert(_stateObj._syncOverAsync, "Should not attempt pends in a synchronous call"); 1576Debug.Assert(null == _stateObj, "non-null state object in EndExecuteNonQuery"); 1640Debug.Assert( !sendToPipe, "trying to send non-context command to pipe" ); 1651Debug.Assert(!inRetry); 1656Debug.Assert( !sendToPipe, "trying to send non-context command to pipe" ); 1668Debug.Assert(async || null == _stateObj, "non-null state object in InternalExecuteNonQuery"); 1805Debug.Assert(completion != null,"Completion source should not be null"); 1868Debug.Assert(!_internalEndExecuteInitiated || _stateObj == null); 2074Debug.Assert(!_internalEndExecuteInitiated || _stateObj == null); 2200Debug.Assert(!usedCache || !inRetry); 2221Debug.Assert(!_internalEndExecuteInitiated); 2302Debug.Assert(completion != null,"CompletionSource should not be null"); 2381Debug.Assert(null == _stateObj, "non-null state object in InternalEndExecuteReader"); 2735Debug.Assert(parsedSProc.Length == 4, "Invalid array length result from SqlCommandBuilder.ParseProcedureName"); 2886Debug.Assert(this._activeConnection.IsYukonOrNewer,"Invalid datatype token received from pre-yukon server"); 2905Debug.Assert(this._activeConnection.IsKatmaiOrNewer,"Invalid datatype token received from pre-katmai server"); 2964Debug.Assert(oledbDirection >= 1 && oledbDirection <= 4, "invalid parameter direction from params_rowset!"); 3059Debug.Assert(!asyncWrite || async, "AsyncWrite should be always accompanied by Async"); 3111Debug.Assert(executeTask == null, "Shouldn't get a task when doing sync writes"); 3119Debug.Assert(_stateObj._syncOverAsync, "Should not attempt pends in a synchronous call"); 3289Debug.Assert(_activeConnection != null, "_activeConnection should not be null in PrepareForTransparentEncryption."); 3290Debug.Assert(_activeConnection.Parser != null, "_activeConnection.Parser should not be null in PrepareForTransparentEncryption."); 3291Debug.Assert(_activeConnection.Parser.IsColumnEncryptionSupported, 3293Debug.Assert(_columnEncryptionSetting == SqlCommandColumnEncryptionSetting.Enabled 3296Debug.Assert(async == (completion != null), "completion should can be null if and only if mode is async."); 3339Debug.Assert(describeParameterEncryptionNeeded || describeParameterEncryptionDataReader == null, 3342Debug.Assert(fetchInputParameterEncryptionInfoTask == null || async, 3345Debug.Assert((describeParameterEncryptionRpcOriginalRpcMap != null) == BatchRPCMode, 3350Debug.Assert(null == fetchInputParameterEncryptionInfoTask, 3353Debug.Assert(null == describeParameterEncryptionDataReader, 3362Debug.Assert(describeParameterEncryptionDataReader != null, 3395Debug.Assert(null == _stateObj, "non-null state object in PrepareForTransparentEncryption."); 3466Debug.Assert(null == _stateObj, "non-null state object in PrepareForTransparentEncryption."); 3609Debug.Assert(rpcDescribeParameterEncryptionRequest != null, "rpcDescribeParameterEncryptionRequest should not be null, after call to PrepareDescribeParameterEncryptionRequest."); 3611Debug.Assert(!describeParameterEncryptionRpcOriginalRpcDictionary.ContainsKey(rpcDescribeParameterEncryptionRequest), 3631Debug.Assert(_sqlRPCParameterEncryptionReqArray.Length > 0, "There should be at-least 1 describe parameter encryption rpc request."); 3632Debug.Assert(_sqlRPCParameterEncryptionReqArray.Length <= _SqlRPCBatchArray.Length, 3643Debug.Assert(rpc != null, "GetRPCObject should not return rpc as null."); 3658Debug.Assert(_sqlRPCParameterEncryptionReqArray[0] != null, "_sqlRPCParameterEncryptionReqArray[0] should not be null, after call to PrepareDescribeParameterEncryptionRequest."); 3710Debug.Assert(originalRpcRequest != null); 3724Debug.Assert(originalRpcRequest.parameters != null && originalRpcRequest.parameters.Length > 0, 3741Debug.Assert(text != null, "@tsql parameter is null in PrepareDescribeParameterEncryptionRequest."); 3775Debug.Assert(_stateObj == null, "_stateObj should be null at this time, in PrepareDescribeParameterEncryptionRequest."); 3776Debug.Assert(_activeConnection != null, "_activeConnection should not be null at this time, in PrepareDescribeParameterEncryptionRequest."); 3816Debug.Assert((describeParameterEncryptionRpcOriginalRpcMap != null) == BatchRPCMode, 3835Debug.Assert(false, "Server sent back more results than what was expected for describe parameter encryption requests in BatchRPCMode."); 3852Debug.Assert(currentOrdinal >= 0, "currentOrdinal cannot be negative."); 3861Debug.Assert(!cipherInfoEntry.Equals(default(SqlTceCipherInfoEntry)), "cipherInfoEntry should not be un-initialized."); 3950Debug.Assert(_sqlRPCParameterEncryptionReqArray[resultSetSequenceNumber] != null, "_sqlRPCParameterEncryptionReqArray[resultSetSequenceNumber] should not be null."); 3957Debug.Assert(lookupDictionaryResult, 3959Debug.Assert(rpc != null, 3966Debug.Assert(rpc != null, "rpc should not be null here."); 3980Debug.Assert(rpc != null, "Describe Parameter Encryption requested for non-tce spec proc"); 3987Debug.Assert(sqlParameter != null, "sqlParameter should not be null."); 3990Debug.Assert(sqlParameter.CipherMetadata == null, "param.CipherMetadata should be null."); 4013Debug.Assert(_activeConnection != null, @"_activeConnection should not be null"); 4100Debug.Assert(unused == null, "returned task during synchronous execution"); 4162Debug.Assert(usedCache || (async == (returnTask != null)), @"if we didn't use the cache, returnTask should be null if and only if async is false."); 4274Debug.Assert(!asyncWrite || async, "AsyncWrite should be always accompanied by Async"); 4343Debug.Assert(!asyncWrite || async, "AsyncWrite should be always accompanied by Async"); 4387Debug.Assert(null != _activeConnection.Parser, "TdsParser class should not be null in Command.Execute!"); 4422Debug.Assert(_sqlRPCParameterEncryptionReqArray != null, "RunExecuteReader rpc array not provided for describe parameter encryption request."); 4426Debug.Assert(inSchema == false, "Batch RPC does not support schema only command beahvior"); 4427Debug.Assert(!IsPrepared, "Batch RPC should not be prepared!"); 4428Debug.Assert(!IsDirty, "Batch RPC should not be marked as dirty!"); 4433Debug.Assert(_SqlRPCBatchArray != null, "RunExecuteReader rpc array not provided"); 4439Debug.Assert(!IsUserPrepared, "CommandType.Text with no params should not be prepared!"); 4460Debug.Assert(_cachedMetaData == null || !_dirty, "dirty query should not have cached metadata!"); // can have cached metadata if dirty because of parameters 4473Debug.Assert(this.IsPrepared && (_prepareHandle != -1), "invalid attempt to call sp_execute without a handle!"); 4477Debug.Assert(_activeConnection.IsShiloh, "Invalid attempt to call sp_prepexec on non 7.x server"); 4487Debug.Assert(_execType == EXECTYPE.UNPREPARED, "Invalid execType!"); 4499Debug.Assert(_rpcArrayOf1[0] == rpc); 4503Debug.Assert(this.CommandType == System.Data.CommandType.StoredProcedure, "unknown command type!"); 4506Debug.Assert(IsShiloh || !IsPrepared, "RPC should not be prepared!"); 4507Debug.Assert(IsShiloh || !IsDirty, "RPC should not be marked as dirty!"); 4521Debug.Assert(executeTask == null, "Shouldn't get a task when doing sync writes"); 4523Debug.Assert(_stateObj._syncOverAsync, "Should not attempt pends in a synchronous call"); 4534Debug.Assert(_rpcArrayOf1[0] == rpc); 4538Debug.Assert(writeTask == null || async, "Returned task in sync mode"); 4578Debug.Assert(async || null == _stateObj, "non-null state object in RunExecuteReader"); 4690Debug.Assert(_stateObj == null); 4698Debug.Assert(_stateObj._syncOverAsync, "Should not attempt pends in a synchronous call"); 4921Debug.Assert (null == _stateObj,"StateObject not null on GetStateObject"); 4922Debug.Assert (null != _activeConnection, "no active connection?"); 5082Debug.Assert(_parameterCollectionList.Count >= _currentlyExecutingBatch, "OnDoneProc: Too many DONEPROC events"); 5104Debug.Assert(false, "OnReturnStatus: SqlCommand got too many DONEPROC events"); 5179Debug.Assert(_activeConnection != null, @"_activeConnection should not be null"); 5265Debug.Assert(mt.IsCharType, "Invalid collation structure for non-char type"); 5275Debug.Assert(null != paramMetaData); 5322Debug.Assert(false, "OnReturnValue: SqlCommand got too many DONEPROC events"); 5471Debug.Assert(System.Data.CommandType.Text == this.CommandType, "invalid use of sp_prepexec for stored proc invocation!"); 5522Debug.Assert(false, "Invalid ParameterDirection!"); 5549Debug.Assert(this.CommandType == System.Data.CommandType.StoredProcedure, "Command must be a stored proc to execute an RPC"); 5566Debug.Assert(_prepareHandle != 0, "Invalid call to sp_unprepare without a valid handle!"); 5590Debug.Assert(_prepareHandle != -1, "Invalid call to sp_execute without a valid handle!"); 5619Debug.Assert(_prepareHandle == -1, "This command has an existing handle, use sp_execute!"); 5620Debug.Assert(System.Data.CommandType.Text == this.CommandType, "invalid use of sp_executesql for stored proc invocation!"); 5664Debug.Assert(CommandType == CommandType.StoredProcedure, "BuildStoredProcedureStatementForColumnEncryption() should only be called for stored procedures"); 5665Debug.Assert(!string.IsNullOrWhiteSpace(storedProcedureName), "storedProcedureName cannot be null or empty in BuildStoredProcedureStatementForColumnEncryption"); 5666Debug.Assert(parameters != null, "parameters cannot be null in BuildStoredProcedureStatementForColumnEncryption"); 5941Debug.Assert(System.Data.CommandType.Text == this.CommandType, "invalid call to GetCommandText for stored proc!"); 5951Debug.Assert(System.Data.CommandType.Text == this.CommandType, "invalid use of sp_prepare for stored proc invocation!"); 6129Debug.Assert(BatchRPCMode, "Command is not in batch RPC Mode"); 6130Debug.Assert(_RPCList != null); 6131Debug.Assert(_parameterCollectionList != null); 6158Debug.Assert(BatchRPCMode, "Command is not in batch RPC Mode"); 6159Debug.Assert(_RPCList != null, "No batch commands specified"); 6167Debug.Assert(BatchRPCMode, "Command is not in batch RPC Mode"); 6168Debug.Assert(_SqlRPCBatchArray != null, "batch command have been cleared");
fx\src\data\System\Data\SqlClient\SqlCommandBuilder.cs (2)
199Debug.Assert(quotePrefix == "\"" || quotePrefix == "["); 309Debug.Assert(adapter is SqlDataAdapter, "!SqlDataAdapter");
fx\src\data\System\Data\SqlClient\SqlCommandSet.cs (3)
41Debug.Assert(0 <= commandText.Length, "no text"); 128Debug.Assert(false, "command.CommandType"); 131Debug.Assert(false, "command.CommandType");
fx\src\data\System\Data\SqlClient\SqlConnection.cs (18)
220Debug.Assert(!string.IsNullOrWhiteSpace(providerName), "Provider name is invalid"); 409Debug.Assert(Parser != null, "Where's the parser?"); 420Debug.Assert(parser != null, "Where's the parser?"); 972Debug.Assert(isFirstAttempt || !transaction.InternalTransaction.ConnectionHasBeenRestored, "Restored connection on non-first attempt"); 1271Debug.Assert(false, "Should not reach this point"); 1321Debug.Assert(_currentReconnectionTask == null, "Duplicate reconnection tasks detected"); 1380Debug.Assert(_currentCompletion == null, "After waiting for an async call to complete, there should be no completion source"); 1585Debug.Assert(tdsInnerConnection.Parser != null, "Where's the parser?"); 1730Debug.Assert(exception != null && exception.Errors.Count != 0, "SqlConnection: OnError called with null or empty exception!"); 1780Debug.Assert(ConnectionState.Open == State, "CompleteOpen not open"); 1844Debug.Assert(null != imevent, "null SqlInfoMessageEventArgs"); 1927Debug.Assert(null != sdc, "SQL Debug: invalid null debugging context!"); 2150Debug.Assert(ADP.PtrZero != sdc.pMemMap, "SQL Debug: invalid null value for pMemMap!"); 2205Debug.Assert(TypeSystemAssemblyVersion != null, "TypeSystemAssembly should be set !"); 2231Debug.Assert(!ADP.IsEmpty(metaData.udtAssemblyQualifiedName), "Unexpected state on GetUDTInfo"); 2253Debug.Assert(t != null, "Unexpected null of udtType on GetUdtValue!"); 2255Debug.Assert(o != null); 2264Debug.Assert(o != null, "object could NOT be created");
fx\src\data\System\Data\SqlClient\SqlConnectionFactory.cs (3)
133Debug.Assert(!ADP.IsEmpty(connectionString), "empty connectionString"); 188Debug.Assert (internalConnection != null, "internalConnection may not be null."); 209Debug.Assert (XMLStream != null,"XMLstream may not be null.");
fx\src\data\System\Data\SqlClient\SqlConnectionPoolKey.cs (1)
27Debug.Assert(_credential == null || _accessToken == null, "Credential and AccessToken can't have the value at the same time.");
fx\src\data\System\Data\SqlClient\SqlConnectionString.cs (2)
697Debug.Assert(SqlConnectionStringBuilder.KeywordsCount + SynonymCount == hash.Count, "incorrect initial ParseSynonyms size"); 732Debug.Assert(NetLibCount == hash.Count, "incorrect initial NetlibMapping size");
fx\src\data\System\Data\SqlClient\SqlConnectionStringBuilder.cs (8)
240Debug.Assert((KeywordsCount + SqlConnectionString.SynonymCount) == hash.Count, "initial expected size is incorrect"); 309Debug.Assert(false, "unexpected keyword"); 992Debug.Assert(false, "unexpected keyword"); 1166Debug.Assert(false, "unexpected keyword"); 1182Debug.Assert(DbConnectionStringBuilderUtil.IsValidApplicationIntentValue(value), "Invalid value for ApplicationIntent"); 1187Debug.Assert(DbConnectionStringBuilderUtil.IsValidPoolBlockingPeriodValue(value), "Invalid value for PoolBlockingPeriod"); 1191Debug.Assert(DbConnectionStringBuilderUtil.IsValidAuthenticationTypeValue(value), "Invalid value for AuthenticationType"); 1195Debug.Assert(DbConnectionStringBuilderUtil.IsValidColumnEncryptionSetting(value), "Invalid value for SqlConnectionColumnEncryptionSetting");
fx\src\data\System\Data\SqlClient\SqlConnectionTimeoutErrorInternal.cs (3)
56Debug.Assert(swDuration != null, "Time capture stopwatch cannot be null."); 108Debug.Assert(currentPhase == SqlConnectionTimeoutErrorPhase.PostLogin, "Should not be switching to the routing destination until Post Login is completed"); 134Debug.Assert(phaseDurations[(int)timeoutErrorPhase] != null, "End phase capture cannot be invoked when the phase duration object is a null.");
fx\src\data\System\Data\SqlClient\SqlDataAdapter.cs (4)
191Debug.Assert(null != _commandSet && (0 < _commandSet.CommandCount), "no commands"); 197Debug.Assert(commandIdentifier < _commandSet.CommandCount, "commandIdentifier out of range"); 198Debug.Assert(parameterIndex < _commandSet.GetParameterCount(commandIdentifier), "parameter out of range"); 204Debug.Assert(commandIdentifier < _commandSet.CommandCount, "commandIdentifier out of range");
fx\src\data\System\Data\SqlClient\SqlDataReader.cs (97)
199Debug.Assert(value, "attempting to uninitialize a data reader?"); 239Debug.Assert(_stateObj == null || _stateObj._syncOverAsync, "Should not attempt pends in a synchronous call"); 409Debug.Assert(null != stateObj, "null stateobject"); 411Debug.Assert(null == _snapshot, "Should not change during execution of asynchronous command"); 424Debug.Assert(null != md, "BuildSchemaTable - unexpected null metadata information"); 520Debug.Assert(col.baseTI != null && col.baseTI.metaType != null, "col.baseTI and col.baseTI.metaType should not be null."); 539Debug.Assert(TdsEnums.UNKNOWN_PRECISION_SCALE == col.scale || (0 <= col.scale && col.scale <= 7), "Invalid scale for Time column: " + col.scale); 543Debug.Assert(TdsEnums.UNKNOWN_PRECISION_SCALE == col.scale || (0 <= col.scale && col.scale <= 7), "Invalid scale for DateTime2 column: " + col.scale); 547Debug.Assert(TdsEnums.UNKNOWN_PRECISION_SCALE == col.scale || (0 <= col.scale && col.scale <= 7), "Invalid scale for DateTimeOffset column: " + col.scale); 568Debug.Assert(Connection.IsYukonOrNewer, "Invalid Column type received from the server"); 572Debug.Assert(Connection.IsYukonOrNewer, "Invalid DataType (Xml) for the column"); 586Debug.Assert(col.baseTI != null, @"col.baseTI should not be null."); 605Debug.Assert(col.baseTI != null, @"col.baseTI should not be null."); 634Debug.Assert(col.baseTI != null, @"col.baseTI should not be null."); 635Debug.Assert(col.baseTI.metaType != null, @"col.baseTI.metaType should not be null."); 767Debug.Assert(result, "Should not pend on sync call"); 768Debug.Assert(!_sharedState._dataReady, "_dataReady should be cleared"); 905Debug.Assert(SniContext.Snix_Read==stateObj.SniContext, String.Format((IFormatProvider)null, "The SniContext should be Snix_Read but it actually is {0}", stateObj.SniContext)); 1060Debug.Assert(result, "Should not pend a synchronous request"); 1084Debug.Assert(parser == null || parser.State != TdsParserState.OpenNotLoggedIn, "Reader on a connection that is not logged in"); 1133Debug.Assert(!ignored, "Parser read a row token while trying to read metadata"); 1146Debug.Assert(null == _metaData.indexMap, "non-null metaData indexmap"); 1193Debug.Assert(Connection.IsYukonOrNewer, "Invalid Column type received from the server"); 1198Debug.Assert(metaData.baseTI != null && metaData.baseTI.metaType != null, "metaData.baseTI and metaData.baseTI.metaType should not be null."); 1216Debug.Assert(null != _data, "Attempting to get variant internal storage type"); 1217Debug.Assert(i < _data.Length, "Reading beyond data length?"); 1259Debug.Assert(Connection.IsYukonOrNewer, "Invalid Column type received from the server"); 1265Debug.Assert(metaData.baseTI != null && metaData.baseTI.metaType != null, "metaData.baseTI and metaData.baseTI.metaType should not be null."); 1311Debug.Assert(null != _metaData[i].column, "MDAC 66681"); 1347Debug.Assert(Connection.IsYukonOrNewer, "Invalid Column type received from the server"); 1354Debug.Assert(metaData.baseTI != null && metaData.baseTI.metaType != null, 1406Debug.Assert(null != _metaData.schemaTable, "No schema information yet!"); 1535Debug.Assert(_stateObj == null || _stateObj._syncOverAsync, "Should not attempt pends in a synchronous call"); 1560Debug.Assert(!HasActiveStreamOrTextReaderOnColumn(i), "Column has an active Stream or TextReader"); 1671Debug.Assert(_metaData[i].metaType.IsLong, "non long type?"); 1672Debug.Assert(_metaData[i].metaType.IsCharType, "non-char type?"); 1766Debug.Assert(_stateObj._syncOverAsync, "Should not attempt pends in a synchronous call"); 1789Debug.Assert(_sharedState._nextColumnHeaderToRead == i + 1 && _sharedState._nextColumnDataToRead == i, "Non sequential access"); 1790Debug.Assert(buffer != null, "Null buffer"); 1791Debug.Assert(index >= 0, "Invalid index"); 1792Debug.Assert(length >= 0, "Invalid length"); 1793Debug.Assert(index + length <= buffer.Length, "Buffer too small"); 1877Debug.Assert(_metaData[i].baseTI != null, "_metaData[i].baseTI should not be null."); 1884Debug.Assert(mt != null, @"mt should not be null."); 1946Debug.Assert(_metaData[i].baseTI != null, @"_metaData[i].baseTI should not be null."); 1953Debug.Assert(mt != null, "mt should not be null."); 1957Debug.Assert(_metaData[i].baseTI != null, @"_metaData[i].baseTI should not be null."); 2098Debug.Assert(!HasActiveStreamOrTextReaderOnColumn(i), "Column has active Stream or TextReader"); 2100Debug.Assert(_metaData[i].metaType.IsPlp, "GetCharsFromPlpData called on a non-plp column!"); 2102Debug.Assert (IsCommandBehavior(CommandBehavior.SequentialAccess), "GetCharsFromPlpData called for non-Sequential access"); 2419Debug.Assert(_stateObj == null || _stateObj._syncOverAsync, "Should not attempt pends in a synchronous call"); 2431Debug.Assert(!data.IsEmpty || data.IsNull || metaData.type == SqlDbType.Timestamp, "Data has been read, but the buffer is empty"); 2572Debug.Assert(_stateObj == null || _stateObj._syncOverAsync, "Should not attempt pends in a synchronous call"); 2584Debug.Assert(!data.IsEmpty || data.IsNull || metaData.type == SqlDbType.Timestamp, "Data has been read, but the buffer is empty"); 2625Debug.Assert(_stateObj == null || _stateObj._syncOverAsync, "Should not attempt pends in a synchronous call"); 2720Debug.Assert(_typeSystem == SqlConnectionString.TypeSystem.SQLServer2000, "Should not be in this function under anything else but SQLServer2000"); 2759Debug.Assert(null != _command, "unexpected null command from the data reader!"); 2776Debug.Assert(_altRowStatus == ALTROWSTATUS.Done, "invalid AltRowStatus"); 2792Debug.Assert(_altRowStatus == ALTROWSTATUS.Done || _altRowStatus == ALTROWSTATUS.Null, "invalid AltRowStatus"); 2950Debug.Assert(_stateObj == null || _stateObj._syncOverAsync, "Should not attempt pends in a synchronous call"); 3034Debug.Assert ((_metaData != null), "Can't match up altrowmetadata"); 3039Debug.Assert (_altRowStatus == ALTROWSTATUS.Done, "invalid AltRowStatus"); 3124Debug.Assert(_stateObj == null || _stateObj._syncOverAsync, "Should not attempt pends in a synchronous call"); 3190Debug.Assert (_altRowStatus == ALTROWSTATUS.AltRow, "invalid AltRowStatus"); 3310Debug.Assert(_stateObj == null || _stateObj._syncOverAsync, "Should not attempt pends in a synchronous call"); 3329Debug.Assert(_sharedState._nextColumnHeaderToRead <= _metaData.Length, "_sharedState._nextColumnHeaderToRead too large"); 3330Debug.Assert(_sharedState._nextColumnDataToRead <= _metaData.Length, "_sharedState._nextColumnDataToRead too large"); 3340Debug.Assert(null != _data[i], " data buffer is null?"); 3391Debug.Assert(_stateObj == null || _stateObj._syncOverAsync, "Should not attempt pends in a synchronous call"); 3452Debug.Assert(i == _sharedState._nextColumnDataToRead || // Either we haven't read the column yet 3462Debug.Assert(_data[i].IsEmpty || _data[i].IsNull, "re-reading column value?"); 3482Debug.Assert(_sharedState._nextColumnDataToRead == _sharedState._nextColumnHeaderToRead); 3628Debug.Assert(null != _stateObj, "null state object"); // _parser may be null at this point 3630Debug.Assert(_sharedState._nextColumnHeaderToRead <= _metaData.Length, "_sharedState._nextColumnHeaderToRead too large"); 3688Debug.Assert(executeTask == null, "Shouldn't get a task when doing sync writes"); 3872Debug.Assert(!_sharedState._dataReady || _metaData != null, "Data is ready, but there is no metadata?"); 3885Debug.Assert(!_sharedState._dataReady || _metaData != null, "Data is ready, but there is no metadata?"); 3905Debug.Assert(!_sharedState._dataReady || _metaData != null, "Data is ready, but there is no metadata?"); 3922Debug.Assert(!_sharedState._dataReady || _metaData != null, "Data is ready, but there is no metadata?"); 3923Debug.Assert(permitAsync || _currentTask == null, "Call while async operation is pending"); 3924Debug.Assert(_metaData != null, "_metaData is null, check MetaData before calling this method"); 3925Debug.Assert(!requireData || _sharedState._dataReady, "No data is ready to be read"); 3927Debug.Assert(columnIndex.Value >= 0 && columnIndex.Value < _metaData.Length, "Invalid column index"); 3928Debug.Assert((!enforceSequentialAccess) || (!IsCommandBehavior(CommandBehavior.SequentialAccess)) || ((_sharedState._nextColumnDataToRead <= columnIndex) && (_lastColumnWithDataChunkRead <= columnIndex)), "Already read past column"); 3996Debug.Assert(IsCommandBehavior(CommandBehavior.SequentialAccess)); 4018Debug.Assert(_sharedState._nextColumnDataToRead <= _lastColumnWithDataChunkRead, "Non sequential access"); 4127Debug.Assert(timeoutToken == CancellationToken.None, "TimeoutToken is set when GetBytesAsyncReadDataStage is not a continuation"); 4154Debug.Assert(totalBytesRead <= length, "Read more bytes than required"); 4227Debug.Assert(result, "Should not have run out of data"); 4239Debug.Assert(result, "Should not have run out of data"); 4660Debug.Assert(current == source.Task, "Should not be able to change the _currentTask while an asynchronous operation is pending"); 4679Debug.Assert(!_stateObj._asyncReadWithoutSnapshot, "Can't prepare async invocation with snapshot if doing async without snapshots"); 4708Debug.Assert(_snapshot == null, "Can prepare async invocation without snapshot if there is currently a snapshot"); 4726Debug.Assert(_snapshot == null && !_stateObj._asyncReadWithoutSnapshot, "Snapshot not null or async without snapshot still enabled after cleaning async state"); 4753Debug.Assert(((_snapshot != null) || (_stateObj._asyncReadWithoutSnapshot)), "Can not prepare for an async continuation if no async if setup"); 4780Debug.Assert(_snapshot != null, "Should currently have a snapshot"); 4781Debug.Assert(_stateObj != null && !_stateObj._asyncReadWithoutSnapshot, "Already in async without snapshot");
fx\src\data\System\Data\SqlClient\SqlDataReaderSmi.cs (6)
145Debug.Assert(null != _currentColumnValuesV3, "Attempting to get variant internal storage type without calling GetValue first"); 1069Debug.Assert( _currentPosition != PositionState.AfterResults ); 1101Debug.Assert( _currentPosition != PositionState.AfterResults ); 1108Debug.Assert( _currentPosition != PositionState.AfterResults ); 1115Debug.Assert( _currentPosition != PositionState.AfterResults ); 1127Debug.Assert( _currentPosition != PositionState.AfterResults );
fx\src\data\System\Data\SqlClient\SqlDelegatedTransaction.cs (3)
45Debug.Assert(null != connection, "null connection?"); 230Debug.Assert(null != enlistment, "null enlistment?"); 313Debug.Assert(null != enlistment, "null enlistment?");
fx\src\data\System\Data\SqlClient\SqlDependency.cs (12)
48Debug.Assert( (identity == null && userName != null) || 117Debug.Assert(database != null, "Unexpected argument!"); 173Debug.Assert(eventHandler != null && dependency != null, "Unexpected arguments!"); 547Debug.Assert(result.GetType() == typeof(SqlDependencyProcessDispatcher), "Unexpected type stored in native!"); 751Debug.Assert(!ADP.IsEmpty(server) && !ADP.IsEmpty(database), "Server or Database null/Empty upon successfull Stop()!"); 870Debug.Assert(false, "Unexpected state - hash did not contain database!"); 875Debug.Assert(false, "Unexpected state - hash did not contain user!"); 880Debug.Assert(false, "Unexpected state - hash did not contain server!"); 951Debug.Assert(temp.Length == 1, "If databaseList.Count==1, why does copied array have length other than 1?"); 963Debug.Assert(!ADP.IsEmpty(result), "GetDefaultComposedOptions should never return null or empty string!"); 1046Debug.Assert(false, "Received notification twice - we should never enter this state!"); 1133Debug.Assert(0 == _eventList.Count, "How can we have an event at this point?");
fx\src\data\System\Data\SqlClient\SqlDependencyListener.cs (23)
263Debug.Assert(!ADP.IsEmpty(appDomainKey), "Unexpected empty appDomainKey!"); 272Debug.Assert(value > 0, "Why is value 0 or less?"); 276Debug.Assert(!_stopped, "We should not yet be stopped!"); 282Debug.Assert(0 == value, "We did not reach 0 at end of loop in AppDomainUnload!"); 283Debug.Assert(!_appDomainKeyHash.ContainsKey(appDomainKey), "Key not removed after AppDomainUnload!"); 550Debug.Assert(false, "Received notification but do not have an associated PerAppDomainDispatcher!"); 555Debug.Assert(false, "Unexpected ID format received!"); 560Debug.Assert(false, "Null notification returned from ProcessMessage!"); 565Debug.Assert(false, "Null payload for QN notification type!"); 586Debug.Assert(_com.Parameters.Count == 1, "Unexpected number of parameters!"); 594Debug.Assert(_com.Parameters.Count == 2, "Unexpected number of parameters!"); 758Debug.Assert(value > 0, "Unexpected count for appDomainKey"); 766Debug.Assert(false, "Unexpected AppDomainKey count in Stop()"); 776Debug.Assert(false, "Unexpected state on Stop() - no AppDomainKey entry in hashtable!"); 781Debug.Assert(_startCount > 0, "About to decrement _startCount less than 0!"); 842Debug.Assert(0 <= _startCount, "Invalid start count state"); 1255Debug.Assert(null == _staticInstance, "Real constructor called with static instance already created!"); 1349Debug.Assert(this == _staticInstance, "Instance method called on non _staticInstance instance!"); 1392Debug.Assert(this == _staticInstance, "Instance method called on non _staticInstance instance!"); 1431Debug.Assert(this == _staticInstance, "Instance method called on non _staticInstance instance!"); 1449Debug.Assert(this == _staticInstance, "Instance method called on non _staticInstance instance!"); 1480Debug.Assert(this == _staticInstance, "Instance method called on non _staticInstance instance!"); 1560Debug.Assert(this == _staticInstance, "Instance method called on non _staticInstance instance!");
fx\src\data\System\Data\SqlClient\SqlDependencyUtils.cs (5)
182Debug.Assert(false, "_commandHashToNotificationId has entries that were removed from _notificationIdToDependenciesHash. Remember to keep them in sync"); 220Debug.Assert(_notificationIdToDependenciesHash.Count == _commandHashToNotificationId.Count, "always keep these maps in sync!"); 405Debug.Assert(_notificationIdToDependenciesHash.Count == _commandHashToNotificationId.Count, "always keep these maps in sync!"); 439Debug.Assert(commandHashesToRemove.Count == notificationIdsToRemove.Count, "maps should be kept in sync"); 451Debug.Assert(_notificationIdToDependenciesHash.Count == _commandHashToNotificationId.Count, "always keep these maps in sync!");
fx\src\data\System\Data\SqlClient\SqlEnums.cs (5)
410Debug.Assert(false, "Unknown SqlType!"); 486Debug.Assert(attributes.Length > 0, failedAssertMessage); 691Debug.Assert(false, "Unknown type " + tdsType.ToString(CultureInfo.InvariantCulture)); 838Debug.Assert(cb == 8 || cb == 4, "Invalid date time size!"); 861Debug.Assert(length == 8, "invalid length for DateTime");
fx\src\data\System\Data\SqlClient\SqlException.cs (1)
156Debug.Assert(null != errorCollection && errorCollection.Count > 0, "no errorCollection?");
fx\src\data\System\Data\SqlClient\SqlInternalConnection.cs (5)
63Debug.Assert(null != connectionOptions, "null connectionOptions?"); 351Debug.Assert (!IsNonPoolableTransactionRoot, "cannot defect an active delegated transaction!"); // potential race condition, but it's an assert 386Debug.Assert(null != tx, "null transaction?"); 556Debug.Assert(!IsYukonOrNewer || null != CurrentTransaction, "delegated/enlisted transaction with null current transaction?"); 592Debug.Assert(!IsYukonOrNewer || null == CurrentTransaction, "unenlisted transaction with non-null current transaction?"); // verify it!
fx\src\data\System\Data\SqlClient\SqlInternalConnectionSmi.cs (12)
55Debug.Assert(null != connection, "null connection?"); 112Debug.Assert(null != smiContext, "null smiContext?"); 118Debug.Assert(null != _smiConnection, "null SmiContext.ContextConnection?"); 233Debug.Assert(false, "Activating an internal SMI connection?"); // we should never be activating, because that would indicate we're being pooled. 331Debug.Assert(_currentTransaction == null || _currentTransaction == internalTransaction, "disconnecting different transaction"); 370Debug.Assert(_smiEventSink.HasMessages || null != _currentTransaction, "begin transaction without TransactionStarted event?"); 374Debug.Assert(null != _currentTransaction, "commit transaction without TransactionStarted event?"); 380Debug.Assert(null != _currentTransaction, "promote transaction without TransactionStarted event?"); 386Debug.Assert(null != _currentTransaction, "rollback/ifrollback transaction without TransactionStarted event?"); 391Debug.Assert(null != _currentTransaction, "save transaction without TransactionStarted event?"); 396Debug.Assert (false, "unhandled case for TransactionRequest"); 512Debug.Assert(null == _currentTransaction, "non-null current transaction with an env change");
fx\src\data\System\Data\SqlClient\SqlInternalConnectionTds.cs (65)
98Debug.Assert(unrecoverableCount == _unrecoverableStatesCount, "Unrecoverable count does not match"); 354Debug.Assert(reconnectSessionData == null || connectionOptions.ConnectRetryCount > 0, "Reconnect data supplied with CR turned off"); 382Debug.Assert(newSecurePassword != null || newPassword != null, "cannot have both new secure change password and string based change password to be null"); 383Debug.Assert(credential == null || (String.IsNullOrEmpty(connectionOptions.UserID) && String.IsNullOrEmpty(connectionOptions.Password)), "cannot mix the new secure password system and the connection string based password"); 385Debug.Assert(credential == null || !connectionOptions.IntegratedSecurity, "Cannot use SqlCredential and Integrated Security"); 386Debug.Assert(credential == null || !connectionOptions.ContextConnection, "Cannot use SqlCredential with context connection"); 672Debug.Assert(executeTask == null, "Shouldn't get a task when doing sync writes"); 683Debug.Assert(parser != null && _fConnectionOpen || parser == null && !_fConnectionOpen, "Unexpected state on dispose"); 724Debug.Assert(!parser._physicalStateObj._pendingData, "Should not have a busy physicalStateObject at this point!"); 853Debug.Assert(null != _parser || IsConnectionDoomed, "Deactivating a disposed connection?"); 872Debug.Assert(!HasLocalTransactionFromAPI, "Upon ResetConnection SqlInternalConnectionTds has a currently ongoing local transaction."); 873Debug.Assert(!_parser._physicalStateObj._pendingData, "Upon ResetConnection SqlInternalConnectionTds has pending data."); 889Debug.Assert(executeTask == null, "Shouldn't get a task when doing sync writes"); 910Debug.Assert(_asyncCommandCount > 0); 1009Debug.Assert(false, "Promote called with transaction name or on pre-Yukon!"); 1028Debug.Assert(false, "Unknown transaction type"); 1033Debug.Assert(executeTask == null, "Shouldn't get a task when doing sync writes"); 1041Debug.Assert(null != internalTransaction, "Begin Transaction request without internal transaction"); 1086Debug.Assert(!ThreadHasParserLockForClose || _parserLock.ThreadMayHaveLock(), "Thread claims to have parser lock, but lock is not taken"); 1114Debug.Assert(false, "Unknown transaction type"); 1188Debug.Assert(null != dtcAddress, "null dtcAddress?"); 1236Debug.Assert(SniContext.Snix_Login == Parser._physicalStateObj.SniContext, String.Format((IFormatProvider)null, "SniContext should be Snix_Login; actual Value: {0}", Parser._physicalStateObj.SniContext)); 1466Debug.Assert(object.ReferenceEquals(connectionOptions, this.ConnectionOptions), "ConnectionOptions argument and property must be the same"); // consider removing the argument 1542Debug.Assert(SniContext.Undefined== Parser._physicalStateObj.SniContext, String.Format((IFormatProvider)null, "SniContext should be Undefined; actual Value: {0}", Parser._physicalStateObj.SniContext)); 1626Debug.Assert(ConnectionOptions.ApplicationIntent != ApplicationIntent.ReadOnly, "FAILOVER+AppIntent=RO: Should already fail (at LOGSHIPNODE in OnEnvChange)"); 1725Debug.Assert(!connectionOptions.MultiSubnetFailover, "MultiSubnetFailover should not be set if failover partner is used"); 1781Debug.Assert(SniContext.Undefined== Parser._physicalStateObj.SniContext, String.Format((IFormatProvider)null, "SniContext should be Undefined; actual Value: {0}", Parser._physicalStateObj.SniContext)); 1830Debug.Assert(SniContext.Undefined == Parser._physicalStateObj.SniContext, String.Format((IFormatProvider)null, "SniContext should be Undefined; actual Value: {0}", Parser._physicalStateObj.SniContext)); 2004Debug.Assert(obtainParserLock || _parserLock.ThreadMayHaveLock(), "Thread claims to have lock, but lock is not taken"); 2013Debug.Assert(lockToken is bool, "Lock token should be boolean"); 2024Debug.Assert(!ThreadHasParserLockForClose, "Cannot call this method if caller has parser lock"); 2100Debug.Assert(!IgnoreEnvChange,"This function should not be called if IgnoreEnvChange is set!"); 2178Debug.Assert(false, "Missed token in EnvChange!"); 2201Debug.Assert((ConnectionOptions.HasUserIdKeyword && ConnectionOptions.HasPasswordKeyword) 2206Debug.Assert(fedAuthInfo != null, "info should not be null."); 2207Debug.Assert(_dbConnectionPoolAuthenticationContextKey == null, "_dbConnectionPoolAuthenticationContextKey should be null."); 2223Debug.Assert(_dbConnectionPool.AuthenticationContexts != null); 2230Debug.Assert(dbConnectionPoolAuthenticationContext != null, "dbConnectionPoolAuthenticationContext should not be null."); 2266Debug.Assert(!attemptRefreshTokenLocked || fedAuthToken != null, "Either Lock should not have been obtained or fedAuthToken should not be null."); 2267Debug.Assert(!attemptRefreshTokenLocked || _newDbConnectionPoolAuthenticationContext != null, "Either Lock should not have been obtained or _newDbConnectionPoolAuthenticationContext should not be null."); 2285Debug.Assert(fedAuthToken != null, "fedAuthToken should not be null."); 2289Debug.Assert(_newDbConnectionPoolAuthenticationContext != null, "_newDbConnectionPoolAuthenticationContext should not be null."); 2293Debug.Assert(dbConnectionPoolAuthenticationContext != null, "dbConnectionPoolAuthenticationContext should not be null."); 2294Debug.Assert(fedAuthToken == null, "fedAuthToken should be null in this case."); 2295Debug.Assert(_newDbConnectionPoolAuthenticationContext == null, "_newDbConnectionPoolAuthenticationContext should be null."); 2304Debug.Assert(fedAuthToken != null && fedAuthToken.accessToken != null, "fedAuthToken and fedAuthToken.accessToken cannot be null."); 2317Debug.Assert(fedAuthInfo != null, "fedAuthInfo should not be null."); 2318Debug.Assert(dbConnectionPoolAuthenticationContext != null, "dbConnectionPoolAuthenticationContext should not be null."); 2342Debug.Assert(fedAuthToken != null, "fedAuthToken should not be null."); 2362Debug.Assert(fedAuthInfo != null, "fedAuthInfo should not be null."); 2428Debug.Assert(fedAuthToken.accessToken != null, "AccessToken should not be null."); 2474Debug.Assert(fedAuthToken != null, "fedAuthToken should not be null."); 2475Debug.Assert(fedAuthToken.accessToken != null && fedAuthToken.accessToken.Length > 0, "fedAuthToken.accessToken should not be null or empty."); 2505Debug.Assert(_currentSessionData._unrecoverableStatesCount == 0, "Unrecoverable states count should be 0"); 2539Debug.Assert(_fedAuthFeatureExtensionData != null, "_fedAuthFeatureExtensionData must not be null when _federatedAuthenticatonRequested == true"); 2552Debug.Assert(false, "Unknown _fedAuthLibrary type"); 2562Debug.Assert(_dbConnectionPool != null, "_dbConnectionPool should not be null when _newDbConnectionPoolAuthenticationContext != null."); 2567Debug.Assert(newAuthenticationContextInCacheAfterAddOrUpdate != null, "newAuthenticationContextInCacheAfterAddOrUpdate should not be null."); 2598Debug.Assert (_tceVersionSupported <= TdsEnums.MAX_SUPPORTED_TCE_VERSION, "Client support TCE version 2"); 2665Debug.Assert(_parserLock.ThreadMayHaveLock(), "Should not modify ThreadHasParserLockForClose without taking the lock first"); 2666Debug.Assert(_threadIdOwningParserLock == -1 || _threadIdOwningParserLock == Thread.CurrentThread.ManagedThreadId, "Another thread already claims to own the parser lock"); 2715Debug.Assert(null != userOptions); 2720Debug.Assert(serverName != null, "server name should never be null"); 2733Debug.Assert(null != userOptions && null!=routing); 2737Debug.Assert(routing.ServerName != null, "server name should never be null");
fx\src\data\System\Data\SqlClient\sqlinternaltransaction.cs (7)
150Debug.Assert(false, "Why are we calling IsOrphaned with no parent?"); 151Debug.Assert(_transactionType == TransactionType.LocalFromTSQL, "invalid state"); 189Debug.Assert(null != _parent, "Why are we calling Parent with no parent?"); 202Debug.Assert(NullTransactionId == _transactionId, "setting transaction cookie while one is active?"); 232Debug.Assert (innerConnection != null,"How can we be here if the connection is null?"); 299Debug.Assert (TransactionState.Active < transactionState, "invalid transaction completion state?"); 360Debug.Assert(_parent == null, "Why do we have a parent on InitParent?");
fx\src\data\System\Data\SqlClient\SqlParameter.cs (18)
176Debug.Assert(!(value is SqlDbType), "use SqlParameter(string, SqlDbType)"); 306Debug.Assert(null != _internalMetaType, "null InternalMetaType"); 551Debug.Assert(parameterName.Length <= TdsEnums.MAX_PARAMETER_NAME_LENGTH, "parameter name too long"); 879Debug.Assert(false, "Unknown variable length type!"); 898Debug.Assert(!(value is DataFeed), "Value provided should not already be a data feed"); 899Debug.Assert(!ADP.IsNull(value), "Value provided should not be null"); 900Debug.Assert(null != destinationType, "null destinationType"); 983Debug.Assert(allowStreaming || !coercedToDataFeed, "Streaming is not allowed, but type was coerced into a data feed"); 984Debug.Assert(value.GetType() == currentType ^ typeChanged, "Incorrect value for typeChanged"); 1040Debug.Assert(false, "_coercedValueIsDataFeed was true, but the value was not a known DataFeed type"); 1234Debug.Assert(i < sortCount, "SqlParameter.GetActualFieldsAndProperties: SortOrdinal hole-finding algorithm failed!"); 1398Debug.Assert(!isSqlType.HasValue || (isSqlType.Value == (value is INullable)), "isSqlType is incorrect"); 1399Debug.Assert(!isDataFeed.HasValue || (isDataFeed.Value == (value is DataFeed)), "isDataFeed is incorrect"); 1400Debug.Assert(!isNull.HasValue || (isNull.Value == ADP.IsNull(value)), "isNull is incorrect"); 1609Debug.Assert(false, "Missed metatype in SqlCommand.BuildParamList()"); 1640Debug.Assert(!((INullable)value).IsNull, "Should not call StringSize on null values"); 1668Debug.Assert(!((INullable)value).IsNull, "Should not call StringSize on null values"); 1735Debug.Assert(null != typeName, "null typename passed to ParseTypeName");
fx\src\data\System\Data\SqlClient\SqlReferenceCollection.cs (10)
24Debug.Assert(DataReaderTag == tag || CommandTag == tag || BulkCopyTag == tag, "unexpected tag?"); 25Debug.Assert(DataReaderTag != tag || value is SqlDataReader, "tag doesn't match object type: SqlDataReader"); 26Debug.Assert(CommandTag != tag || value is SqlCommand, "tag doesn't match object type: SqlCommand"); 27Debug.Assert(BulkCopyTag != tag || value is SqlBulkCopy, "tag doesn't match object type: SqlBulkCopy"); 53Debug.Assert(0 == message, "unexpected message?"); 54Debug.Assert(DataReaderTag == tag || CommandTag == tag || BulkCopyTag == tag, "unexpected tag?"); 57Debug.Assert(value is SqlDataReader, "Incorrect object type"); 64Debug.Assert(value is SqlCommand, "Incorrect object type"); 68Debug.Assert(value is SqlBulkCopy, "Incorrect object type"); 74Debug.Assert(value is SqlDataReader || value is SqlCommand || value is SqlBulkCopy, "SqlReferenceCollection.Remove expected a SqlDataReader or SqlCommand or SqlBulkCopy");
fx\src\data\System\Data\SqlClient\SqlSecurityUtility.cs (19)
33Debug.Assert(key != null && plainText != null); 34Debug.Assert(hash.Length != 0 && hash.Length <= MaxSHA256HashBytes); 50Debug.Assert(input != null); 80Debug.Assert (buffer2Index > -1 && buffer2Index < buffer2.Length, "invalid index");// bounds on buffer2Index 99Debug.Assert(input != null); 154Debug.Assert(serverName != null, @"serverName should not be null in EncryptWithKey."); 161Debug.Assert(md.IsAlgorithmInitialized(), "Encryption Algorithm is not initialized"); 178Debug.Assert(startIndex >= 0); 188Debug.Assert(serverName != null, @"serverName should not be null in DecryptWithKey."); 195Debug.Assert(md.IsAlgorithmInitialized(), "Decryption Algorithm is not initialized"); 217Debug.Assert(md != null, "md should not be null in DecryptSymmetricKey."); 229Debug.Assert(cipherAlgorithm != null); 239Debug.Assert(serverName != null, @"serverName should not be null in DecryptSymmetricKey."); 240Debug.Assert(sqlTceCipherInfoEntry.HasValue, "sqlTceCipherInfoEntry should not be null in DecryptSymmetricKey."); 241Debug.Assert(sqlTceCipherInfoEntry.Value.ColumnEncryptionKeyValues != null, 261Debug.Assert(null != lastException, "CEK decryption failed without raising exceptions"); 265Debug.Assert(encryptionkeyInfoChosen.HasValue, "encryptionkeyInfoChosen must have a value."); 274Debug.Assert(byteLength <= UInt16.MaxValue, @"Encrypted column encryption key cannot be larger than 65536 bytes"); 287Debug.Assert(SqlConnection.ColumnEncryptionTrustedMasterKeyPaths != null,
fx\src\data\System\Data\SqlClient\SqlSequentialStream.cs (2)
19Debug.Assert(reader != null, "Null reader when creating sequential stream"); 20Debug.Assert(columnIndex >= 0, "Invalid column index when creating sequential stream");
fx\src\data\System\Data\SqlClient\SqlSequentialTextReader.cs (18)
23Debug.Assert(reader != null, "Null reader when creating sequential textreader"); 24Debug.Assert(columnIndex >= 0, "Invalid column index when creating sequential textreader"); 25Debug.Assert(encoding != null, "Null encoding when creating sequential textreader"); 58Debug.Assert(_peekedChar == -1 || ((_peekedChar >= char.MinValue) && (_peekedChar <= char.MaxValue)), string.Format("Bad peeked character: {0}", _peekedChar)); 92Debug.Assert(readChar == -1 || ((readChar >= char.MinValue) && (readChar <= char.MaxValue)), string.Format("Bad read character: {0}", readChar)); 114Debug.Assert((_peekedChar >= char.MinValue) && (_peekedChar <= char.MaxValue), string.Format("Bad peeked character: {0}", _peekedChar)); 159Debug.Assert((_peekedChar >= char.MinValue) && (_peekedChar <= char.MaxValue), string.Format("Bad peeked character: {0}", _peekedChar)); 309Debug.Assert(buffer != null, "Null output buffer"); 310Debug.Assert((index >= 0) && (count >= 0) && (index + count <= buffer.Length), string.Format("Bad count: {0} or index: {1}", count, index)); 311Debug.Assert(!IsClosed, "Can't read while textreader is closed"); 342Debug.Assert(numberOfChars >= 0, "Can't prepare a byte buffer for negative characters"); 392Debug.Assert(inBuffer != null, "Null input buffer"); 393Debug.Assert((inBufferCount > 0) && (inBufferCount <= inBuffer.Length), string.Format("Bad inBufferCount: {0}", inBufferCount)); 394Debug.Assert(outBuffer != null, "Null output buffer"); 395Debug.Assert((outBufferOffset >= 0) && (outBufferCount > 0) && (outBufferOffset + outBufferCount <= outBuffer.Length), string.Format("Bad outBufferCount: {0} or outBufferOffset: {1}", outBufferCount, outBufferOffset)); 411Debug.Assert(bytesUsed >= inBufferCount, "Converted completed, but not all bytes were used"); 415Debug.Assert(((_reader == null) || (_reader.ColumnDataBytesRemaining() > 0) || (!completed) || (_leftOverBytes == null)), "Stream has run out of data and the decoder finished, but there are leftover bytes"); 416Debug.Assert(charsRead > 0, "Converted no chars. Bad encoding?");
fx\src\data\System\Data\SqlClient\SqlSequentialTextReaderSmi.cs (3)
39Debug.Assert(_peekedChar == -1 || ((_peekedChar >= char.MinValue) && (_peekedChar <= char.MaxValue)), string.Format("Bad peeked character: {0}", _peekedChar)); 70Debug.Assert(readChar == -1 || ((readChar >= char.MinValue) && (readChar <= char.MaxValue)), string.Format("Bad read character: {0}", readChar)); 86Debug.Assert((_peekedChar >= char.MinValue) && (_peekedChar <= char.MaxValue), string.Format("Bad peeked character: {0}", _peekedChar));
fx\src\data\System\Data\SqlClient\SqlStatistics.cs (1)
126Debug.Assert(_startExecutionTimestamp!=0, "No network time expected outside execution period");
fx\src\data\System\Data\SqlClient\SqlStream.cs (3)
161Debug.Assert(reader != null && !reader.IsClosed); 218Debug.Assert(cb == count); 545Debug.Assert(charsToSkip == 0);
fx\src\data\System\Data\SqlClient\SqlSymmetricKeyCache.cs (2)
39Debug.Assert(serverName != null, @"serverName should not be null."); 62Debug.Assert(SqlConnection.ColumnEncryptionTrustedMasterKeyPaths != null, @"SqlConnection.ColumnEncryptionTrustedMasterKeyPaths should not be null");
fx\src\data\System\Data\SqlClient\SqlTransaction.cs (1)
41Debug.Assert(internalConnection.CurrentTransaction == internalTransaction, "Unexpected Parser.CurrentTransaction state!");
fx\src\data\System\Data\SqlClient\SqlUtil.cs (11)
59Debug.Assert((connectionToAbort == null) || (connectionToDoom == null), "Should not specify both connectionToDoom and connectionToAbort"); 158Debug.Assert(ae.InnerExceptions.Count == 1, "There is more than one exception in AggregateException"); 874Debug.Assert(2 == validLocations.Length); 902Debug.Assert(2 == validLocations.Length); 993Debug.Assert(2 == validLocations.Length); 1630Debug.Assert(false, "UnexpectedSmiEvent: "+eventType.ToString()); // Assert here, because these exceptions will most likely be eaten by the server. 1675Debug.Assert(sniError > 0 && sniError <= (int)SNINativeMethodWrapper.SniSpecialErrors.MaxErrorValue, "SNI error is out of range"); 1807Debug.Assert(!ADP.IsEmpty(name), "null or empty identifiers are not allowed"); 1815Debug.Assert(builder != null, "builder cannot be null"); 1816Debug.Assert(!ADP.IsEmpty(name), "null or empty identifiers are not allowed"); 1827Debug.Assert(input != null, "input string cannot be null");
fx\src\data\System\Data\SqlClient\TdsParameterSetter.cs (2)
54Debug.Assert(0==ordinal, "TdsParameterSetter only supports 0 for ordinal. Actual = " + ordinal); 61Debug.Assert(0==ordinal, "TdsParameterSetter only supports 0 for ordinal. Actual = " + ordinal);
fx\src\data\System\Data\SqlClient\TdsParser.cs (339)
280Debug.Assert(value == _currentTransaction 334Debug.Assert (null != value, "setting a non-null PendingTransaction?"); 375Debug.Assert(_nonTransactedOpenResultCount >= 0, "Unexpected result count state"); 385Debug.Assert(_nonTransactedOpenResultCount >= 0, "Unexpected result count state"); 408Debug.Assert(false, "TdsParser.Connect called on non-closed connection!"); 420Debug.Assert(false, "SNI returned status != success, but no error thrown?"); 451Debug.Assert(_connHandler != null, "SqlConnectionInternalTds handler can not be null at this point."); 483Debug.Assert(false, "SNI returned status != success, but no error thrown?"); 507Debug.Assert(result == TdsEnums.SNI_SUCCESS, "Unexpected failure state upon calling SniGetConnectionId"); 537Debug.Assert(retCode == TdsEnums.SNI_SUCCESS, "Unexpected failure state upon calling SniGetConnectionId"); 562Debug.Assert(!integratedSecurity, "The legacy Integrated Security connection string option cannot be true when using Active Directory Authentication Library for SQL Server Based workflows."); 576Debug.Assert(_encryptionOption == EncryptionOptions.LOGIN, "Invalid encryption option state"); 626Debug.Assert(IntPtr.Zero == temp, "unexpected syncReadPacket without corresponding SNIPacketRelease"); 628Debug.Assert(TdsEnums.SNI_SUCCESS != error, "Unexpected successfull read async on physical connection before enabling MARS!"); 653Debug.Assert(!session._pendingData, "pending data on a pooled MARS session"); 664Debug.Assert(session._outputPacketNumber==1, "The packet number is expected to be 1"); 677Debug.Assert(session == _physicalStateObj, "MARS is off, but session to close is not the _physicalStateObj"); 826Debug.Assert(GUID_SIZE == connectionIdBytes.Length); 853Debug.Assert(false, "UNKNOWN option in SendPreLoginHandshake"); 880Debug.Assert(_physicalStateObj._syncOverAsync, "Should not attempt pends in a synchronous call"); 898Debug.Assert(_physicalStateObj._syncOverAsync, "Should not attempt pends in a synchronous call"); 977Debug.Assert(false, "Invalid client encryption option detected"); 1054Debug.Assert(payload[payloadOffset] == 0 || payload[payloadOffset] == 1, "Value for Mars PreLoginHandshake option not equal to 1 or 0!"); 1084Debug.Assert(false, "UNKNOWN option in ConsumePreLoginHandshake, option:" + option); 1118Debug.Assert(connectionIsDoomed || null == _pendingTransaction, "pending transaction at disconnect?"); 1142Debug.Assert(null == CurrentTransaction, "rollback didn't clear current transaction?"); 1192Debug.Assert(connection != null && _connHandler.Connection == connection); 1214Debug.Assert(_currentTransaction != null && _currentTransaction == internalTransaction, "disconnecting different transaction"); 1227Debug.Assert(null == CurrentTransaction, "rollback didn't clear current transaction?"); 1232Debug.Assert(!callerHasConnectionLock || _connHandler._parserLock.ThreadMayHaveLock(), "Caller claims to have lock, but connection lock is not taken"); 1244Debug.Assert(temp.Count > 0, "TdsParser::ThrowExceptionAndWarning called with no exceptions or warnings!"); 1249Debug.Assert(_connHandler != null, "TdsParser::ThrowExceptionAndWarning called with null connectionHandler!"); 1267Debug.Assert(temp != null, "TdsParser::ThrowExceptionAndWarning: 0 errors in collection"); 1380Debug.Assert(!ADP.IsEmpty(errorMessage),"Empty error message received from SNI"); 1386Debug.Assert(!ADP.IsEmpty(providerName), String.Format((IFormatProvider)null,"invalid providerResourceId '{0}'", providerRid)); 1394Debug.Assert(0<=iColon, "':' character missing in sni errorMessage"); 1395Debug.Assert(errorMessage.Length>iColon+1 && errorMessage[iColon+1]==' ', "Expecting a space after the ':' character"); 1434Debug.Assert(stateObj._outputPacketNumber == 1 || stateObj._outputPacketNumber == 2, "In ResetConnection logic unexpectedly!"); 1454Debug.Assert(_connHandler != null, "SqlConnectionInternalTds handler can not be null at this point."); 1456Debug.Assert(_connHandler._parserLock.ThreadMayHaveLock(), "Thread is writing without taking the connection lock"); 1464Debug.Assert(!stateObj._fResetConnectionSent, "Unexpected state for sending reset connection"); 1465Debug.Assert(_isShiloh, "TdsParser.cs: Error! _fResetConnection true when not going against Shiloh or later!"); 1485Debug.Assert(!stateObj._fResetConnectionSent, "Unexpected state on WritePacket ResetConnection"); 1490Debug.Assert(!stateObj._fResetEventOwned, "Invalid AutoResetEvent state!"); 1498Debug.Assert(!stateObj._fResetEventOwned, "Invalid AutoResetEvent state!"); 1521Debug.Assert(2 == stateObj._bShortBytes.Length); 1570Debug.Assert (4 == stateObj._bIntBytes.Length); 1629Debug.Assert (8 == bytes.Length, "Cached buffer has wrong size"); 1671Debug.Assert(length <= 8, "Length specified is longer than the size of a long"); 1672Debug.Assert(length >= 0, "Length should not be negative"); 1686Debug.Assert(length <= 8, "Length specified is longer than the size of a long"); 1687Debug.Assert(length >= 0, "Length should not be negative"); 1774Debug.Assert(result == true, "Should never return false when _syncOverAsync is set"); 1822Debug.Assert((SniContext.Undefined != stateObj.SniContext) && // SniContext must not be Undefined 1835Debug.Assert(!dataReady, "dataReady not expected - did we forget to skip the row?"); 1871Debug.Assert(false, String.Format((IFormatProvider)null, "unexpected token; token = {0,-2:X2}", token)); 1898Debug.Assert(error.Class < TdsEnums.MIN_ERROR_CLASS, "INFO with class > TdsEnums.MIN_ERROR_CLASS"); 2084Debug.Assert(null == _currentTransaction, "non-null current transaction with an ENV Change"); 2218Debug.Assert(stateObj._cleanupMetaData != null, "Reading a row, but the metadata is null"); 2276Debug.Assert(stateObj._syncOverAsync, "ProcessSSPI does not support retry, do not attempt asynchronously"); 2300Debug.Assert(false, "Unhandled token: " + token.ToString(CultureInfo.InvariantCulture)); 2304Debug.Assert(stateObj._pendingData || !dataReady, "dataReady is set, but there is no pending data"); 2337Debug.Assert(stateObj._attentionSent, "Attention ACK has been received without attention sent"); 2397Debug.Assert(!_isShiloh, "Received ENV_CHARSET on non 7.0 server!"); 2406Debug.Assert(env.newValue.Length > TdsEnums.CHARSET_CODE_PAGE_OFFSET, "TdsParser.ProcessEnvChange(): charset value received with length <=10"); 2418Debug.Assert(stateObj._syncOverAsync, "Should not attempt pends in a synchronous call"); 2436Debug.Assert(result == TdsEnums.SNI_SUCCESS, "Unexpected failure state upon calling SNISetInfo"); 2457Debug.Assert(env.newLength == 5 || env.newLength == 0, "Improper length in new collation!"); 2481Debug.Assert(env.oldLength == 5 || env.oldLength == 0, "Improper length in old collation!"); 2497Debug.Assert(_isYukon, "Received new ENVCHANGE transaction/DTC token on pre 9.0 server!"); 2503Debug.Assert(env.newLength == 0 || env.newLength == 8, "Improper length for new transaction id!"); 2509Debug.Assert(env.newLongValue != SqlInternalTransaction.NullTransactionId, "New transaction id is null?"); // the server guarantees that zero is an invalid transaction id. 2519Debug.Assert(env.oldLength == 0 || env.oldLength == 8, "Improper length for old transaction id!"); 2525Debug.Assert(env.oldLongValue != SqlInternalTransaction.NullTransactionId, "Old transaction id is null?"); // the server guarantees that zero is an invalid transaction id. 2544Debug.Assert(_isYukon, "Received new ENVCHANGE tokens on pre 9.0 server!"); 2558Debug.Assert(0 == env.oldLength, "old length should be zero"); 2567Debug.Assert(_isYukon, "Received new ENVCHANGE tokens on pre 9.0 server!"); 2574Debug.Assert(!_isYukon, "Received ENV_USERINSTANCE on non 9.0 server!"); 2614Debug.Assert(false, "Unknown environment change token: " + env.type); 2731Debug.Assert(TdsEnums.DONE_MORE != (status & TdsEnums.DONE_MORE),"Not expecting DONE_MORE when receiving DONE_ATTN"); 2732Debug.Assert(stateObj._attentionSent, "Received attention done without sending one!"); 2734Debug.Assert(stateObj._inBytesUsed == stateObj._inBytesRead && stateObj._inBytesPacket == 0, "DONE_ATTN received with more data left on wire"); 2978Debug.Assert(sdata._unrecoverableStatesCount > 0, "Unrecoverable states count >0"); 3107Debug.Assert(_state == TdsParserState.OpenNotLoggedIn, "ProcessLoginAck called with state not TdsParserState.OpenNotLoggedIn"); 3273Debug.Assert(((errorClass >= TdsEnums.MIN_ERROR_CLASS) && token == TdsEnums.SQLERROR) || 3440Debug.Assert(_isYukon, "plp data from pre-Yukon server"); 3545Debug.Assert(valLen < (ulong)(Int32.MaxValue), "ProcessReturnValue received data size > 2Gb"); 3573Debug.Assert(isReturnValue == (cipherTable == null), "Ciphertable is not set iff this is a return value"); 3634Debug.Assert(col.cipherMD == null, "col.cipherMD should be null in TryProcessTceCryptoMetadata."); 3692Debug.Assert(0 != codePage, "GetCodePage accessed codepage array and produced 0!, sortID =" + ((Byte)(collation.sortId)).ToString((IFormatProvider)null)); 3867Debug.Assert(cColumns > 0, "should have at least 1 column in altMetaData!"); 4109Debug.Assert(cColumns > 0, "should have at least 1 column in metadata!"); 4175Debug.Assert(tdsType == TdsEnums.SQLXMLTYPE || 4182Debug.Assert(col.metaType.IsLong, "Max datatype not IsLong"); 4237Debug.Assert(0 <= col.scale && col.scale <= 7); 4256Debug.Assert(false, "Unknown VariableTime type!"); 4547Debug.Assert(nParts == 0 , "ProcessTableName:Unidentified parts in the table name token stream!"); 4569Debug.Assert(columns != null && columns.Length > 0, "no metadata available!"); 4609Debug.Assert(reader.TableNames.Length >= col.tableNum, "invalid tableNames array!"); 4698Debug.Assert((token == TdsEnums.SQLALTROW), ""); 4722Debug.Assert(md != null, "_SqlMetaData should not be null for column " + i.ToString(CultureInfo.InvariantCulture)); 4771Debug.Assert(SqlCommandColumnEncryptionSetting.UseConnectionSetting == columnEncryptionSetting, 4885Debug.Assert(false, "unknown null sqlType!" + md.type.ToString()); 4923Debug.Assert(!md.metaType.IsPlp, "Plp types must be handled using SkipPlpValue"); 5029Debug.Assert(false, "Unknown tds type for SqlString!" + type.ToString(CultureInfo.InvariantCulture)); 5051Debug.Assert (false == md.baseTI.isEncrypted, "Double encryption detected"); 5061Debug.Assert(length == 8, "invalid length for SqlInt64 type!"); 5097Debug.Assert(length == 4, "invalid length for SqlSingle type!"); 5170Debug.Assert(length == 16, "invalid length for SqlGuid type!"); 5182Debug.Assert(length <= TdsEnums.MAXSIZE, "Plp data decryption attempted"); 5257Debug.Assert(length == 3, "invalid length for date type!"); 5263Debug.Assert(length == 5, "invalid length for time type!"); 5269Debug.Assert(length == 8, "invalid length for datetime2 type!"); 5275Debug.Assert(length == 10, "invalid length for datetimeoffset type!"); 5302Debug.Assert(isPlp || !IsNull(md.metaType, (ulong)length), "null value should not get here!"); 5399Debug.Assert(!isPlp, "ReadSqlValue calling ReadSqlValueInternal with plp data"); 5406Debug.Assert((stateObj._longlen == 0) && (stateObj._longlenleft == 0), "ReadSqlValue did not read plp field completely, longlen =" + stateObj._longlen.ToString((IFormatProvider)null) + ",longlenleft=" + stateObj._longlenleft.ToString((IFormatProvider)null)); 5419Debug.Assert(length == 3, "invalid length for date type!"); 5424Debug.Assert(3 <= length && length <= 5, "invalid length for time type!"); 5429Debug.Assert(6 <= length && length <= 8, "invalid length for datetime2 type!"); 5434Debug.Assert(8 <= length && length <= 10, "invalid length for datetimeoffset type!"); 5439Debug.Assert(false, "ReadSqlDateTime is called with the wrong tdsType"); 5450Debug.Assert(length == 1, "invalid length for SqlBoolean type!"); 5473Debug.Assert(length == 1, "invalid length for SqlByte type!"); 5481Debug.Assert(length == 2, "invalid length for SqlInt16 type!"); 5490Debug.Assert(length == 4, "invalid length for SqlInt32 type!"); 5499Debug.Assert(length == 8, "invalid length for SqlInt64 type!"); 5516Debug.Assert(length == 4, "invalid length for SqlSingle type!"); 5525Debug.Assert(length == 8, "invalid length for SqlDouble type!"); 5599Debug.Assert(length == 16, "invalid length for SqlGuid type!"); 5617Debug.Assert(length <= TdsEnums.MAXSIZE); 5634Debug.Assert(false, "Unknown SqlType!" + tdsType.ToString(CultureInfo.InvariantCulture)); 5653Debug.Assert(_isShiloh == true, "Shouldn't be dealing with sql_variaint in pre-SQL2000 server!"); 5673Debug.Assert(cbPropsActual >= cbPropsExpected, "cbPropsActual is less that cbPropsExpected!"); 5699Debug.Assert(cbPropsExpected == 2, "SqlVariant: invalid PropBytes for decimal/numeric type!"); 5726Debug.Assert(cbPropsExpected == 2, "SqlVariant: invalid PropBytes for binary type!"); 5731Debug.Assert(lenMax != TdsEnums.SQL_USHORTVARMAXLEN, "bigvarbinary(max) in a sqlvariant"); 5747Debug.Assert(cbPropsExpected == 7, "SqlVariant: invalid PropBytes for character type!"); 5757Debug.Assert(lenMax != TdsEnums.SQL_USHORTVARMAXLEN, "bigvarchar(max) or nvarchar(max) in a sqlvariant"); 5782Debug.Assert(cbPropsExpected == 1, "SqlVariant: invalid PropBytes for time/datetime2/datetimeoffset type!"); 5803Debug.Assert(false, "Unknown tds type in SqlVariant!" + type.ToString(CultureInfo.InvariantCulture)); 5817Debug.Assert(_isShiloh == true, "Shouldn't be dealing with sql_variant in pre-SQL2000 server!"); 5908Debug.Assert((length == b.Length) && (length == 16), "Invalid length for guid type in com+ object"); 5960Debug.Assert(false, "unknown tds type for sqlvariant!"); 5981Debug.Assert(_isShiloh == true, "Shouldn't be dealing with sql_variant in pre-SQL2000 server!"); 6064Debug.Assert(length == 16, "Invalid length for guid type in com+ object"); 6124Debug.Assert(false, "unknown tds type for sqlvariant!"); 6206Debug.Assert (8 == length, "invalid length in SerializeCurrency"); 6367Debug.Assert((length > 0) && 6497Debug.Assert(null != stateObj._decimalBits, "decimalBits should be filled in at TdsExecuteRPC time"); 6710Debug.Assert(byteData != null, "no data from encoding"); 6744Debug.Assert(colmeta.tdsType == TdsEnums.SQLXMLTYPE || 6771Debug.Assert(token != 0, "0 length token!"); 6798Debug.Assert(tokenLength == TdsEnums.SQL_USHORTVARMAXLEN, "Invalid token stream for xml datatype"); 6838Debug.Assert(false, "Unknown token length!"); 6848Debug.Assert(stateObj._attentionSent, "invalid attempt to ProcessAttention, attentionSent == false!"); 6881Debug.Assert(!stateObj._attentionSent, "Invalid attentionSent state at end of ProcessAttention"); 6900Debug.Assert(reconnectData._unrecoverableStatesCount == 0, "Unrecoverable state count should be 0"); 6917Debug.Assert(reconnectData._delta[i]._recoverable, "State should be recoverable"); 6977Debug.Assert(fedAuthFeatureData.libraryType == TdsEnums.FedAuthLibrary.ADAL || fedAuthFeatureData.libraryType == TdsEnums.FedAuthLibrary.SecurityToken, 6989Debug.Assert(fedAuthFeatureData.accessToken != null, "AccessToken should not be null."); 6993Debug.Assert(false, "Unrecognized library type for fedauth feature extension request"); 7009Debug.Assert(_connHandler._federatedAuthenticationInfoRequested == true, "_federatedAuthenticationInfoRequested field should be true"); 7013Debug.Assert(_connHandler._federatedAuthenticationRequested == true, "_federatedAuthenticationRequested field should be true"); 7017Debug.Assert(false, "Unrecognized FedAuthLibrary type for feature extension request"); 7043Debug.Assert(false, "Unrecognized Authentication type for fedauth ADAL request"); 7054Debug.Assert(false, "Unrecognized FedAuthLibrary type for feature extension request"); 7110Debug.Assert(recoverySessionData == null || (requestedFeatures & TdsEnums.FeatureExtension.SessionRecovery) != 0, "Recovery session data without session recovery feature request"); 7111Debug.Assert(TdsEnums.MAXLEN_HOSTNAME>=rec.hostName.Length, "_workstationId.Length exceeds the max length for this value"); 7113Debug.Assert(!(rec.useSSPI && _connHandler._fedAuthRequired), "Cannot use SSPI when server has responded 0x01 for FedAuthRequired PreLogin Option."); 7114Debug.Assert(!rec.useSSPI || (requestedFeatures & TdsEnums.FeatureExtension.FedAuth) == 0, "Cannot use both SSPI and FedAuth"); 7115Debug.Assert(fedAuthFeatureExtensionData == null || (requestedFeatures & TdsEnums.FeatureExtension.FedAuth) != 0, "fedAuthFeatureExtensionData provided without fed auth feature request"); 7116Debug.Assert(fedAuthFeatureExtensionData != null || (requestedFeatures & TdsEnums.FeatureExtension.FedAuth) == 0, "Fed Auth feature requested without specifying fedAuthFeatureExtensionData."); 7118Debug.Assert(rec.userName == null || (rec.userName != null && TdsEnums.MAXLEN_USERNAME >= rec.userName.Length), "_userID.Length exceeds the max length for this value"); 7119Debug.Assert(rec.credential == null || (rec.credential != null && TdsEnums.MAXLEN_USERNAME >= rec.credential.UserId.Length), "_credential.UserId.Length exceeds the max length for this value"); 7121Debug.Assert(rec.password == null || (rec.password != null && TdsEnums.MAXLEN_PASSWORD>=rec.password.Length), "_password.Length exceeds the max length for this value"); 7122Debug.Assert(rec.credential == null || (rec.credential != null && TdsEnums.MAXLEN_PASSWORD >= rec.credential.Password.Length), "_credential.Password.Length exceeds the max length for this value"); 7124Debug.Assert(rec.credential != null || rec.userName != null || rec.password != null, "cannot mix the new secure password system and the connection string based password"); 7125Debug.Assert(rec.newSecurePassword != null || rec.newPassword != null, "cannot have both new secure change password and string based change password"); 7126Debug.Assert(TdsEnums.MAXLEN_APPNAME>=rec.applicationName.Length, "_applicationName.Length exceeds the max length for this value"); 7127Debug.Assert(TdsEnums.MAXLEN_SERVERNAME>=rec.serverName.Length, "_dataSource.Length exceeds the max length for this value"); 7128Debug.Assert(TdsEnums.MAXLEN_LANGUAGE>=rec.language.Length, "_currentLanguage .Length exceeds the max length for this value"); 7129Debug.Assert(TdsEnums.MAXLEN_DATABASE>=rec.database.Length, "_initialCatalog.Length exceeds the max length for this value"); 7130Debug.Assert(TdsEnums.MAXLEN_ATTACHDBFILE>=rec.attachDBFilename.Length, "_attachDBFileName.Length exceeds the max length for this value"); 7132Debug.Assert(_connHandler != null, "SqlConnectionInternalTds handler can not be null at this point."); 7171Debug.Assert(TdsEnums.MAXLEN_CLIENTINTERFACE >= clientInterfaceName.Length, "cchCltIntName can specify at most 128 unicode characters. See Tds spec"); 7205Debug.Assert(SniContext.Snix_Login==_physicalStateObj.SniContext, String.Format((IFormatProvider)null, "Unexpected SniContext. Expecting Snix_Login, actual value is '{0}'", _physicalStateObj.SniContext)); 7227Debug.Assert(fedAuthFeatureExtensionData != null, "fedAuthFeatureExtensionData should not null."); 7464Debug.Assert(fedAuthFeatureExtensionData != null, "fedAuthFeatureExtensionData should not null."); 7501Debug.Assert(fedAuthToken != null, "fedAuthToken cannot be null"); 7502Debug.Assert(fedAuthToken.accessToken != null, "fedAuthToken.accessToken cannot be null"); 7554Debug.Assert(_physicalStateObj._syncOverAsync, "Should not attempt pends in a synchronous call"); 7577Debug.Assert(!ADP.IsEmpty(procedure), "TdsParser.SSPIError called with an empty or null procedure string"); 7578Debug.Assert(!ADP.IsEmpty(error), "TdsParser.SSPIError called with an empty or null error string"); 7628Debug.Assert(authentication == SqlAuthenticationMethod.ActiveDirectoryIntegrated || authentication == SqlAuthenticationMethod.ActiveDirectoryPassword); 7653Debug.Assert(SniContext.Snix_Read==stateObj.SniContext, String.Format((IFormatProvider)null, "The SniContext should be Snix_Read but it actually is {0}", stateObj.SniContext)); 7655Debug.Assert(dtcReader.GetName(0) == "TM Address", "TdsParser: GetDTCAddress did not return 'TM Address'"); 7701Debug.Assert(this == stateObj.Parser, "different parsers"); 7718Debug.Assert(!_connHandler.ThreadHasParserLockForClose || _connHandler._parserLock.ThreadMayHaveLock(), "Thread claims to have parser lock, but lock is not taken"); 7744Debug.Assert(stateObj._outBytesUsed == stateObj._outputHeaderLen, "Output bytes written before total header length"); 7772Debug.Assert(IsYukonOrNewer, "Should not be calling TdsExecuteTransactionManagerRequest on pre-Yukon clients for BeginTransaction!"); 7773Debug.Assert(null != transaction, "Should have specified an internalTransaction when doing a BeginTransaction request!"); 7790Debug.Assert(_currentTransaction == null || true == _fResetConnection, "We should not have a current Tx at this point"); 7800Debug.Assert(IsYukonOrNewer, "Should not be calling TdsExecuteTransactionManagerRequest on pre-Yukon clients for PromoteTransaction!"); 7806Debug.Assert(IsYukonOrNewer, "Should not be calling TdsExecuteTransactionManagerRequest on pre-Yukon clients for CommitTransaction!"); 7808Debug.Assert(transactionName.Length == 0, "Should not have a transaction name on Commit"); 7813Debug.Assert(isoLevel == TdsEnums.TransactionManagerIsolationLevel.Unspecified, "Should not have isolation level other than unspecified on Commit!"); 7818Debug.Assert(IsYukonOrNewer, "Should not be calling TdsExecuteTransactionManagerRequest on pre-Yukon clients for RollbackTransaction!"); 7825Debug.Assert(isoLevel == TdsEnums.TransactionManagerIsolationLevel.Unspecified, "Should not have isolation level other than unspecified on Commit!"); 7830Debug.Assert(IsYukonOrNewer, "Should not be calling TdsExecuteTransactionManagerRequest on pre-Yukon clients for SaveTransaction!"); 7836Debug.Assert(false, "Unexpected TransactionManagerRequest"); 7841Debug.Assert(writeTask == null, "Writes should not pend when writing sync"); 7849Debug.Assert(this == stateObj.Parser, "different parser"); 7910Debug.Assert(_connHandler._parserLock.ThreadMayHaveLock(), "Should not be calling into FailureCleanup without first taking the parser lock"); 7953Debug.Assert(!_connHandler.ThreadHasParserLockForClose || sync, "Thread shouldn't claim to have the parser lock if we are doing async writes"); // Since we have the possibility of pending with async writes, make sure the thread doesn't claim to already have the lock 7954Debug.Assert(needToTakeParserLock || _connHandler._parserLock.ThreadMayHaveLock(), "Thread or caller claims to have connection lock, but lock is not taken"); 7999Debug.Assert(!sync, "Should not have gotten a Task when writing in sync mode"); 8005Debug.Assert(!t.IsCanceled, "Task should not be canceled"); 8049Debug.Assert(cmd != null, @"cmd cannot be null inside TdsExecuteRPC"); 8050Debug.Assert(!firstCall || startRpc == 0, "startRpc is not 0 on first call"); 8051Debug.Assert(!firstCall || startParam == 0, "startParam is not 0 on first call"); 8052Debug.Assert(!firstCall || !_connHandler.ThreadHasParserLockForClose, "Thread should not already have connection lock"); 8053Debug.Assert(firstCall || _connHandler._parserLock.ThreadMayHaveLock(), "Connection lock not taken after the first call"); 8107Debug.Assert(rpcext.ProcID < 255, "rpcExec:ProcID can't be larger than 255"); 8112Debug.Assert(!ADP.IsEmpty(rpcext.rpcName), "must have an RPC name"); 8249Debug.Assert(mt.TDSType != TdsEnums.SQLVARIANT && 8270Debug.Assert(serializedValue != null, "serializedValue should not be null in TdsExecuteRPC."); 8277Debug.Assert(encryptedValue != null && encryptedValue.Length > 0, 8299Debug.Assert(isParameterEncrypted == (encryptedParameterInfoToWrite != null), 8302Debug.Assert(!isSqlVal || !isParameterEncrypted, "isParameterEncrypted can be true only if isSqlVal is false."); 8335Debug.Assert(value is SqlChars, "Unknown value for Ansi datatype"); 8377Debug.Assert(_isYukon, "Invalid DataType UDT for non-Yukon or later server!"); 8382Debug.Assert(null != udtVal, "GetBytes returned null instance. Make sure that it always returns non-null value"); 8503Debug.Assert(_defaultCollation != null, "_defaultCollation is null!"); 8581Debug.Assert(!sync || execFlushTask == null, "Should not get a task when executing sync"); 8626Debug.Assert(firstCall || !releaseConnectionLock, "Shouldn't be releasing locks synchronously after the first call"); 8748Debug.Assert(parameterName.Length <= 0xff, "parameter name can only be 255 bytes, shouldn't get to TdsParser!"); 8992Debug.Assert(false, "SUDTs not yet supported."); 9011Debug.Assert(false, "Unknown SqlDbType should have been caught earlier!"); 9017Debug.Assert(SqlDbType.Structured == metaData.SqlDbType && metaData.IsMultiValued, 9180Debug.Assert (8 == cekTable[i].CekMdVersion.Length); 9223Debug.Assert(SqlDbType.Xml != mdPriv.type); 9224Debug.Assert(SqlDbType.Udt != mdPriv.type); 9274Debug.Assert (md.cipherMD.CipherAlgorithmName.Length < 256); 9395Debug.Assert (_serverSupportsColumnEncryption, "Server doesn't support encryption, yet we received encryption metadata"); 9396Debug.Assert (ShouldEncryptValuesForBulkCopy(), "Encryption attempted when not requested"); 9482Debug.Assert(serializedValue != null, "serializedValue should not be null in TdsExecuteRPC."); 9490Debug.Assert(!isSqlType || value is INullable, "isSqlType is true, but value can not be type cast to an INullable"); 9491Debug.Assert(!isDataFeed ^ value is DataFeed, "Incorrect value for isDataFeed"); 9579Debug.Assert(metatype.IsLong && 9620Debug.Assert(_asyncWrite || stateObj.WaitForAccumulatedWrites() == null, "Should not have accumulated writes when writing sync"); 9662Debug.Assert(_isYukon, "WriteMarsHeaderData called on a non-Yukon server"); 9729Debug.Assert(_isYukon, "WriteQueryNotificationHeaderData called on a non-Yukon server"); 9733Debug.Assert (null != notificationRequest, "notificaitonRequest is null"); 9740Debug.Assert(null != callbackId, "CallbackId is null"); 9741Debug.Assert(UInt16.MaxValue >= callbackId.Length, "CallbackId length is out of range"); 9742Debug.Assert(null != service, "Service is null"); 9743Debug.Assert(UInt16.MaxValue >= service.Length, "Service length is out of range"); 9744Debug.Assert(-1 <= timeout, "Timeout"); 9762Debug.Assert(this.IncludeTraceHeader, "WriteTraceHeaderData can only be called on a Denali or higher version server and bid trace with the control bit are on"); 9777Debug.Assert(_isYukon, "WriteRPCBatchHeaders can only be called on Yukon or higher version servers"); 9801Debug.Assert(stateObj._outBytesUsed == stateObj._outputHeaderLen, "Output bytes written before total header length"); 9833Debug.Assert(token != 0, "0 length token!"); 9850Debug.Assert(length == 0x01 << ((token & 0x0c) >> 2), "length does not match encoded length in token"); 9872Debug.Assert(false, "Unknown token length!"); 9951Debug.Assert(((type.NullableType == TdsEnums.SQLXMLTYPE) || 9961Debug.Assert(type.FixedLength == 8, "Invalid length for SqlDouble type!"); 9979Debug.Assert(value is SqlBytes); 9988Debug.Assert((actualLength == b.Length) && (actualLength == 16), "Invalid length for guid type in com+ object"); 9995Debug.Assert(type.FixedLength == 1, "Invalid length for SqlBoolean type"); 10014Debug.Assert(type.FixedLength == 8, "invalid length for SqlIntN type: " + type.FixedLength.ToString(CultureInfo.InvariantCulture)); 10032Debug.Assert(value is SqlString); 10060Debug.Assert(value is SqlString); 10065Debug.Assert(type.FixedLength <= 17, "Decimal length cannot be greater than 17 bytes"); 10093Debug.Assert(false, "Called WriteSqlValue on UDT param.Should have already been handled"); 10097Debug.Assert(false, "Unknown TdsType!" + type.NullableType.ToString("x2", (IFormatProvider)null)); 10173Debug.Assert(!_parser._asyncWrite); 10185Debug.Assert(_parser._asyncWrite); 10294Debug.Assert(_size < 0 || _written <= _size, string.Format("Length of data written exceeds specified length. Written: {0}, specified: {1}", _written, _size)); 10301Debug.Assert(_size >= _written); 10323Debug.Assert(_size >= _written); 10406Debug.Assert(encoding == null || !needBom); 10465Debug.Assert(readSize >= 0); 10514Debug.Assert((null != value) && (DBNull.Value != value), "unexpected missing or empty object"); 10522Debug.Assert(type.FixedLength == 8, "Invalid length for SqlDouble type!"); 10533Debug.Assert(isDataFeed || value is byte[], "Value should be an array of bytes"); 10534Debug.Assert(!isDataFeed || value is StreamDataFeed, "Value should be a stream"); 10537Debug.Assert(type.IsPlp,"Stream assigned to non-PLP was not converted!"); 10553Debug.Assert((actualLength == b.Length) && (actualLength == 16), "Invalid length for guid type in com+ object"); 10559Debug.Assert(type.FixedLength == 1, "Invalid length for SqlBoolean type"); 10576Debug.Assert(type.FixedLength == 8, "invalid length for SqlIntN type: " + type.FixedLength.ToString(CultureInfo.InvariantCulture)); 10585Debug.Assert(!isDataFeed || (value is TextDataFeed || value is XmlDataFeed), "Value must be a TextReader or XmlReader"); 10586Debug.Assert(isDataFeed || (value is string || value is byte[]), "Value is a byte array or string"); 10589Debug.Assert(type.IsPlp, "Stream assigned to non-PLP was not converted!"); 10614Debug.Assert(!isDataFeed || (value is TextDataFeed || value is XmlDataFeed), "Value must be a TextReader or XmlReader"); 10615Debug.Assert(isDataFeed || (value is string || value is byte[]), "Value is a byte array or string"); 10618Debug.Assert(type.IsPlp, "Stream assigned to non-PLP was not converted!"); 10648Debug.Assert(type.FixedLength <= 17, "Decimal length cannot be greater than 17 bytes"); 10653Debug.Assert(type.FixedLength <= 0xff, "Invalid Fixed Length"); 10700Debug.Assert(false, "Unknown TdsType!" + type.NullableType.ToString("x2", (IFormatProvider)null)); 10712Debug.Assert(columnEncryptionParameterInfo != null, @"columnEncryptionParameterInfo cannot be null"); 10713Debug.Assert(stateObj != null, @"stateObj cannot be null"); 10732Debug.Assert(columnEncryptionParameterInfo != null, @"columnEncryptionParameterInfo cannot be null"); 10733Debug.Assert(stateObj != null, @"stateObj cannot be null"); 10747Debug.Assert((null != value) && (DBNull.Value != value), "unexpected missing or empty object"); 10759Debug.Assert(type.FixedLength == 8, "Invalid length for SqlDouble type!"); 10767Debug.Assert(!isDataFeed, "We cannot seriliaze streams"); 10768Debug.Assert(value is byte[], "Value should be an array of bytes"); 10779Debug.Assert((actualLength == b.Length) && (actualLength == 16), "Invalid length for guid type in com+ object"); 10784Debug.Assert(type.FixedLength == 1, "Invalid length for SqlBoolean type"); 10800Debug.Assert(type.FixedLength == 8, "invalid length for SqlIntN type: " + type.FixedLength.ToString(CultureInfo.InvariantCulture)); 10806Debug.Assert(!isDataFeed, "We cannot seriliaze streams"); 10807Debug.Assert((value is string || value is byte[]), "Value is a byte array or string"); 10822Debug.Assert(!isDataFeed, "We cannot seriliaze streams"); 10823Debug.Assert((value is string || value is byte[]), "Value is a byte array or string"); 10836Debug.Assert(type.FixedLength <= 17, "Decimal length cannot be greater than 17 bytes"); 10840Debug.Assert(type.FixedLength <= 0xff, "Invalid Fixed Length"); 10916Debug.Assert(((type.NullableType == TdsEnums.SQLXMLTYPE) || 10930Debug.Assert(type.FixedLength == 8, "Invalid length for SqlDouble type!"); 10943Debug.Assert(value is SqlBytes); 10952Debug.Assert((actualLength == b.Length) && (actualLength == 16), "Invalid length for guid type in com+ object"); 10957Debug.Assert(type.FixedLength == 1, "Invalid length for SqlBoolean type"); 10974Debug.Assert(type.FixedLength == 8, "invalid length for SqlIntN type: " + type.FixedLength.ToString(CultureInfo.InvariantCulture)); 10986Debug.Assert(value is SqlString); 11004Debug.Assert(value is SqlString); 11009Debug.Assert(type.FixedLength <= 17, "Decimal length cannot be greater than 17 bytes"); 11108Debug.Assert(type.FixedLength <= 0xff, "WriteParameterVarLen: invalid one byte length!"); 11121Debug.Assert((buff == null && len == 0) || (buff.Length >= offst + len), "Invalid length sent to ReadPlpUnicodeChars()!"); 11122Debug.Assert((stateObj._longlen != 0) && (stateObj._longlen != TdsEnums.SQL_PLP_NULL), 11125Debug.Assert(false, "Out of sync read request"); 11148Debug.Assert(stateObj._syncOverAsync, "Should not attempt pends in a synchronous call"); 11164Debug.Assert(stateObj._longlenleft == 0); 11169Debug.Assert(((ulong)stateObj._longlen != TdsEnums.SQL_PLP_NULL), 11172Debug.Assert((buff == null && offst == 0) || (buff.Length >= offst + len), "Invalid length sent to ReadPlpUnicodeChars()!"); 11223Debug.Assert((stateObj._longlenleft != 0), "ReadPlpUnicodeChars: Odd byte left at the end!"); 11256Debug.Assert(stateObj._longlenleft == 0); 11260Debug.Assert(((ulong)stateObj._longlen != TdsEnums.SQL_PLP_NULL), 11263Debug.Assert((buff == null && offst == 0) || (buff.Length >= offst + len), "Invalid length sent to ReadPlpAnsiChars()!"); 11316Debug.Assert(stateObj._syncOverAsync, "Should not attempt pends in a synchronous call");
fx\src\data\System\Data\SqlClient\TdsParserHelperClasses.cs (20)
202Debug.Assert(_columnEncryptionKeyValues != null, "_columnEncryptionKeyValues should already be initialized."); 222Debug.Assert(_databaseId == databaseId); 223Debug.Assert(_cekId == cekId); 224Debug.Assert(_cekVersion == cekVersion); 225Debug.Assert (_cekMdVersion != null && cekMdVersion != null && _cekMdVersion.Length == _cekMdVersion.Length); 252Debug.Assert (0 < tabSize, "Invalid Table Size"); 258Debug.Assert (index < keyList.Length, "Invalid index specified."); 262Debug.Assert (index < keyList.Length, "Invalid index specified."); 350Debug.Assert(lcid == value, "invalid set_LCID value"); 355Debug.Assert((versionBits & MaskLcidVersion) == versionBits, "invalid version returned by FirstSupportedCollationVersion"); 378Debug.Assert((value & SqlString.x_iValidSqlCompareOptionMask) == value, "invalid set_SqlCompareOptions value"); 600Debug.Assert(null == value, "used only by SqlBulkCopy"); 639Debug.Assert (false, "Can't match up altMetaDataSet with given id"); 707Debug.Assert(!_sqlTceCipherInfoEntry.HasValue, "We can only set the EncryptionInfo once."); 756Debug.Assert(_sqlClientEncryptionAlgorithm == null, "_sqlClientEncryptionAlgorithm should not be set more than once."); 770Debug.Assert(!_sqlEncryptionKeyInfo.HasValue, "_sqlEncryptionKeyInfo should not be set more than once."); 798Debug.Assert(!sqlTceCipherInfoEntry.Equals(default(SqlTceCipherInfoEntry)), "sqlTceCipherInfoEntry should not be un-initialized."); 962Debug.Assert(smiParameterMetadata != null, "smiParameterMetadata should not be null."); 963Debug.Assert(cipherMetadata != null, "cipherMetadata should not be null"); 964Debug.Assert(cipherMetadata.EncryptionKeyInfo.HasValue, "cipherMetadata.EncryptionKeyInfo.HasValue should be true.");
fx\src\data\System\Data\SqlClient\TdsParserSafeHandles.cs (2)
88Debug.Assert(IntPtr.Zero != key, "no key passed to read callback dispatcher?"); 106Debug.Assert(IntPtr.Zero != key, "no key passed to write callback dispatcher?");
fx\src\data\System\Data\SqlClient\TdsParserSessionPool.cs (5)
161Debug.Assert(session != null, "There was a null session in the free session list?"); 186Debug.Assert (null != session, "null session?"); 194Debug.Assert(_cachedCount == 0, "SessionPool is disposed, but there are still sessions in the cache?"); 202Debug.Assert(!session._pendingData, "pending data on a pooled session?"); 214Debug.Assert(removed, "session not in pool?");
fx\src\data\System\Data\SqlClient\TdsParserStateObject.cs (110)
270Debug.Assert(null != parser, "no parser?"); 285Debug.Assert(null != parser, "no parser?"); 289Debug.Assert(null != _parser._physicalStateObj, "no physical session?"); 290Debug.Assert(null != _parser._physicalStateObj._inBuff, "no in buffer?"); 291Debug.Assert(null != _parser._physicalStateObj._outBuff, "no out buffer?"); 292Debug.Assert(_parser._physicalStateObj._outBuff.Length == 355Debug.Assert((0 == _activateCount && !_owner.IsAlive) // in pool 364Debug.Assert(value == null || !_owner.IsAlive || ((value is SqlDataReader) && (((SqlDataReader)value).Command == _owner.Target)), "Should not be changing the owner of an owned stateObj"); 413Debug.Assert(0 == _timeoutMilliseconds || 0 == _timeoutTime, "_timeoutTime hasn't been reset"); 446Debug.Assert(!isNullCompressed || nullBitmapColumnsCount > 0, "Null-Compressed row requires columns count"); 455Debug.Assert(_parser.IsKatmaiOrNewer, "NBCROW is sent by pre-Katmai server"); 550Debug.Assert(columnOrdinal >= 0 && columnOrdinal < _columnsCount, "Invalid column ordinal"); 564Debug.Assert(_parser.MARSOn, "Can not activate a non-MARS connection"); 567Debug.Assert(result == 1, "invalid deactivate count"); 656Debug.Assert(_parser.MARSOn, "Should not be calling CheckSetResetConnectionState on non MARS connection"); 667Debug.Assert(!_fResetEventOwned, "Invalid AutoResetEvent state!"); 683Debug.Assert(!_fResetEventOwned, "Invalid AutoResetEvent state!"); 734Debug.Assert(_outBuff.Length == _inBuff.Length, "Unexpected unequal buffers."); 800Debug.Assert(result == 0, "invalid deactivate count"); 835Debug.Assert((remaining == -1 && _sessionHandle == null) || (0 <= remaining && remaining < 3), string.Format("_pendingCallbacks values is invalid after decrementing: {0}", remaining)); 854Debug.Assert(Volatile.Read(ref _readingCount) >= 0, "_readingCount is negative"); 921Debug.Assert(0 < remaining && remaining <= 3, string.Format("_pendingCallbacks values is invalid after incrementing: {0}", remaining)); 977Debug.Assert(_inBytesPacket == 0, "there should not be any bytes left in packet when ReadHeader is called"); 986Debug.Assert(copy > 0, "ReadNetworkPacket read empty buffer"); 992Debug.Assert(_partialHeaderBytesRead <= _inputHeaderLen, "Read more bytes for header than required"); 1002Debug.Assert(_inBytesUsed == _inBytesRead, "Did not use all data while reading partial header"); 1051Debug.Assert(_inBuff != null, "packet buffer should not be null!"); 1058Debug.Assert(_inBytesPacket != 0, "_inBytesPacket cannot be 0 after processing header!"); 1083Debug.Assert(_inBytesPacket != 0, "_inBytesPacket cannot be 0 after processing header!"); 1095Debug.Assert(false, "entered negative _inBytesPacket loop"); 1111Debug.Assert(size >= 1, "Cannot set packet size to less than 1."); 1112Debug.Assert( (_outBuff == null && _inBuff == null) || 1115Debug.Assert( (_outBuff == null && _inBuff == null) || 1118Debug.Assert( _inBuff == null 1222Debug.Assert(buff == null || buff.Length >= len, "Invalid length sent to ReadByteArray()!"); 1233Debug.Assert(bytesToRead > 0, "0 byte read in TryReadByteArray"); 1253Debug.Assert(_inBytesUsed >= 0 && _inBytesUsed <= _inBytesRead, "ERROR - TDSParser: _inBytesUsed < 0 or _inBytesUsed > _inBytesRead"); 1281Debug.Assert(_inBytesPacket >= 0, "ERROR - TDSParser: _inBytesPacket < 0"); 1291Debug.Assert(_syncOverAsync || !_asyncReadWithoutSnapshot, "This method is not safe to call when doing sync over async"); 1324Debug.Assert(_syncOverAsync || !_asyncReadWithoutSnapshot, "This method is not safe to call when doing sync over async"); 1358Debug.Assert(_syncOverAsync || !_asyncReadWithoutSnapshot, "This method is not safe to call when doing sync over async"); 1402Debug.Assert(_bTmpRead + bytesRead <= 8, "Read more data than required"); 1408Debug.Assert(_bTmpRead + bytesRead == 8, "TryReadByteArray returned true without reading all data required"); 1430Debug.Assert(_syncOverAsync || !_asyncReadWithoutSnapshot, "This method is not safe to call when doing sync over async"); 1478Debug.Assert(_bTmpRead + bytesRead <= 4, "Read more data than required"); 1484Debug.Assert(_bTmpRead + bytesRead == 4, "TryReadByteArray returned true without reading all data required"); 1507Debug.Assert(_syncOverAsync || !_asyncReadWithoutSnapshot, "This method is not safe to call when doing sync over async"); 1537Debug.Assert(_syncOverAsync || !_asyncReadWithoutSnapshot, "This method is not safe to call when doing sync over async"); 1567Debug.Assert(_syncOverAsync || !_asyncReadWithoutSnapshot, "This method is not safe to call when doing sync over async"); 1603Debug.Assert(_syncOverAsync || !_asyncReadWithoutSnapshot, "This method is not safe to call when doing sync over async"); 1670Debug.Assert(_syncOverAsync, "Should not attempt pends in a synchronous call"); 1688Debug.Assert(_longlenleft == 0, "Out of synch length read request"); 1732Debug.Assert(_syncOverAsync, "Should not attempt pends in a synchronous call"); 1733Debug.Assert(_longlenleft > 0, "Read when no data available"); 1756Debug.Assert(_longlenleft == 0); 1766Debug.Assert((_longlen != TdsEnums.SQL_PLP_NULL), 1769Debug.Assert((buff == null && offst == 0) || (buff.Length >= offst + len), "Invalid length sent to ReadPlpBytes()!"); 1804Debug.Assert(bytesRead <= bytesLeft, "Read more bytes than we needed"); 1805Debug.Assert((ulong)bytesRead <= _longlenleft, "Read more bytes than is available"); 1840Debug.Assert(_syncOverAsync || !_asyncReadWithoutSnapshot, "This method is not safe to call when doing sync over async"); 1856Debug.Assert(_syncOverAsync || !_asyncReadWithoutSnapshot, "This method is not safe to call when doing sync over async"); 1926Debug.Assert((_snapshot != null) ^ _asyncReadWithoutSnapshot, "Must have either _snapshot set up or _asyncReadWithoutSnapshot enabled (but not both) to pend a read"); 1967Debug.Assert(ADP.PtrZero != readPacket, "ReadNetworkPacket cannot be null in syncronous operation!"); 1979Debug.Assert(IntPtr.Zero == readPacket, "unexpected readPacket without corresponding SNIPacketRelease"); 2043Debug.Assert(_parser.Connection.IsConnectionDoomed, "Timeout occurred while the connection is in the pool"); 2079Debug.Assert(source == _networkPacketTaskSource, "_networkPacketTaskSource which is being timed is not the current task source"); 2115Debug.Assert(_networkPacketTaskSource == null || ((_asyncReadWithoutSnapshot) && (_networkPacketTaskSource.Task.IsCompleted)), "Pending async call or failed to replay snapshot when calling ReadSni"); 2138Debug.Assert(completion != null, "Async on but null asyncResult passed"); 2178Debug.Assert(ADP.PtrZero != readPacket, "ReadNetworkPacket should not have been null on this async operation!"); 2182Debug.Assert(IntPtr.Zero == readPacket, "unexpected readPacket without corresponding SNIPacketRelease"); 2222Debug.Assert(_parser.Connection == null || _parser.Connection.Pool != null, "Shouldn't be calling IsConnectionAlive on non-pooled connections"); 2235Debug.Assert(true, "Call to IsConnectionAlive while connection is in use"); 2311Debug.Assert(_syncOverAsync, "Should never reach here with async on!"); 2319Debug.Assert(_parser.Connection != null, "SqlConnectionInternalTds handler can not be null at this point."); 2349Debug.Assert(IntPtr.Zero == syncReadPacket, "unexpected syncReadPacket without corresponding SNIPacketRelease"); 2413Debug.Assert(true, "Unexpected dataSize on Read"); 2484Debug.Assert(IntPtr.Zero == packet || IntPtr.Zero != packet && source != null, "AsyncResult null on callback"); 2545Debug.Assert(_parser.State == TdsParserState.Broken || _parser.State == TdsParserState.Closed || _parser.Connection.IsConnectionDoomed, "Failed to capture exception while the connection was still healthy"); 2641Debug.Assert(_securePasswords[0] == null || _securePasswords[1] == null, "There are more than two secure passwords"); 2654Debug.Assert((_outBytesUsed + lengthInBytes) < _outBuff.Length, "Passwords cannot be splited into two different packet or the last item which fully fill up _outBuff!!!"); 2712Debug.Assert(_outBytesUsed <= _outBuff.Length, "ERROR - TDSParser: _outBytesUsed > _outBuff.Length"); 2730Debug.Assert(async || _asyncWriteCount == 0); 2741Debug.Assert(b.Length >= len, "Invalid length sent to WriteByteArray()!"); 2764Debug.Assert(async, "Returned task in sync mode"); 2842Debug.Assert (false, String.Format((IFormatProvider)null, "Unexpected argument {0,-2:x2} to WritePacket", flushMode)); 2869Debug.Assert(_cancelled, "Should not call CancelWritePacket if _cancelled is not set"); 2908Debug.Assert(_asyncWriteCount == 0, "All async write should be finished"); 2922Debug.Assert(!sync, "Completion should be handled in SniManagedWwrapper"); 2924Debug.Assert(_asyncWriteCount >= 0); 2983Debug.Assert(packetPointer != IntPtr.Zero, "Packet added to list has an invalid pointer, can not remove from pending list"); 3076Debug.Assert(Parser.Connection._parserLock.ThreadMayHaveLock(), "Thread is writing without taking the connection lock"); 3083Debug.Assert(_parser.Connection != null, "SqlConnectionInternalTds handler can not be null at this point."); 3140Debug.Assert(_pendingWritePackets.Count == 0 && _asyncWriteCount == 0, "Should not clear all write packets if there are packets pending"); 3146Debug.Assert(packet == _sniPacket, "Adding a packet other than the current packet to the pending list"); 3246Debug.Assert(false, "Invalid TDS Parser State: " + assertMessage); 3249Debug.Assert(_inBytesPacket >= 0, "Packet must not be negative"); 3271Debug.Assert(error != null, "Trying to add a null error"); 3305Debug.Assert(error != null, "Trying to add a null error"); 3406Debug.Assert(_preAttentionErrors == null && _preAttentionWarnings == null, "Can't store errors for attention because there are already errors stored"); 3423Debug.Assert(_errors == null && _warnings == null, "Can't restore errors after attention because there are already other errors"); 3453Debug.Assert(_snapshot == null && !_snapshotReplay, "StateObj has leftover snapshot state"); 3454Debug.Assert(!_asyncReadWithoutSnapshot, "StateObj has AsyncReadWithoutSnapshot still enabled"); 3455Debug.Assert(_executionContext == null, "StateObj has a stored execution context from an async read"); 3457Debug.Assert(_asyncWriteCount == 0, "StateObj still has outstanding async writes"); 3458Debug.Assert(_delayedWriteAsyncCallbackException == null, "StateObj has an unobserved exceptions from an async write"); 3460Debug.Assert(!_attentionReceived && !_attentionSent && !_attentionSending, string.Format("StateObj is still dealing with attention: Sent: {0}, Received: {1}, Sending: {2}", _attentionSent, _attentionReceived, _attentionSending)); 3461Debug.Assert(!_cancelled, "StateObj still has cancellation set"); 3462Debug.Assert(!_internalTimeout, "StateObj still has internal timeout set"); 3464Debug.Assert(!_hasErrorOrWarning, "StateObj still has stored errors or warnings"); 3598Debug.Assert(!_snapshotInBuffs.Any(b => object.ReferenceEquals(b, buffer)));
fx\src\data\System\Data\SqlClient\TdsRecordBufferSetter.cs (2)
42Debug.Assert(SqlDbType.Structured == md.SqlDbType, "Unsupported SqlDbType: " + md.SqlDbType); 204Debug.Assert(_metaData.IsMultiValued, "Unsupported call for single-valued types");
fx\src\data\System\Data\SqlClient\TdsValueSetter.cs (34)
61Debug.Assert(!_plpUnknownSent, "Setting a column to null that we already stated sending!"); 100Debug.Assert(false, "PLP-only types shouldn't get to this point. Type: " + _metaData.SqlDbType); 106Debug.Assert(false, "Not yet implemented. Not needed until Structured UDTs"); 109Debug.Assert(false, "Unexpected SqlDbType: " + _metaData.SqlDbType); 117Debug.Assert( 135Debug.Assert( 151Debug.Assert( 179Debug.Assert(!MetaType.GetMetaTypeFromSqlDbType(_metaData.SqlDbType, _metaData.IsMultiValued).IsLong, 191Debug.Assert( 197Debug.Assert(!_plpUnknownSent, "A plpUnknown has already been sent before setting length to zero."); 203Debug.Assert(!MetaType.GetMetaTypeFromSqlDbType(_metaData.SqlDbType, _metaData.IsMultiValued).IsLong, 228Debug.Assert( 266Debug.Assert(!MetaType.GetMetaTypeFromSqlDbType(_metaData.SqlDbType, _metaData.IsMultiValued).IsLong, 280Debug.Assert( 286Debug.Assert(!_plpUnknownSent, "A plpUnknown has already been sent before setting length to zero."); 292Debug.Assert(!MetaType.GetMetaTypeFromSqlDbType(_metaData.SqlDbType, _metaData.IsMultiValued).IsLong, 312Debug.Assert( 330Debug.Assert(null != _variantType && SqlDbType.NVarChar == _variantType.SqlDbType, "Invalid variant type"); 377Debug.Assert( 391Debug.Assert( 404Debug.Assert( 412Debug.Assert(SqlDbType.Money == _variantType.SqlDbType, "Invalid variant type"); 437Debug.Assert( 450Debug.Assert( 463Debug.Assert( 479Debug.Assert( 507Debug.Assert (0 <= dt.days && dt.days <= UInt16.MaxValue, "Invalid DateTime '" + value + "' for SmallDateTime"); 528Debug.Assert( 532Debug.Assert(SmiMetaData.DefaultUniqueIdentifier.MaxLength == bytes.Length, "Invalid length for guid bytes: " + bytes.Length); 538Debug.Assert(_metaData.MaxLength == bytes.Length, "Unexpected uniqueid metadata length: " + _metaData.MaxLength); 547Debug.Assert( 567Debug.Assert( 596Debug.Assert(null == _variantType, "Variant type can only be set once"); 597Debug.Assert(value != null &&
fx\src\data\System\Data\SQLTypes\SQLBytes.cs (7)
465 Debug.Assert(m_state >= SqlBytesCharsState.Null && m_state <= SqlBytesCharsState.Stream); 470 Debug.Assert((m_lCurLen >= 0 && m_lCurLen <= x_lMaxLen) || FStream()); 471 Debug.Assert(FStream() || (m_rgbBuf != null && m_lCurLen <= m_rgbBuf.Length)); 472 Debug.Assert(!FStream() || (m_lCurLen == x_lNull)); 474 Debug.Assert(m_rgbWorkBuf == null || m_rgbWorkBuf.Length == 1); 481 Debug.Assert(FStream()); 591 Debug.Assert(false);
fx\src\data\System\Data\SQLTypes\SQLChars.cs (7)
463 Debug.Assert(m_state >= SqlBytesCharsState.Null && m_state <= SqlBytesCharsState.Stream); 468 Debug.Assert((m_lCurLen >= 0 && m_lCurLen <= x_lMaxLen) || FStream()); 469 Debug.Assert(FStream() || (m_rgchBuf != null && m_lCurLen <= m_rgchBuf.Length)); 470 Debug.Assert(!FStream() || (m_lCurLen == x_lNull)); 472 Debug.Assert(m_rgchWorkBuf == null || m_rgchWorkBuf.Length == 1); 484 Debug.Assert(FStream()); 576 Debug.Assert(false);
fx\src\data\System\Data\SQLTypes\SQLDecimal.cs (4)
425Debug.Assert ((precision == MaxPrecision+1) || VerifyPrecision(precision), "Calcualted precision too low?"); 426Debug.Assert ((precision == 1) || !VerifyPrecision((byte)(precision-1)), "Calculated precision too high?"); 448Debug.Assert(precision>0,"Precision cannot be less than 1"); 449Debug.Assert(precision<=MaxPrecision, "Precision > MaxPrecision");
fx\src\data\System\Data\SQLTypes\SQLFileStream.cs (22)
156Debug.Assert ( value != null ); 157Debug.Assert ( !m_disposed ); 175Debug.Assert ( value != null ); 176Debug.Assert ( !m_disposed ); 436Debug.Assert ( path != null ); 437Debug.Assert ( path == path.Trim() ); 438Debug.Assert ( path.Length > 0 ); 439Debug.Assert(path.Length <= MaxWin32PathLength); 440Debug.Assert(path.IndexOfAny(InvalidPathChars) < 0); 441Debug.Assert ( path.StartsWith ( @"\\", StringComparison.OrdinalIgnoreCase ) ); 442Debug.Assert ( !path.StartsWith ( @"\\.\", StringComparison.Ordinal ) ); 460Debug.Assert ( path != null ); 495Debug.Assert(path.Length <= MaxWin32PathLength, "GetFullPathName returns path longer than max expected!"); 530Debug.Assert(access == System.IO.FileAccess.ReadWrite); 588Debug.Assert ( path != null ); 589Debug.Assert (transactionContext != null); 641Debug.Assert(access == System.IO.FileAccess.ReadWrite); 787System.Diagnostics.Debug.Assert ( m_fs == null ); 881System.Diagnostics.Debug.Assert( path.Length <= ( UInt16.MaxValue / sizeof(char) ) ); 1082System.Diagnostics.Debug.Assert(Marshal.OffsetOf(typeof(UnsafeNativeMethods.FILE_FULL_EA_INFORMATION), "EaName").ToInt64() <= (Int64) Int32.MaxValue); 1089System.Diagnostics.Debug.Assert ( cbOffset < m_cbBuffer ); 1095System.Diagnostics.Debug.Assert ( cbOffset < m_cbBuffer || transactionContext.Length == 0 && cbOffset == m_cbBuffer );
fx\src\data\System\Data\SQLTypes\SQLMoney.cs (1)
108Debug.Assert(snum.Scale == x_iMoneyScale);
fx\src\data\System\Data\SQLTypes\SQLUtility.cs (3)
194Debug.Assert(condition, "", ""); 199Debug.Assert(condition, conditionString, message); 204Debug.Assert(condition, conditionString, "");
fx\src\data\System\Data\SQLTypes\SqlXml.cs (3)
104Debug.Assert(createSqlReaderMethodInfo != null, "MethodInfo reference for XmlReader.CreateSqlReader should not be null."); 133Debug.Assert(CreateSqlReaderMethodInfo != null, "MethodInfo reference for XmlReader.CreateSqlReader should not be null."); 287 Debug.Assert(m_stream != null, "stream can not be null");
fx\src\data\System\Data\SQLTypes\UnsafeNativeMethods.cs (3)
70Debug.Assert(path != null, "path is null?"); 73Debug.Assert(path.Length < Int16.MaxValue); 111Debug.Assert(cchRequiredSize <= buffer.Capacity, string.Format(
fx\src\data\System\Data\UniqueConstraint.cs (3)
140Debug.Assert(null != _constraintIndex, "null UniqueConstraint index"); 148Debug.Assert(DataKey.ColumnsEqual(key.ColumnsReference, sortIndexColumns), "UniqueConstraint index columns do not match the key sort index"); 181Debug.Assert(constraints.Table.primaryKey == this, "If the primary key and this are 'Equal', they should also be '=='");
fx\src\data\System\Data\XDRSchema.cs (6)
44Debug.Assert(FEqualIdentity(schemaRoot, Keywords.XDR_SCHEMA, Keywords.XDRNS), "Illegal node"); 76Debug.Assert(FEqualIdentity(node, Keywords.XDR_ELEMENT, Keywords.XDRNS) || 128Debug.Assert(FEqualIdentity(node, Keywords.XDR_ELEMENTTYPE, Keywords.XDRNS), 173Debug.Assert(FEqualIdentity(node, Keywords.XDR_ELEMENTTYPE, Keywords.XDRNS) || 270Debug.Assert(mapNameTypeXdr[index].name == name, "FindNameType('" + name + "') -- failed. Wrong name found"); 314Debug.Assert(FEqualIdentity(node, Keywords.XDR_ELEMENT, Keywords.XDRNS) ||
fx\src\data\System\Data\XmlDataLoader.cs (5)
658Debug.Assert (table != null, "Table to be loaded is null on LoadTopMostTable() entry"); 659Debug.Assert (topMostNode != null, "topMostNode is null on LoadTopMostTable() entry"); 660Debug.Assert (!isDiffgram, "Diffgram mode is on while we have topMostNode table. This is bad." ); 675Debug.Assert (entryDepth >= 0, "Wrong entry Depth for top most element." ); 825Debug.Assert (table != null, "Table to be loaded is null on LoadTable() entry");
fx\src\data\System\Data\XMLDiffLoader.cs (2)
39Debug.Assert(reader.LocalName == Keywords.MSD_ERRORS && reader.NamespaceURI==Keywords.DFFNS, "something fishy"); 68Debug.Assert(reader.LocalName == Keywords.MSD_ERRORS && reader.NamespaceURI==Keywords.DFFNS, "something fishy");
fx\src\data\System\Data\xmlsaver.cs (4)
682Debug.Assert(nodeApp != null, "Need to create <application..> node first."); 1204Debug.Assert(col.ColumnMapping != MappingType.SimpleContent , "Illegal state"); 2680Debug.Assert(value != null, "Value can not be null"); 2852Debug.Assert(!(xr is DataTextReader), "XmlReader is DataTextReader");
fx\src\data\System\Data\XMLSchema.cs (16)
290Debug.Assert(val is PropertyCollection, "We can set values only for classes that have ExtendedProperties"); 317Debug.Assert(dc != null, "HandleColumnExpression is supposed to be called for DataColumn"); 348Debug.Assert(val is PropertyCollection, "We can set values only for classes that have ExtendedProperties"); 360Debug.Assert(table != null, "ref table should have been already created"); 729Debug.Assert(schemaSet.Count == 1, "there should be one schema"); 789Debug.Assert(child == table, "table not the same"); 904Debug.Assert(ct.BaseXmlSchemaType is XmlSchemaSimpleType, "Expected SimpleType or ComplexType"); 918Debug.Assert(cContent is XmlSchemaComplexContentRestriction, "Expected complexContent extension or restriction"); 928Debug.Assert(ct.ContentModel is XmlSchemaSimpleContent, "expected simpleContent or complexContent"); 937Debug.Assert(ct.BaseXmlSchemaType is XmlSchemaSimpleType, "Expected SimpleType or ComplexType"); 941Debug.Assert(cContent is XmlSchemaSimpleContentRestriction, "Expected SimpleContent extension or restriction"); 972Debug.Assert(cContent is XmlSchemaComplexContentRestriction, "Expected complexContent extension or restriction"); 976Debug.Assert(ct.ContentModel is XmlSchemaSimpleContent, "expected simpleContent or complexContent"); 1317Debug.Assert( (node is XmlSchemaElement) || (node is XmlSchemaAttribute), "GetInstanceName should only be called on attribute or elements"); 1328Debug.Assert((instanceName != null) && (instanceName.Length != 0), "instanceName cannot be null or empty. There's an error in the XSD compiler"); 1657Debug.Assert(mapNameTypeXsd[index].name == name, "FindNameType('" + name + "') -- failed. Wrong name found");
fx\src\data\System\Data\XmlToDatasetMap.cs (10)
96Debug.Assert(dataSet != null, "DataSet can't be null"); 97Debug.Assert(nameTable != null, "NameTable can't be null"); 104Debug.Assert(dataSet != null, "DataSet can't be null"); 105Debug.Assert(nameTable != null, "NameTable can't be null"); 112Debug.Assert(dataTable != null, "DataTable can't be null"); 113Debug.Assert(nameTable != null, "NameTable can't be null"); 120Debug.Assert(dataTable != null, "DataTable can't be null"); 121Debug.Assert(nameTable != null, "NameTable can't be null"); 404Debug.Assert(node != null, "Argument validation"); 463Debug.Assert(col.ColumnName.StartsWith("xml", StringComparison.OrdinalIgnoreCase), "column name should start with xml");
fx\src\data\System\NewXml\DataPointer.cs (23)
53Debug.Assert( rowElem != null ); 54Debug.Assert( rowElem.Row != null ); 69Debug.Assert( rowElem.Row != null ); 83Debug.Assert( node == this.doc || node.OwnerDocument == this.doc ); 94Debug.Assert( node == this.doc || node.OwnerDocument == this.doc ); 105Debug.Assert( node == this.doc || node.OwnerDocument == this.doc ); 339Debug.Assert( name != null ); 382Debug.Assert( name != null ); 566Debug.Assert( this.column == null ); 570Debug.Assert( this.column == null ); 574Debug.Assert( this.column == null ); 587Debug.Assert( this.column == null ); 591Debug.Assert( this.column == null ); 595Debug.Assert( this.column == null ); 606Debug.Assert( this.column == null ); 625Debug.Assert( this.column == null ); 639Debug.Assert( this.column == null ); 653Debug.Assert( this.column == null ); 670Debug.Assert( rowElem != null ); 673Debug.Assert( row != null ); 676Debug.Assert( state == ElementState.Defoliated, "Region is accessed using column, but it's state is FOLIATED" ); 680Debug.Assert( ! Convert.IsDBNull( row[ this.column, rowVersion ] ) ); 683Debug.Assert( (this.column.ColumnMapping == MappingType.SimpleContent) ? (this.fOnValue == true) : true );
fx\src\data\System\NewXml\DataSetMappper.cs (6)
34Debug.Assert( this.dataSet == null ); 86Debug.Assert( elem != null ); 95Debug.Assert( rowElem.Row != null ); 131Debug.Assert( rowElem != null ); 133Debug.Assert( (node is XmlBoundElement) ? ((XmlBoundElement)node).Row == null : true ); 217Debug.Assert( rowElem.Row != null );
fx\src\data\System\NewXml\RegionIterator.cs (14)
28Debug.Assert( rowElement != null && rowElement.Row != null ); 47Debug.Assert( oldState != ElementState.None ); 56Debug.Assert( (oldState == ElementState.Defoliated) ? (rowElement.ElementState == ElementState.Defoliated) : true ); 73Debug.Assert( oldState != ElementState.None ); 80Debug.Assert( (oldState == ElementState.Defoliated) ? (rowElement.ElementState == ElementState.Defoliated) : true ); 94Debug.Assert( (oldState == ElementState.Defoliated) ? (rowElement.ElementState == ElementState.Defoliated) : true ); 101Debug.Assert( currentNode != null ); 103Debug.Assert( (oldState == ElementState.Defoliated) ? (rowElement.ElementState == ElementState.Defoliated) : true ); 112Debug.Assert( this.CurrentNode != null ); 113Debug.Assert( this.CurrentNode.NodeType == XmlNodeType.Element ); 124Debug.Assert( oldState != ElementState.None ); 130Debug.Assert( (oldState == ElementState.Defoliated) ? (rowElement.ElementState == ElementState.Defoliated) : true ); 135Debug.Assert( ! XmlDataDocument.IsTextLikeNode( n ) ); 138Debug.Assert( (oldState == ElementState.Defoliated) ? (rowElement.ElementState == ElementState.Defoliated) : true );
fx\src\data\System\NewXml\TreeIterator.cs (2)
18Debug.Assert( nodeTop != null ); 72Debug.Assert( currentNode != null );
fx\src\data\System\NewXml\XmlBoundElement.cs (4)
194Debug.Assert( element is XmlBoundElement ); 226Debug.Assert( dp.NodeType == XmlNodeType.Element ); 255Debug.Assert( dp.NodeType == XmlNodeType.Element ); 314Debug.Assert( ((IXmlDataVirtualNode)dp).IsOnColumn( null ) );
fx\src\data\System\NewXml\XmlDataDocument.cs (120)
59Debug.Assert( pointers.ContainsValue(pointer) == false ); 66Debug.Assert( temp != null ); 98Debug.Assert( dataSet == null ); 99Debug.Assert( ds != null ); 180Debug.Assert( ignoreXmlEvents == true ); 193Debug.Assert( DocumentElement == null || ! fLoadFromDataSet ); 222Debug.Assert( fDataRowCreatedSpecial == false ); 223Debug.Assert( fBoundToDataSet == false && fBoundToDocument == false ); 228Debug.Assert( fDataRowCreatedSpecial == true ); 243Debug.Assert( dataSet != null ); 334Debug.Assert( fDataRowCreatedSpecial == false ); 346Debug.Assert( be != null ); 373Debug.Assert( rowElem.Row != null ); 406Debug.Assert( mapper.GetColumnSchemaForNode( rowElem, node ) != null ); 453Debug.Assert( this.ignoreXmlEvents == true ); 455Debug.Assert( this.GetRowFromElement( this.DocumentElement ) != null ); 463Debug.Assert( docElem.LastChild == docElem.FirstChild ); 479Debug.Assert( ! mapper.IsMapped() ); 480Debug.Assert( ! fBoundToDocument ); 481Debug.Assert( ! fBoundToDataSet ); 493Debug.Assert( fDataRowCreatedSpecial == false ); 494Debug.Assert( mapper.IsMapped() ); 495Debug.Assert( fBoundToDataSet && fBoundToDocument ); 531Debug.Assert( newState == ElementState.WeakFoliation || newState == ElementState.StrongFoliation ); 558Debug.Assert( node.Row != null ); 596Debug.Assert( node.Row != null ); 597Debug.Assert( node.Row.RowState != DataRowState.Deleted ); 638Debug.Assert( col.ColumnMapping == MappingType.SimpleContent ); 796Debug.Assert( be != null ); 807Debug.Assert( pointer != null ); 864Debug.Assert( DataSet.EnforceConstraints == false ); 875Debug.Assert( newNode != null ); 891Debug.Assert( ignoreDataSetEvents == true ); 892Debug.Assert( ignoreXmlEvents == true ); 893Debug.Assert( IsFoliationEnabled == false ); 932Debug.Assert( clone.FirstChild == null ); 1000Debug.Assert( false ); 1074Debug.Assert( reader is XmlTextReader ); 1097Debug.Assert( DocumentElement != null ); 1129Debug.Assert( r.Element == null ); 1144Debug.Assert( false ); 1148Debug.Assert( false ); 1164Debug.Assert( node != null ); 1172Debug.Assert( r == null ); 1180Debug.Assert( be.Row != null ); 1196Debug.Assert( row.RowState == DataRowState.Detached ); 1205Debug.Assert( row.RowState == DataRowState.Detached ); 1214Debug.Assert( row.Element == null ); 1216Debug.Assert( row.RowState == DataRowState.Detached ); 1222Debug.Assert( row.Element == null ); 1234Debug.Assert( tb != null ) ; 1243Debug.Assert( this.ignoreXmlEvents == true ); 1246Debug.Assert( rowElement != null ); 1252Debug.Assert( rowElement != null ); 1358Debug.Assert( e != null ); 1409Debug.Assert( relation.ChildTable == row.Table ); 1417Debug.Assert( args.Row.RowState != DataRowState.Deleted ); 1434Debug.Assert( be != null ); 1448Debug.Assert( row != null ); 1449Debug.Assert( rowElement != null ); 1472Debug.Assert( this.ignoreXmlEvents == true ); 1508Debug.Assert( pointer != null ); 1537Debug.Assert( child.Element == childElement && childElement.Row == child ); 1539Debug.Assert( ignoreXmlEvents == true ); 1566Debug.Assert( colInParent != null ); 1601Debug.Assert( DataSet.EnforceConstraints == false ); 1634Debug.Assert( DataSet.EnforceConstraints == false ); 1647Debug.Assert( oldParent == null ); 1685Debug.Assert( DataSet.EnforceConstraints == false ); 1693Debug.Assert( args.NewParent == null ); 1748Debug.Assert( ! IsRowLive( row ) ); 1756Debug.Assert( ! IsRowLive( be.Row ) ); 1785Debug.Assert( rowElement != null ); 1876Debug.Assert( false ); // This should have been handled above, irrespective of ignoreDataSetEvents value (true or false) 1989Debug.Assert( ! (args.Action == CollectionChangeAction.Add || args.Action == CollectionChangeAction.Remove) || rel.Nested == false ); 2031Debug.Assert( child.ParentNode != prevSibling.ParentNode ); 2033Debug.Assert( prevSibling.ParentNode != null ); 2034Debug.Assert( IsFoliationEnabled == false ); 2035Debug.Assert( IgnoreXmlEvents == true ); 2037Debug.Assert( prevSibling != this.DocumentElement ); 2042Debug.Assert( child.ParentNode == null ); 2048Debug.Assert( parent != null ); 2049Debug.Assert( parent.NodeType != XmlNodeType.Attribute ); // We need to get get the grand-parent region 2050Debug.Assert( parent != DocumentElement ); // We cannot promote children of the DocumentElement 2059Debug.Assert( iter.CurrentNode is XmlBoundElement && ((XmlBoundElement)(iter.CurrentNode)).Row != null ); 2068Debug.Assert( parent != null ); 2140Debug.Assert( col.ColumnMapping != MappingType.Hidden ); 2141Debug.Assert( row.Table.DataSet.EnforceConstraints == false ); 2149Debug.Assert( xmlText != null ); 2150Debug.Assert( row.Table.DataSet.EnforceConstraints == false ); 2155Debug.Assert( oVal != null && ! ( oVal is DBNull ) ); 2178Debug.Assert( row != null ); 2212Debug.Assert( rowElement != null ); 2213Debug.Assert( rowElement.Row != null ); 2214Debug.Assert( this.DataSet.EnforceConstraints == false ); 2217Debug.Assert( row != null ); 2263Debug.Assert( c.Table == row.Table ); 2413Debug.Assert(rowElemList[0] != null && rowElemList[0] is XmlBoundElement); 2417Debug.Assert( subRowElem != null ); 2429Debug.Assert( ! IsRowLive( be.Row ) ); 2437Debug.Assert(rowElemList[0] != null && rowElemList[0] is XmlBoundElement); 2458Debug.Assert( rowElem.Row != null ); 2509Debug.Assert( false ); 2512Debug.Assert( IsRowLive( rowElem.Row ) ); 2517Debug.Assert( rowElem.Row != null ); 2558Debug.Assert( false ); 2562Debug.Assert( ! IsRowLive( rowElem.Row ) ); 2571Debug.Assert( row != null ); 2585Debug.Assert( row != null ); 2587Debug.Assert( row.RowState == DataRowState.Detached || row.RowState == DataRowState.Deleted ); 2595Debug.Assert( childRowElem.Row != null ); 2609Debug.Assert( parentRow != null ); 2659Debug.Assert( node.OwnerDocument == this || node == this ); 2690Debug.Assert( IsRowLive( rowElement.Row ) ); 2694Debug.Assert( rowElement.Row != null ); 2695Debug.Assert( IsRowLive( rowElement.Row ) ); 2709Debug.Assert( ! IsRowLive( rowElement.Row ) ); 2713Debug.Assert( rowElement.Row != null ); 2714Debug.Assert( ! IsRowLive( rowElement.Row ) ); 2770Debug.Assert(tableList[readPos] != null, "Temp Array is not supposed to reach to null");
fx\src\data\System\NewXml\XPathNodePointer.cs (33)
63Debug.Assert( XmlDataDocument.IsTextNode( node.NodeType ) ); 94Debug.Assert( xnt != -1 ); 115Debug.Assert( owner != null ); 398Debug.Assert( rowElem != null ); 399Debug.Assert( rowElem.Row != null ); 416Debug.Assert( rowElem.Row != null ); 447Debug.Assert( node == this._doc || node.OwnerDocument == this._doc ); 458Debug.Assert( node == this._doc || node.OwnerDocument == this._doc ); 567Debug.Assert( _node.Attributes != null ); 636Debug.Assert( xntInt != -1 ); 657Debug.Assert( xntInt != -1 ); 676Debug.Assert( _column.ColumnMapping != MappingType.Attribute && _column.ColumnMapping != MappingType.Hidden ); 917Debug.Assert( _parentOfNS != null ); 982Debug.Assert( other != null ); 995Debug.Assert( other.NodeType != XPathNodeType.Namespace ); 1008Debug.Assert( this.NodeType != XPathNodeType.Namespace ); 1025Debug.Assert( this._fOnValue != other._fOnValue ); 1032Debug.Assert( this.Row == other.Row ); //in the same row 1048Debug.Assert( curNode1 != null ); 1049Debug.Assert( curNode2 != null ); 1099Debug.Assert( false ); 1156Debug.Assert( this._column != null ); 1324Debug.Assert( attrs!=null ); 1410Debug.Assert( _parentOfNS != null ); 1414Debug.Assert( this._column.Namespace == s_strReservedXmlns ); 1418Debug.Assert( be != null ); 1420Debug.Assert( curRow != null ); 1439Debug.Assert( attr != null ); 1481Debug.Assert( rowElem != null ); 1484Debug.Assert( row != null ); 1491Debug.Assert( ! Convert.IsDBNull( row[ this._column, rowVersion ] ) ); 1494Debug.Assert( (this._column.ColumnMapping == MappingType.SimpleContent) ? (this._fOnValue == true) : true ); 1497Debug.Assert( !this._fOnValue );
System.Data.DataSetExtensions (15)
System\Data\DataRowComparer.cs (1)
207Debug.Assert(row.Table != null);
System\Data\DataSetUtil.cs (1)
29Debug.Assert(null != e, "TraceException: null Exception");
System\Data\DataTableExtensions.cs (1)
247Debug.Assert(null != table, "null DataTable");
System\Data\EnumerableRowCollection.cs (3)
92Debug.Assert(!isDataViewable || table != null, "isDataViewable bug table is null"); 120Debug.Assert(null != enumerableRows, "null enumerableRows"); 316Debug.Assert(pred != null);
System\Data\LinqDataView.cs (3)
44Debug.Assert(table != null, "null DataTable"); 126Debug.Assert(base.Sort != null); 127Debug.Assert(!(!String.IsNullOrEmpty(base.Sort) && base.SortComparison != null));
System\Data\SortExpressionBuilder.cs (6)
62Debug.Assert(keySelector != null); 63Debug.Assert(compare != null); 74Debug.Assert(_currentSelector != null); 75Debug.Assert(_currentComparer != null); 110Debug.Assert(a.Count == Count); 131Debug.Assert(_selectors.Count == _comparers.Count); //weak now that we have two dimensions
System.Data.Entity (3189)
System\Data\Common\CommandTrees\AbstractExpressions.cs (5)
340Debug.Assert(type != null, string.Format(CultureInfo.InvariantCulture, "{0}.Type is null in DbExpression constructor", this.GetType().Name)); 345Debug.Assert(type.IsReadOnly, "Editable type metadata specified for DbExpression.Type"); 739Debug.Assert(left != null, "DbBinaryExpression.Left cannot be null"); 740Debug.Assert(right != null, "DbBinaryExpression.Right cannot be null"); 768Debug.Assert(argument != null, "DbUnaryExpression.Argument cannot be null");
System\Data\Common\CommandTrees\Aggregates.cs (4)
32Debug.Assert(resultType != null, "DbAggregate.ResultType cannot be null"); 33Debug.Assert(arguments != null, "DbAggregate.Arguments cannot be null"); 34Debug.Assert(arguments.Count == 1, "DbAggregate requires a single argument"); 78Debug.Assert(function != null, "DbFunctionAggregate.Function cannot be null");
System\Data\Common\CommandTrees\BasicExpressionVisitor.cs (1)
520Debug.Assert(expression.RelatedEntityReferences != null, "HasRelatedEntityReferences returned true for null RelatedEntityReferences list?");
System\Data\Common\CommandTrees\DbLambda.cs (5)
32Debug.Assert(variables != null, "DbLambda.Variables cannot be null"); 33Debug.Assert(bodyExp != null, "DbLambda.Body cannot be null"); 692Debug.Assert(lambdaMethod != null, "Lambda function method must not be null"); 695Debug.Assert(paramNames.Length == argumentTypes.Length, "Lambda function method parameter count does not match argument count"); 699Debug.Assert(argumentTypes[idx] != null, "DbLambda.Create allowed null type argument");
System\Data\Common\CommandTrees\DefaultExpressionVisitor.cs (7)
146Debug.Assert(newArguments.Count == 1, "Function aggregate had more than one argument?"); 170Debug.Assert(newArguments.Count == 1, "Group aggregate had more than one argument?"); 316Debug.Assert(source.DeclaringType.EdmEquals(target.DeclaringType), "Relationship ends not declared by same relationship type?"); 530Debug.Assert(!expression.WithTies, "Limit.WithTies == true?"); 918Debug.Assert(expression.ExpressionKind == DbExpressionKind.FullOuterJoin, "DbJoinExpression had ExpressionKind other than InnerJoin, LeftOuterJoin or FullOuterJoin?"); 945Debug.Assert(expression.ExpressionKind == DbExpressionKind.OuterApply, "DbApplyExpression had ExpressionKind other than CrossApply or OuterApply?"); 1042Debug.Assert(expression.ExpressionKind == DbExpressionKind.Any, "DbQuantifierExpression had ExpressionKind other than All or Any?");
System\Data\Common\CommandTrees\ExpressionBindings.cs (2)
40Debug.Assert(input != null, "DbExpressionBinding input cannot be null"); 41Debug.Assert(varRef != null, "DbExpressionBinding variable cannot be null");
System\Data\Common\CommandTrees\ExpressionBuilder\DbExpressionBuilder.cs (8)
1742Debug.Assert(method != null, "Ensure method is non-null before calling ExtractAlias"); 1744Debug.Assert(aliases.Length > 0, "Incompatible method: at least one parameter is required"); 1750Debug.Assert(method != null, "Ensure method is non-null before calling ExtractAlias"); 1807Debug.Assert(instance != null, "Ensure instance is non-null before calling TryGetAnonymousTypeValues"); 2704Debug.Assert(DbExpressionKind.CrossApply == applyKind || DbExpressionKind.OuterApply == applyKind, "Invalid ApplyType"); 2721Debug.Assert(DbExpressionKind.CrossJoin == joinKind || 2729Debug.Assert(null == joinCondition, "Condition should not be specified for CrossJoin"); 2734Debug.Assert(joinCondition != null, "Condition must be specified for non-CrossJoin");
System\Data\Common\CommandTrees\ExpressionBuilder\EdmFunctions.cs (2)
28Debug.Assert(!string.IsNullOrEmpty(functionName), "Function name must not be null"); 60Debug.Assert(arguments[idx] != null, "Ensure arguments are non-null before calling InvokeCanonicalFunction");
System\Data\Common\CommandTrees\ExpressionBuilder\Internal\ArgumentValidation.cs (29)
34Debug.Assert(type != null, "Ensure type is non-null before calling RequirePolymorphicType"); 49Debug.Assert(expression != null, "Ensure expression is non-null before checking for type compatibility"); 50Debug.Assert(requiredResultType != null, "Ensure type is non-null before checking for type compatibility"); 76Debug.Assert(expression != null, "Ensure expression is non-null before checking for type compatibility"); 102Debug.Assert(from != null, "Ensure navigation source expression is non-null before calling RequireCompatibleType"); 103Debug.Assert(end != null, "Ensure navigation start end is non-null before calling RequireCompatibleType"); 132Debug.Assert(argument != null, "Validate argument is non-null before calling CheckCollectionArgument"); 142Debug.Assert(left != null && right != null, "Ensure left and right are non-null before calling RequireCollectionArguments"); 273Debug.Assert(elementType.IsReadOnly, "DbExpressionBinding Expression ResultType has editable element type"); 309Debug.Assert((elementType.IsReadOnly), "DbGroupExpressionBinding Expression ResultType has editable element type"); 320Debug.Assert(function != null, "Ensure function is non-null before calling GetExpectedParameters"); 1209Debug.Assert(refType.ElementType != null, "RefType constructor allowed null ElementType?"); 1423Debug.Assert(validWhens.Count > 0, "CreateExpressionList(arguments, argumentName, validationCallback) allowed empty Whens?"); 1442Debug.Assert(validWhens.Count > 0, "CreateExpressionList(arguments, argumentName, validationCallback) allowed empty Thens?"); 1546Debug.Assert(validElements.Count > 0, "CreateExpressionList(arguments, argumentName, validationCallback) allowed empty elements list?"); 1699Debug.Assert(null != Helper.GetModelTypeUsage(property), "EdmMember metadata has a TypeUsage of null"); 1817Debug.Assert(type.EdmType != null, "TypeUsage constructor allowed null EdmType?"); 1836Debug.Assert(memberMeta.Name != null, "EdmMember constructor allowed null name?"); 1837Debug.Assert(null != memberMeta.TypeUsage, "EdmMember constructor allowed null for TypeUsage?"); 1838Debug.Assert(null != memberMeta.DeclaringType, "EdmMember constructor allowed null for DeclaringType?"); 1851Debug.Assert(paramMeta.Name != null, "FunctionParameter constructor allowed null name?"); 1869Debug.Assert(function.Name != null, "EdmType constructor allowed null name?"); 1895Debug.Assert(functionParams != null, "EdmFunction constructor did not initialize Parameters?"); 1914Debug.Assert(!string.IsNullOrEmpty(entitySet.Name), "EntitySetBase constructor allowed null/empty set name?"); 1933Debug.Assert(entitySet.ElementType != null, "EntitySetBase constructor allowed null container?"); 2084Debug.Assert(edmEnumType != null, "edmEnumType != null"); 2085Debug.Assert(clrEnumType != null, "clrEnumType != null"); 2086Debug.Assert(clrEnumType.IsEnum, "non enum clr type."); 2106Debug.Assert(
System\Data\Common\CommandTrees\ExpressionBuilder\Internal\EnumerableValidator.cs (3)
106Debug.Assert(map != null, "Set EnumerableValidator.ConvertElement before calling validate"); 107Debug.Assert(collect != null, "Set EnumerableValidator.CreateResult before calling validate"); 141Debug.Assert(name != null, "GetName should not produce null");
System\Data\Common\CommandTrees\Internal\ExpressionCopier.cs (3)
32Debug.Assert(targetWorkspace != null, "Metadata workspace is null"); 41Debug.Assert(expression != null, "expression is null"); 95Debug.Assert(null != candidateFunctions && candidateFunctions.Count > 0, "Perspective.TryGetFunctionByName returned true with null/empty function result list");
System\Data\Common\CommandTrees\Internal\ExpressionDumper.cs (1)
780Debug.Assert(groupAgg != null, "Invalid DbAggregate");
System\Data\Common\CommandTrees\Internal\ExpressionKeyGen.cs (2)
191Debug.Assert(TypeSemantics.IsScalarType(e.ResultType), "Non-scalar type constant expressions are not supported."); 645Debug.Assert(ga.Arguments.Count == 1, "Group aggregate must have one argument.");
System\Data\Common\CommandTrees\Internal\ExpressionPrinter.cs (7)
36Debug.Assert(expr != null, "Null DbExpression"); 43Debug.Assert(tree != null && tree.Predicate != null, "Invalid DbDeleteCommandTree"); 74Debug.Assert(tree != null, "Null DbFunctionCommandTree"); 93Debug.Assert(tree != null, "Null DbInsertCommandTree"); 135Debug.Assert(tree != null && tree.Predicate != null, "Invalid DbUpdateCommandTree"); 187Debug.Assert(tree != null, "Null DbQueryCommandTree"); 937Debug.Assert(groupAgg != null, "Invalid DbAggregate");
System\Data\Common\CommandTrees\Internal\ParameterRetriever.cs (2)
31Debug.Assert(tree != null, "Ensure command tree is non-null before calling ParamterRetriever.GetParameters"); 40Debug.Assert(expression != null, "Command tree subexpressions should never be null");
System\Data\Common\CommandTrees\Internal\PatternMatchRules.cs (2)
87Debug.Assert(rules.Count() != 0, "At least one PatternMatchRule is required"); 88Debug.Assert(rules.Where(r => r == null).Count() == 0, "Individual PatternMatchRules must not be null");
System\Data\Common\CommandTrees\Internal\Validator.cs (2)
48Debug.Assert(expression != null, "Ensure expression is non-null before calling ValidateExpression"); 52Debug.Assert(this.variableScopes.Count == 0, "Variable scope stack left in inconsistent state");
System\Data\Common\CommandTrees\Internal\ViewSimplifier.cs (4)
311Debug.Assert(singleKeyNameAndValue.Item1 == fkConstraint.FromProperties[0].Name, "Unexpected single key property name"); 517Debug.Assert(original != null, "Original expression cannot be null"); 527Debug.Assert(varName != null, "Variable name cannot be null"); 528Debug.Assert(replValues != null, "Replacement values cannot be null");
System\Data\Common\CommandTrees\OperatorExpressions.cs (31)
32Debug.Assert(TypeSemantics.IsPrimitiveType(booleanResultType, PrimitiveTypeKind.Boolean), "DbAndExpression requires a Boolean result type"); 62Debug.Assert(TypeSemantics.IsPrimitiveType(booleanResultType, PrimitiveTypeKind.Boolean), "DbOrExpression requires a Boolean result type"); 92Debug.Assert(TypeSemantics.IsPrimitiveType(booleanResultType, PrimitiveTypeKind.Boolean), "DbNotExpression requires a Boolean result type"); 125Debug.Assert(TypeSemantics.IsNumericType(numericResultType), "DbArithmeticExpression result type must be numeric"); 127Debug.Assert( 137Debug.Assert(args != null, "DbArithmeticExpression arguments cannot be null"); 139Debug.Assert( 188Debug.Assert(whens != null, "DbCaseExpression whens cannot be null"); 189Debug.Assert(thens != null, "DbCaseExpression thens cannot be null"); 190Debug.Assert(elseExpr != null, "DbCaseExpression else cannot be null"); 191Debug.Assert(whens.Count == thens.Count, "DbCaseExpression whens count must match thens count"); 239Debug.Assert(TypeSemantics.IsCastAllowed(argument.ResultType, type), "DbCastExpression represents an invalid cast"); 274Debug.Assert(left != null, "DbComparisonExpression left cannot be null"); 275Debug.Assert(right != null, "DbComparisonExpression right cannot be null"); 276Debug.Assert(TypeSemantics.IsBooleanType(booleanResultType), "DbComparisonExpression result type must be a Boolean type"); 277Debug.Assert( 314Debug.Assert(TypeSemantics.IsBooleanType(booleanResultType), "DbIsEmptyExpression requires a Boolean result type"); 343Debug.Assert(TypeSemantics.IsBooleanType(booleanResultType), "DbIsNullExpression requires a Boolean result type"); 374Debug.Assert(DbExpressionKind.IsOf == this.ExpressionKind || DbExpressionKind.IsOfOnly == this.ExpressionKind, string.Format(CultureInfo.InvariantCulture, "Invalid DbExpressionKind used in DbIsOfExpression: {0}", Enum.GetName(typeof(DbExpressionKind), this.ExpressionKind))); 375Debug.Assert(TypeSemantics.IsBooleanType(booleanResultType), "DbIsOfExpression requires a Boolean result type"); 416Debug.Assert(DbExpressionKind.OfType == ofTypeKind || 460Debug.Assert(TypeSemantics.IsValidPolymorphicCast(argument.ResultType, asType), "DbTreatExpression represents an invalid treat"); 493Debug.Assert(input != null, "DbLikeExpression argument cannot be null"); 494Debug.Assert(pattern != null, "DbLikeExpression pattern cannot be null"); 495Debug.Assert(escape != null, "DbLikeExpression escape cannot be null"); 496Debug.Assert(TypeSemantics.IsPrimitiveType(input.ResultType, PrimitiveTypeKind.String), "DbLikeExpression argument must have a string result type"); 497Debug.Assert(TypeSemantics.IsPrimitiveType(pattern.ResultType, PrimitiveTypeKind.String), "DbLikeExpression pattern must have a string result type"); 498Debug.Assert(TypeSemantics.IsPrimitiveType(escape.ResultType, PrimitiveTypeKind.String), "DbLikeExpression escape must have a string result type"); 499Debug.Assert(TypeSemantics.IsBooleanType(booleanResultType), "DbLikeExpression must have a Boolean result type"); 547Debug.Assert(TypeSemantics.IsReferenceType(refResultType), "DbEntityRefExpression requires a reference result type"); 576Debug.Assert(TypeSemantics.IsRowType(rowResultType), "DbRefKeyExpression requires a row result type");
System\Data\Common\CommandTrees\RelationalExpressions.cs (35)
33Debug.Assert(input != null, "DbApplyExpression input cannot be null"); 34Debug.Assert(input != null, "DbApplyExpression apply cannot be null"); 35Debug.Assert(DbExpressionKind.CrossApply == applyKind || DbExpressionKind.OuterApply == applyKind, "Invalid DbExpressionKind for DbApplyExpression"); 81Debug.Assert(TypeSemantics.IsCollectionType(argument.ResultType), "DbDistinctExpression argument must have a collection result type"); 160Debug.Assert(object.ReferenceEquals(resultType, left.ResultType), "DbExceptExpression result type should be result type of left argument"); 192Debug.Assert(input != null, "DbFilterExpression input cannot be null"); 193Debug.Assert(predicate != null, "DbBFilterExpression predicate cannot be null"); 194Debug.Assert(TypeSemantics.IsPrimitiveType(predicate.ResultType, PrimitiveTypeKind.Boolean), "DbFilterExpression predicate must have a Boolean result type"); 243Debug.Assert(input != null, "DbGroupExpression input cannot be null"); 244Debug.Assert(groupKeys != null, "DbGroupExpression keys cannot be null"); 245Debug.Assert(aggregates != null, "DbGroupExpression aggregates cannot be null"); 246Debug.Assert(groupKeys.Count > 0 || aggregates.Count > 0, "At least one key or aggregate is required"); 327Debug.Assert(inputs != null, "DbCrossJoin inputs cannot be null"); 328Debug.Assert(inputs.Count >= 2, "DbCrossJoin requires at least two inputs"); 368Debug.Assert(left != null, "DbJoinExpression left cannot be null"); 369Debug.Assert(right != null, "DbJoinExpression right cannot be null"); 370Debug.Assert(condition != null, "DbJoinExpression condition cannot be null"); 371Debug.Assert(DbExpressionKind.InnerJoin == joinKind || 426Debug.Assert(argument != null, "DbLimitExpression argument cannot be null"); 427Debug.Assert(limit != null, "DbLimitExpression limit cannot be null"); 428Debug.Assert(object.ReferenceEquals(resultType, argument.ResultType), "DbLimitExpression result type must be the result type of the argument"); 479Debug.Assert(input != null, "DbProjectExpression input cannot be null"); 480Debug.Assert(projection != null, "DbProjectExpression projection cannot be null"); 525Debug.Assert(input != null, "DbQuantifierExpression input cannot be null"); 526Debug.Assert(predicate != null, "DbQuantifierExpression predicate cannot be null"); 527Debug.Assert(TypeSemantics.IsPrimitiveType(booleanResultType, PrimitiveTypeKind.Boolean), "DbQuantifierExpression must have a Boolean result type"); 528Debug.Assert(TypeSemantics.IsPrimitiveType(predicate.ResultType, PrimitiveTypeKind.Boolean), "DbQuantifierExpression predicate must have a Boolean result type"); 573Debug.Assert(key != null, "DbSortClause key cannot be null"); 609Debug.Assert(input != null, "DbSkipExpression input cannot be null"); 610Debug.Assert(sortOrder != null, "DbSkipExpression sort order cannot be null"); 611Debug.Assert(count != null, "DbSkipExpression count cannot be null"); 612Debug.Assert(TypeSemantics.IsCollectionType(resultType), "DbSkipExpression requires a collection result type"); 666Debug.Assert(input != null, "DbSortExpression input cannot be null"); 667Debug.Assert(sortOrder != null, "DbSortExpression sort order cannot be null"); 668Debug.Assert(TypeSemantics.IsCollectionType(resultType), "DbSkipExpression requires a collection result type");
System\Data\Common\CommandTrees\ValueExpressions.cs (27)
31Debug.Assert(value != null, "DbConstantExpression value cannot be null"); 32Debug.Assert(TypeSemantics.IsScalarType(resultType), "DbConstantExpression must have a primitive or enum value"); 33Debug.Assert(!value.GetType().IsEnum || TypeSemantics.IsEnumerationType(resultType), "value is an enum while the result type is not of enum type."); 34Debug.Assert(Helper.AsPrimitive(resultType.EdmType).ClrEquivalentType == (value.GetType().IsEnum ? value.GetType().GetEnumUnderlyingType() : value.GetType()), 139Debug.Assert(name != null, "DbVariableReferenceExpression Name cannot be null"); 177Debug.Assert(DbCommandTree.IsValidParameterName(name), "DbParameterReferenceExpression name should be valid"); 216Debug.Assert(property != null, "DbPropertyExpression property cannot be null"); 217Debug.Assert(instance != null, "DbPropertyExpression instance cannot be null"); 218Debug.Assert(Helper.IsEdmProperty(property) || 281Debug.Assert(function != null, "DbFunctionExpression function cannot be null"); 282Debug.Assert(arguments != null, "DbFunctionExpression arguments cannot be null"); 283Debug.Assert(object.ReferenceEquals(resultType, function.ReturnParameter.TypeUsage), "DbFunctionExpression result type must be function return type"); 328Debug.Assert(lambda != null, "DbLambdaExpression lambda cannot be null"); 329Debug.Assert(args != null, "DbLambdaExpression arguments cannot be null"); 330Debug.Assert(object.ReferenceEquals(resultType, lambda.Body.ResultType), "DbLambdaExpression result type must be Lambda body result type"); 331Debug.Assert(lambda.Variables.Count == args.Count, "DbLambdaExpression argument count does not match Lambda parameter count"); 498Debug.Assert(relType != null, "DbRelationshipNavigationExpression relationship type cannot be null"); 499Debug.Assert(fromEnd != null, "DbRelationshipNavigationExpression 'from' end cannot be null"); 500Debug.Assert(toEnd != null, "DbRelationshipNavigationExpression 'to' end cannot be null"); 501Debug.Assert(navigateFrom != null, "DbRelationshipNavigationExpression navigation source cannot be null"); 641Debug.Assert(args != null, "DbNewInstanceExpression arguments cannot be null"); 642Debug.Assert(args.Count > 0 || TypeSemantics.IsCollectionType(type), "DbNewInstanceExpression requires at least one argument when not creating an empty collection"); 650Debug.Assert(TypeSemantics.IsEntityType(resultType), "An entity type is required to create a NewEntityWithRelationships expression"); 651Debug.Assert(relationships != null, "Related entity ref collection cannot be null"); 698Debug.Assert(TypeSemantics.IsReferenceType(refResultType), "DbRefExpression requires a reference result type"); 734Debug.Assert(TypeSemantics.IsEntityType(entityResultType), "DbDerefExpression requires an entity result type"); 765Debug.Assert(entitySet != null, "DbScanExpression entity set cannot be null");
System\Data\Common\DataRecord.cs (3)
35Debug.Assert(null != edmUsage && null != values, "null recordType or values"); 60Debug.Assert(Helper.IsRowType(_edmUsage.EdmType), "Edm type should be Row Type"); 67Debug.Assert(_values.Length == _recordInfo.FieldMetadata.Count, "wrong values array size");
System\Data\Common\DataRecordInfo.cs (2)
80Debug.Assert(null != metadata, "invalid attempt to instantiate DataRecordInfo with null metadata information"); 87Debug.Assert((BuiltInTypeKind.EdmProperty == member.BuiltInTypeKind) ||
System\Data\Common\DbProviderServices.cs (5)
45Debug.Assert(storeMetadata.StoreProviderManifest != null, "StoreItemCollection has null StoreProviderManifest?"); 93Debug.Assert(commandTree != null, "Ensure command tree is non-null before calling ValidateDataSpace"); 256Debug.Assert(parameter != null, "Validate parameter before calling SetParameterValue"); 257Debug.Assert(parameterType != null, "Validate parameterType before calling SetParameterValue"); 310Debug.Assert(factory != null, "Should have thrown on null");
System\Data\Common\DbXmlEnabledProviderManifest.cs (1)
79Debug.Assert(type is PrimitiveType, "DbXmlEnabledProviderManifest.GetFacetDescriptions(): Argument is not a PrimitiveType");
System\Data\Common\EntitySql\AST\AliasedExpr.cs (3)
28Debug.Assert(expr != null, "expr != null"); 29Debug.Assert(alias != null, "alias != null"); 45Debug.Assert(expr != null, "expr != null");
System\Data\Common\EntitySql\AST\DotExpr.cs (1)
81Debug.Assert(_names == null || _names.Length > 0, "_names must be null or non-empty");
System\Data\Common\EntitySql\AST\Identifier.cs (1)
30Debug.Assert(isEscaped || name[0] != '[', "isEscaped || name[0] != '['");
System\Data\Common\EntitySql\AST\Literal.cs (31)
154System.Diagnostics.Debug.Assert(IsNumber && !IsSignedNumber); 155System.Diagnostics.Debug.Assert(sign[0] == '-' || sign[0] == '+', "sign symbol must be + or -"); 156System.Diagnostics.Debug.Assert(_computedValue == null); 393Debug.Assert(stringLiteralValue.Length >= 2); 394Debug.Assert(isUnicode == ('N' == stringLiteralValue[0]), "invalid string literal value"); 413Debug.Assert(before % 2 == 0, "must have an even number of delimiters in the string literal"); 429Debug.Assert(after == (before - 2) / 2); 443Debug.Assert(null != binaryLiteralValue, "binaryStringLiteral must not be null"); 452Debug.Assert(startIndex <= endIndex, "startIndex <= endIndex"); 485Debug.Assert(false, "Invalid Hexadecimal Digit"); 502Debug.Assert(datetimeParts.Length >= 5, "datetime literal value must have at least 5 parts"); 514Debug.Assert(year >= 1 && year <= 9999); 515Debug.Assert(month >= 1 && month <= 12); 516Debug.Assert(day >= 1 && day <= 31); 517Debug.Assert(hour >= 0 && hour <= 24); 518Debug.Assert(minute >= 0 && minute <= 59); 519Debug.Assert(second >= 0 && second <= 59); 520Debug.Assert(ticks >= 0 && ticks <= 9999999); 530Debug.Assert(datetimeParts.Length >= 7, "datetime literal value must have at least 7 parts"); 545Debug.Assert(year >= 1 && year <= 9999); 546Debug.Assert(month >= 1 && month <= 12); 547Debug.Assert(day >= 1 && day <= 31); 548Debug.Assert(hour >= 0 && hour <= 24); 549Debug.Assert(minute >= 0 && minute <= 59); 550Debug.Assert(second >= 0 && second <= 59); 551Debug.Assert(ticks >= 0 && ticks <= 9999999); 581Debug.Assert(datetimeParts.Length >= 2, "time literal value must have at least 2 parts"); 589Debug.Assert(hour >= 0 && hour <= 24); 590Debug.Assert(minute >= 0 && minute <= 59); 591Debug.Assert(second >= 0 && second <= 59); 592Debug.Assert(ticks >= 0 && ticks <= 9999999);
System\Data\Common\EntitySql\AST\MethodExpr.cs (2)
44Debug.Assert(expr != null, "expr != null"); 45Debug.Assert(args == null || args.Count > 0, "args must be null or a non-empty list");
System\Data\Common\EntitySql\AST\ParenExpr.cs (1)
27Debug.Assert(expr != null, "expr != null");
System\Data\Common\EntitySql\CqlLexerHelpers.cs (14)
106Debug.Assert(query != null, "query must not be null"); 107Debug.Assert(parserOptions != null, "parserOptions must not be null"); 331Debug.Assert(token != null, "IsEscapedIdentifier must not return null token"); 338Debug.Assert(token != null, "IsKeyword must not return null token"); 547Debug.Assert(!String.IsNullOrEmpty(literal), "literal must not be null or empty"); 548Debug.Assert(literalKind != AST.LiteralKind.Null, "literalKind must not be LiteralKind.Null"); 635Debug.Assert(ch == YY_EOF, "ch == YY_EOF"); 695Debug.Assert(-1 != literal.IndexOf('\''), "quoted literal value must have single quotes"); 696Debug.Assert(-1 != literal.LastIndexOf('\''), "quoted literal value must have single quotes"); 697Debug.Assert(literal.IndexOf('\'') != literal.LastIndexOf('\''), "quoted literal value must have 2 single quotes"); 698Debug.Assert(literal.Split(new char[] { '\'' }).Length == 3, "quoted literal value must have 2 single quotes"); 712Debug.Assert(literalPayload.IndexOf('\'') == -1, "quoted literal payload must not have single quotes"); 713Debug.Assert(literalPayload.LastIndexOf('\'') == -1, "quoted literal payload must not have single quotes"); 764Debug.Assert(null != binaryValue, "binaryValue must not be null");
System\Data\Common\EntitySql\CqlParser.cs (2)
2971System.Diagnostics.Debug.Assert(elist.Count==2); 2980System.Diagnostics.Debug.Assert(elist.Count==2);
System\Data\Common\EntitySql\CqlQuery.cs (6)
71Debug.Assert(parseResultInternal != null, "parseResultInternal != null post-condition FAILED"); 72Debug.Assert(parseResultInternal.CommandTree != null, "parseResultInternal.CommandTree != null post-condition FAILED"); 116Debug.Assert(lambda != null, "lambda != null post-condition FAILED"); 219Debug.Assert(parseResultInternal != null, "parseResultInternal != null post-condition FAILED"); 220Debug.Assert(parseResultInternal.CommandTree != null, "parseResultInternal.CommandTree != null post-condition FAILED"); 260Debug.Assert(null != lambda, "null != lambda post-condition FAILED");
System\Data\Common\EntitySql\EntitySqlParser.cs (1)
31Debug.Assert(null != perspective, "null perspective?");
System\Data\Common\EntitySql\FunctionOverloadResolver.cs (7)
137Debug.Assert(argTypesFlat.Count == rank.Length, "argTypesFlat.Count == rank.Length"); 151Debug.Assert(bestCandidateRank != null); 158Debug.Assert(rank.Length == bestCandidateRank.Length, "composite ranks have different number of elements"); 259Debug.Assert(flatArgumentList.Count == flatOverloadParamList.Count, "flatArgumentList.Count == flatOverloadParamList.Count"); 288Debug.Assert(isPromotableTo(fromType, toType), "isPromotableTo(fromType, toType)"); 302Debug.Assert(fromType != null, "fromType != null"); 303Debug.Assert(toType != null, "toType != null");
System\Data\Common\EntitySql\ParseResult.cs (2)
59Debug.Assert(name != null, "name can not be null"); 60Debug.Assert(lambda != null, "lambda cannot be null");
System\Data\Common\EntitySql\SemanticAnalyzer.cs (96)
40Debug.Assert(sr != null, "sr must not be null"); 71Debug.Assert(parseResult != null, "ConvertStatement produced null parse result"); 72Debug.Assert(parseResult.CommandTree != null, "ConvertStatement returned null command tree"); 109Debug.Assert(lambda != null, "AnalyzeQueryCommand returned null"); 155Debug.Assert(name != null, "name != null"); 166Debug.Assert(metadataMember != null, "metadata member name resolution must not return null"); 210Debug.Assert(astStatement != null, "astStatement must not be null"); 224Debug.Assert(converted != null, "statementConverter returned null"); 225Debug.Assert(converted.CommandTree != null, "statementConverter produced null command tree"); 237Debug.Assert(astStatement != null, "astStatement must not be null"); 242Debug.Assert(converted != null, "ConvertQueryStatementToDbExpression returned null"); 243Debug.Assert(functionDefs != null, "ConvertQueryStatementToDbExpression produced null functionDefs"); 263Debug.Assert(astStatement != null, "astStatement must not be null"); 312Debug.Assert(null != converted, "null != converted"); 359Debug.Assert(!String.IsNullOrEmpty(name), "function name must not be null or empty"); 365Debug.Assert(parameters != null, "parameters must not be null"); // should be empty collection if no parameters 374Debug.Assert(functionDefList.Count == inlineFunctionInfos.Count); 416Debug.Assert(typeUsage != null, "typeUsage must not be null"); 772Debug.Assert(null != converted, "null != converted"); 825Debug.Assert(includeInlineFunctions, "includeInlineFunctions must be true, otherwise recursion does not stop"); 891Debug.Assert(mappingCollection != null, "mappingCollection != null"); 1123Debug.Assert(argTypes != null, "argTypes != null"); 1167Debug.Assert(groupAggregateExpr.AggregateInfo.AggregateStubExpression != null, "Resolved aggregate stub expression must not be null."); 1171Debug.Assert(converted != null, "converted != null"); 1234Debug.Assert(argTypes != null, "argTypes != null"); 1273Debug.Assert( 1282Debug.Assert((1 == functionType.Parameters.Count), "(1 == functionType.Parameters.Count)"); // we only support monadic aggregate functions 1283Debug.Assert(TypeSemantics.IsCollectionType(functionType.Parameters[0].TypeUsage), "functionType.Parameters[0].Type is CollectionType"); 1314Debug.Assert(converted != null, "converted != null"); 1330Debug.Assert(TypeSemantics.IsComplexType(type) || TypeSemantics.IsEntityType(type) || TypeSemantics.IsRelationshipType(type), "type must have a constructor"); 1345Debug.Assert(memberModelTypeUsage.EdmType.DataSpace == DataSpace.CSpace, "member space must be CSpace"); 1426Debug.Assert(null != newInstance, "null != newInstance"); 1491Debug.Assert(null != functionExpression, "null != functionExpression"); 1621Debug.Assert(toEnd != null, "toEnd must be resolved."); 1657Debug.Fail("N-ary relationship? N > 2"); 1661Debug.Assert(fromEnd != null, "fromEnd must be resolved."); 1757Debug.Assert(toEnd == null, "N-ary relationship? N > 2"); 1761Debug.Assert(fromEnd != null, "fromEnd must be resolved."); 1778Debug.Fail("N-ary relationship? N > 2"); 1782Debug.Assert(toEnd != null, "toEnd must be resolved."); 1788Debug.Assert(null != converted, "null != converted"); 1814Debug.Assert(null != converted, "null != converted"); 1842Debug.Assert(null != converted, "null != converted"); 1931Debug.Assert(null != converted, "null != converted"); 1955Debug.Assert(null != converted, "null != converted"); 2324Debug.Assert(typeName != null, "typeName != null"); 2357Debug.Assert(name != null, "name != null for a multipart identifier"); 2362Debug.Fail("Unexpected AST.Node in the type name"); 2367Debug.Assert(metadataMember != null, "metadata member name resolution must not return null"); 2394Debug.Assert(typeSpecArgs != null && typeSpecArgs.Count > 0, "typeSpecArgs must be null or a non-empty list"); 2478Debug.Assert(typeDefinitionExpr != null, "typeDefinitionExpr != null"); 2511Debug.Assert(rowTypeDefExpr.Properties != null && rowTypeDefExpr.Properties.Count > 0, "rowTypeDefExpr.Properties must be a non-empty collection"); 2522Debug.Assert(converted != null, "Type definition conversion yielded null"); 2755Debug.Assert(isRestrictedViewGenerationMode ? null == queryExpr.GroupByClause : true, "GROUP BY clause must be null in RestrictedViewGenerationMode"); 2756Debug.Assert(isRestrictedViewGenerationMode ? null == queryExpr.HavingClause : true, "HAVING clause must be null in RestrictedViewGenerationMode"); 2757Debug.Assert(isRestrictedViewGenerationMode ? null == queryExpr.OrderByClause : true, "ORDER BY clause must be null in RestrictedViewGenerationMode"); 2822Debug.Assert(queryExpr.OrderByClause == null || queryExpr.OrderByClause.LimitSubClause == null, "TOP and LIMIT in the same query are not allowed"); 2848Debug.Assert(null != projectExpression, "null != projectExpression"); 2910Debug.Assert(projectionItems.Count > 0, "projectionItems.Count > 0"); 2922Debug.Assert(projectionItems.Count == 1, "projectionItems.Count must be 1 for SELECT VALUE"); 2967Debug.Assert(projectionItemErrCtxs.Count == rowType.Members.Count); 3037Debug.Assert(fromBinding != null, "fromBinding != null"); 3061Debug.Assert(fromClauseItem.FromClauseItemKind == AST.FromClauseItemKind.ApplyFromClause, "AST.FromClauseItemKind.ApplyFromClause expected"); 3066Debug.Assert(fromItemBinding != null, "fromItemBinding != null"); 3125Debug.Assert(aliasedBinding != null, "aliasedBinding != null"); 3231Debug.Assert(joinBinding != null, "joinBinding != null"); 3241Debug.Assert(joinKind != AST.JoinKind.RightOuter, "joinKind != JoinKind.RightOuter"); 3282Debug.Assert(applyBinding != null, "applyBinding != null"); 3325Debug.Assert(predicate != null, "predicate != null"); 3352Debug.Assert(scopeEntry.EntryKind == ScopeEntryKind.SourceVar || scopeEntry.EntryKind == ScopeEntryKind.InvalidGroupInputRef, 3361Debug.Assert(whereBinding != null, "whereBinding != null"); 3373Debug.Assert((sr.ParserOptions.ParserCompilationMode == ParserOptions.CompilationMode.RestrictedViewGenerationMode) ? null == groupByClause : true, "GROUP BY clause must be null in RestrictedViewGenerationMode"); 3408Debug.Assert(scopeEntry.EntryKind == ScopeEntryKind.SourceVar, "scopeEntry.EntryKind == ScopeEntryKind.SourceVar"); 3425Debug.Assert(null != groupByClause, "groupByClause must not be null at this point"); 3451Debug.Assert(groupKeyAggregateInfo.EvaluatingScopeRegion == groupKeyAggregateInfo.DefiningScopeRegion, "Group key must evaluate on the scope it was defined on."); 3471Debug.Assert(functionAggregateInfo.EvaluatingScopeRegion == functionAggregateInfo.DefiningScopeRegion, "Group key must evaluate on the scope it was defined on."); 3483Debug.Assert(groupPartitionInfo.EvaluatingScopeRegion == groupPartitionInfo.DefiningScopeRegion, "Group key must evaluate on the scope it was defined on."); 3707Debug.Assert(scopeEntry.EntryKind == ScopeEntryKind.SourceVar, "scopeEntry.EntryKind == ScopeEntryKind.SourceVar"); 3743Debug.Fail("Unexpected group aggregate kind:" + groupAggregateInfo.AggregateKind.ToString()); 3773Debug.Assert(aggregates.Any((aggregate) => String.CompareOrdinal(aggregate.Key, groupAggregateVarRef.VariableName) == 0), 3815Debug.Assert(scopeEntry.EntryKind == ScopeEntryKind.SourceVar, "scopeEntry.EntryKind == ScopeEntryKind.SourceVar"); 3859Debug.Assert( 3963Debug.Assert(TypeSemantics.IsCollectionType(lambdaVariable.ResultType)); 3982Debug.Assert(projectionExpression.Arguments.Count == inputVariableTypeProperties.Count, "projectionExpression.Arguments.Count == inputVariableTypeProperties.Count"); 4031Debug.Assert(_alternativeName == null, "GroupKeyInfo.AlternativeName can not be reset"); 4051Debug.Assert((sr.ParserOptions.ParserCompilationMode == ParserOptions.CompilationMode.RestrictedViewGenerationMode) ? null == queryExpr.OrderByClause : true, "ORDER BY clause must be null in RestrictedViewGenerationMode"); 4126Debug.Assert(projectExpression is DbDistinctExpression, "projectExpression is DbDistinctExpression"); 4134Debug.Assert(projectionItems.Count == 1, "projectionItems.Count == 1"); 4139Debug.Assert(selectClause.SelectKind == AST.SelectKind.Row, "selectClause.SelectKind == AST.SelectKind.Row"); 4249Debug.Assert(sr.CurrentScopeIndex < sr.CurrentScopeRegion.FirstScopeIndex, "Current scope region is expected to have no scopes."); 4283Debug.Assert(scopeEntry.EntryKind == ScopeEntryKind.SourceVar || scopeEntry.EntryKind == ScopeEntryKind.InvalidGroupInputRef, 4293Debug.Assert(null != sortBinding, "null != sortBinding"); 4309Debug.Assert(right.ExpressionKind == DbExpressionKind.NewInstance, "right.ExpressionKind == DbExpressionKind.NewInstance"); 4367Debug.Assert(NumberOfElements == astExprConverters.Count, "The number of elements and initial capacity don't match"); 5200Debug.Assert(bltInExpr.Kind == AST.BuiltInKind.Between || bltInExpr.Kind == AST.BuiltInKind.NotBetween, "bltInExpr.Kind must be Between or NotBetween"); 5201Debug.Assert(bltInExpr.ArgCount == 3, "bltInExpr.ArgCount == 3");
System\Data\Common\EntitySql\SemanticResolver.cs (43)
188Debug.Assert(paramDef.ResultType.IsReadOnly, "paramDef.ResultType.IsReadOnly must be set"); 215Debug.Assert(varDef.ResultType.IsReadOnly, "varDef.ResultType.IsReadOnly must be set"); 385Debug.Assert(expr != null, "scopeEntry.GetExpression(...) returned null"); 450Debug.Fail("Unexpected group aggregate kind."); 465Debug.Assert(!_ignoreEntityContainerNameResolution, "EnterIgnoreEntityContainerNameResolution() is not reentrant."); 469Debug.Assert(this._ignoreEntityContainerNameResolution, "_ignoreEntityContainerNameResolution must be true."); 476Debug.Assert(!String.IsNullOrEmpty(name), "name must not be null or empty"); 615Debug.Assert(valueExpr != null, "valueExpr != null"); 624Debug.Assert(member != null, "member != null"); 625Debug.Assert(this.NameComparer.Equals(name, member.Name), "this.NameComparer.Equals(name, member.Name)"); 639Debug.Assert(valueExpr != null, "valueExpr != null"); 858Debug.Assert(this.CurrentScopeRegion == scopeRegion, "Scope region stack is corrupted."); 863Debug.Assert(this._scopeRegions.Count > 1, "_scopeRegionFlags.Count > 1"); 933Debug.Fail("Failed to find the defining scope region for the given scope."); 982Debug.Assert(this._currentGroupAggregateInfo == aggregateInfo, "Aggregare info stack is corrupted."); 1079Debug.Assert(action != null, "action != null"); 1122Debug.Assert(aggregateKind != GroupAggregateKind.None, "aggregateKind != GroupAggregateKind.None"); 1123Debug.Assert(errCtx != null, "errCtx != null"); 1124Debug.Assert(definingScopeRegion != null, "definingScopeRegion != null"); 1135Debug.Assert(AstNode != null, "AstNode must be set."); 1136Debug.Assert(aggregateName != null && resultType != null, "aggregateName and aggregateDefinition must not be null."); 1137Debug.Assert(AggregateName == null && AggregateStubExpression == null, "Cannot reattach."); 1148Debug.Assert(AstNode != null, "AstNode must be set."); 1158Debug.Assert(_evaluatingScopeRegion == null, "Can not update referenced scope index after _evaluatingScopeRegion have been computed."); 1180Debug.Assert(_evaluatingScopeRegion == null, "Can't change _innermostReferencedScopeRegion after _evaluatingScopeRegion has been initialized."); 1192Debug.Assert(_evaluatingScopeRegion == null, "_evaluatingScopeRegion has already been initialized"); 1254Debug.Assert(_evaluatingScopeRegion.IsAggregating, "_evaluatingScopeRegion.IsAggregating must be true"); 1255Debug.Assert(_evaluatingScopeRegion.ScopeRegionIndex <= DefiningScopeRegion.ScopeRegionIndex, "_evaluatingScopeRegion must outer to the DefiningScopeRegion"); 1372Debug.Assert(_evaluatingScopeRegion == null, "Can not add contained aggregate after _evaluatingScopeRegion have been computed."); 1378Debug.Assert(_containedAggregates.Contains(containedAggregate) == false, "containedAggregate is already registered"); 1405Debug.Assert(_containedAggregates != null && _containedAggregates.Contains(containedAggregate), "_containedAggregates.Contains(containedAggregate)"); 1434Debug.Assert(_evaluatingScopeRegion != null, "_evaluatingScopeRegion is not initialized"); 1459Debug.Assert(methodExpr != null, "methodExpr != null"); 1464Debug.Assert(aggregateDefinition != null, "aggregateDefinition != null"); 1477Debug.Assert(groupPartitionExpr != null, "groupPartitionExpr != null"); 1482Debug.Assert(aggregateDefinition != null, "aggregateDefinition != null"); 1554Debug.Assert(!IsAggregating, "Scope region group operation is not reentrant."); 1562Debug.Assert(IsAggregating, "Scope region must inside group operation in order to leave it."); 1576Debug.Assert(IsAggregating, "IsAggregating must be true."); 1596Debug.Assert(!_groupAggregateNames.Contains(groupAggregateName), "!_groupAggregateNames.ContainsKey(groupAggregateName)"); 1620Debug.Assert(FirstScopeIndex <= _scopeManager.CurrentScopeIndex, "FirstScopeIndex <= CurrentScopeIndex"); 1636Debug.Assert(FirstScopeIndex <= _scopeManager.CurrentScopeIndex, "FirstScopeIndex <= CurrentScopeIndex"); 1645Debug.Assert(newScopeEntry != null, "newScopeEntry != null");
System\Data\Common\EntitySql\StaticContext.cs (20)
48Debug.Assert(Contains(key)); 54Debug.Assert(Contains(key)); 204Debug.Assert(_groupVarBasedExpression == null, "_groupVarBasedExpression == null"); 205Debug.Assert(_groupAggBasedExpression == null, "_groupAggBasedExpression == null"); 209Debug.Assert(_varBasedExpression is DbVariableReferenceExpression, "_varBasedExpression is DbVariableReferenceExpression"); 232Debug.Assert(_groupVarBasedExpression == null, "_groupVarBasedExpression == null"); 233Debug.Assert(_groupAggBasedExpression == null, "_groupAggBasedExpression == null"); 237Debug.Assert(_varBasedExpression is DbVariableReferenceExpression, "_varBasedExpression is DbVariableReferenceExpression"); 242Debug.Assert(_propRefs.Count > 0, "_propRefs.Count > 0"); 258Debug.Assert(_groupVarBasedExpression == null, "_groupVarBasedExpression == null"); 259Debug.Assert(_groupAggBasedExpression == null, "_groupAggBasedExpression == null"); 316Debug.Assert(_groupVarBasedExpression != null, "_groupVarBasedExpression != null"); 453Debug.Assert(CurrentScopeIndex >= 0); 485Debug.Assert(scopeIndex >= 0, "scopeIndex >= 0"); 486Debug.Assert(scopeIndex <= CurrentScopeIndex, "scopeIndex <= CurrentScopeIndex"); 502Debug.Assert(scopeIndex >= 0, "[PRE] savePoint.ScopeIndex >= 0"); 503Debug.Assert(scopeIndex <= CurrentScopeIndex, "[PRE] savePoint.ScopeIndex <= CurrentScopeIndex"); 504Debug.Assert(CurrentScopeIndex >= 0, "[PRE] CurrentScopeIndex >= 0"); 520Debug.Assert(scopeIndex == CurrentScopeIndex, "[POST] savePoint.ScopeIndex == CurrentScopeIndex"); 521Debug.Assert(CurrentScopeIndex >= 0, "[POST] CurrentScopeIndex >= 0");
System\Data\Common\EntitySql\TypeResolver.cs (21)
39Debug.Assert(!String.IsNullOrEmpty(name), "name must not be empty"); 71Debug.Assert(x != null && y != null, "metadata members must not be null"); 77Debug.Assert(obj != null, "metadata member must not be null"); 102Debug.Assert(typeUsage != null, "typeUsage must not be null"); 120Debug.Assert(enumType != null, "enumType must not be null"); 121Debug.Assert(enumMember != null, "enumMember must not be null"); 141Debug.Assert(functionMetadata != null && functionMetadata.Count > 0, "FunctionMetadata must not be null or empty"); 159Debug.Assert(functionMetadata != null && functionMetadata.Count > 0, "FunctionMetadata must not be null or empty"); 273Debug.Assert(!String.IsNullOrEmpty(name), "name must not be null or empty"); 274Debug.Assert(functionInfo != null, "functionInfo != null"); 308Debug.Fail("Not implemented"); 323Debug.Assert(!_resolveLeftMostUnqualifiedNameAsNamespaceOnly, "EnterBackwardCompatibilityResolution() is not reentrant."); 327Debug.Assert(this._resolveLeftMostUnqualifiedNameAsNamespaceOnly, "_resolveLeftMostUnqualifiedNameAsNamespaceOnly must be true."); 334Debug.Assert(name != null && name.Length > 0, "name must not be empty"); 345Debug.Assert(metadataMember != null, "metadata member name resolution must not return null"); 386Debug.Assert(member != null, "member != null"); 387Debug.Assert(_parserOptions.NameComparer.Equals(name, member.Name), "_parserOptions.NameComparer.Equals(name, member.Name)"); 403Debug.Assert(!String.IsNullOrEmpty(name), "name must not be empty"); 515Debug.Assert(name != null && length > 1 && length <= name.Length, "name must not be empty"); 537Debug.Assert(!String.IsNullOrEmpty(rightName), "rightName must not be empty"); 609Debug.Assert(names != null && names.Length > 0, "names must not be null or empty");
System\Data\Common\EntityUtil.cs (15)
251Debug.Assert(identifier != null, "identifier should not be null"); 955Debug.Assert(null != valueType, "null valueType"); 956Debug.Assert(null != destinationType, "null destinationType"); 972Debug.Assert(null != destinationType, "null value"); 1016Debug.Assert(!String.IsNullOrEmpty(relationshipName), "empty relationshipName"); 1249Debug.Assert(type != null, "The type cannot be null."); 1514Debug.Assert(null != (object)key, "Null entity key"); 1515Debug.Assert(null != entitySet, "Null entity set"); 1516Debug.Assert(null != entitySet.EntityContainer, "Null entity container in the entity set"); 1747Debug.Assert(null != values, "null values"); // use a different method if values can be null 1836Debug.Assert(providerFactory != null); 1878Debug.Fail("GetFactory failed with: " + ex); 1910Debug.Assert(assemblyName != null, "assemblyName should not be null at this point"); 1960Debug.Assert(e != null, "Unexpected null exception!"); 1973Debug.Assert(e != null, "Unexpected null exception!");
System\Data\Common\FieldNameLookup.cs (2)
40Debug.Assert(null != fieldNames[i], "MDAC 66681"); 53Debug.Assert(null != fieldNames[i], "MDAC 66681");
System\Data\Common\Internal\Materialization\ColumnMapKeyBuilder.cs (2)
252Debug.Assert(isRefType, "RefColumnMap is not of RefType?"); 272Debug.Fail("must not encounter VarRef in ColumnMap for key (eliminated in final ColumnMap)");
System\Data\Common\Internal\Materialization\Coordinator.cs (1)
316Debug.Assert(null == _handleClose, "more than one handler for a collection close 'event'");
System\Data\Common\Internal\Materialization\CoordinatorFactory.cs (1)
301Debug.Assert(null != result, "did you initialize the record states?");
System\Data\Common\Internal\Materialization\CoordinatorScratchpad.cs (2)
146Debug.Assert(nested.Depth == this.Depth + 1, "can only nest depth + 1"); 492Debug.Assert(
System\Data\Common\Internal\Materialization\Shaper.cs (38)
31Debug.Assert(context == null || workspace == context.MetadataWorkspace, "workspace must match context's workspace"); 126Debug.Assert(null != wrappedEntity, "wrapped entity is null"); 139Debug.Assert(MergeOption.NoTracking != this.MergeOption, "no need to HandleEntity if there's no tracking"); 140Debug.Assert(MergeOption.AppendOnly != this.MergeOption, "use HandleEntityAppendOnly instead..."); 141Debug.Assert(null != wrappedEntity, "wrapped entity is null"); 142Debug.Assert(null != wrappedEntity.Entity, "if HandleEntity is called, there must be an entity"); 149Debug.Assert(null != entitySet, "if there is an entity key, there must also be an entity set"); 155Debug.Assert(existingEntry.EntityKey.Equals(entityKey), "Found ObjectStateEntry with wrong EntityKey"); 183Debug.Assert(this.MergeOption == MergeOption.AppendOnly, "only use HandleEntityAppendOnly when MergeOption is AppendOnly"); 184Debug.Assert(null != constructEntityDelegate, "must provide delegate to construct the entity"); 197Debug.Assert(null != entitySet, "if there is an entity key, there must also be an entity set"); 203Debug.Assert(existingEntry.EntityKey.Equals(entityKey), "Found ObjectStateEntry with wrong EntityKey"); 241Debug.Assert(null != wrappedEntity, "wrapped entity is null"); 255Debug.Assert(null != wrappedSource, "wrapped entity is null"); 287Debug.Assert(targetMember != null); 288Debug.Assert(targetMember.RelationshipMultiplicity == RelationshipMultiplicity.One || targetMember.RelationshipMultiplicity == RelationshipMultiplicity.ZeroOrOne); 304Debug.Assert(associationSet != null, "associationSet should not be null"); 350Debug.Assert(false, "Unexpected sourceMember.RelationshipMultiplicity"); 371Debug.Assert(!targetEntry.IsRelationship, "how IsRelationship?"); 411Debug.Assert(associationType.DataSpace == DataSpace.CSpace); 498Debug.Assert(relatedEnd != null, "RelatedEnd should not be null"); 530Debug.Assert(null != wrappedEntity, "wrapped entity is null"); 619Debug.Assert(spatialTypeKind == PrimitiveTypeKind.Geography || spatialTypeKind == PrimitiveTypeKind.Geometry, "Spatial primitive type kind is not geography or geometry?"); 651Debug.Assert(Helper.IsGeometricTypeKind(spatialTypeKind)); 694Debug.Assert(null != (object)sourceKey); 695Debug.Assert(wrappedSource != null); 696Debug.Assert(wrappedSource.Entity != null); 697Debug.Assert(targetMember != null); 698Debug.Assert(this.Context != null); 710Debug.Assert(associationSet.AssociationSetEnds[sourceMember.Name].EntitySet == sourceEntitySet); 721Debug.Assert(null != wrappedSource, "wrapped entity is null"); 743Debug.Assert(null != wrappedEntity, "wrapped entity is null"); 744Debug.Assert(null != wrappedEntity.Entity, "null entity"); 745Debug.Assert(null != existingEntry, "null ObjectStateEntry"); 746Debug.Assert(null != existingEntry.Entity, "ObjectStateEntry without Entity"); 761Debug.Assert(EntityState.Added != existingEntry.State, "entry in State=Added"); 762Debug.Assert(EntityState.Detached != existingEntry.State, "entry in State=Detached"); 777Debug.Assert(MergeOption.PreserveChanges == MergeOption, "not MergeOption.PreserveChanges");
System\Data\Common\Internal\Materialization\ShaperFactory.cs (1)
69Debug.Assert(mergeOption == _mergeOption, "executing a query with a different mergeOption than was used to compile the delegate");
System\Data\Common\Internal\Materialization\Translator.cs (15)
199Debug.Assert(columnMap is CollectionColumnMap, "root column map must be a collection for a query"); 218Debug.Assert(null != translator._rootCoordinatorScratchpad, "translating the root of the query must populate _rootCoordinatorBuilder"); // how can this happen? 419Debug.Fail(string.Format(CultureInfo.CurrentCulture, "The type {0} was not the expected scalar, enumeration, collection, structural, nominal, or reference type.", edmType.GetType())); 422Debug.Assert(null != result, "no result?"); // just making sure we cover this in the switch statement. 458Debug.Assert(null != edmType, "no edmType?"); // edmType must not be null. 851Debug.Assert(left.Type == right.Type, "equals with different types"); 1004Debug.Assert(0 < keyColumns.Length, "empty keyColumns?"); 1219Debug.Assert(cSpaceType.BuiltInTypeKind == BuiltInTypeKind.EntityType, "Type was " + cSpaceType.BuiltInTypeKind); 1415Debug.Fail("Should always find a property for the setterMethod since we got the setter method from a property in the first place."); 1546Debug.Assert(columnMap.Type.EdmType.BuiltInTypeKind == BuiltInTypeKind.RowType, "RecordColumnMap without RowType?"); // we kind of depend upon this 2077Debug.Assert(Helper.IsGeographicType((PrimitiveType)columnType.EdmType) || Helper.IsGeometricType((PrimitiveType)columnType.EdmType), "Spatial primitive type is neither Geometry or Geography?"); 2095Debug.Assert(needsNullableCheck, "This is a nullable enum so needsNullableCheck should be true to emit code that handles null values read from the reader."); 2101Debug.Assert(!needsNullableCheck, "If the requested type is object there is no special handling for null values returned from the reader."); 2139Debug.Assert(null != type, "type required"); 2222Debug.Fail("VarRefColumnMap should be substituted at this point");
System\Data\Common\Internal\MultipartIdentifier.cs (1)
63Debug.Assert(-1 == leftQuote.IndexOf(separator) && -1 == rightQuote.IndexOf(separator) && leftQuote.Length == rightQuote.Length, "Incorrect usage of quotes");
System\Data\Common\QueryCache\CompiledQueryCacheEntry.cs (1)
77Debug.Assert(newPlan != null, "New plan cannot be null");
System\Data\Common\QueryCache\CompiledQueryCacheKey.cs (1)
31Debug.Assert(compareTo != null, "Comparison key should not be null");
System\Data\Common\QueryCache\EntityClientCacheKey.cs (6)
81Debug.Assert(null != otherObject, "otherObject must not be null"); 130Debug.Assert(TypeSemantics.IsPrimitiveType(type, PrimitiveTypeKind.String), "Update GetTypeUsageToken to return 'Xml' for Xml parameters"); 142Debug.Assert(TypeSemantics.IsPrimitiveType(type), "EntityParameter TypeUsage not a primitive type?"); 143Debug.Assert(!TypeSemantics.IsPrimitiveType(type, PrimitiveTypeKind.String), "String TypeUsage not derived from DbType.AnsiString, AnsiString, String, StringFixedLength or Xml?"); 167Debug.Assert(paramTypeUsage.Count == entityCommand.Parameters.Count, "entityParameter collection and query parameter collection must have the same number of entries"); 178Debug.Assert(paramTypeUsage.Count == entityCommand.Parameters.Count, "entityParameter collection and query parameter collection must have the same number of entries");
System\Data\Common\QueryCache\EntitySqlQueryCacheKey.cs (2)
80Debug.Assert(null != eSqlStatement, "eSqlStatement must not be null"); 118Debug.Assert(null != otherObject, "otherObject must not be null");
System\Data\Common\QueryCache\LinqQueryCacheKey.cs (2)
80Debug.Assert(null != expressionKey, "expressionKey must not be null"); 113Debug.Assert(null != otherObject, "otherObject must not be null");
System\Data\Common\QueryCache\QueryCacheManager.cs (6)
103Debug.Assert(maximumSize > 0, "Maximum size must be greater than zero"); 104Debug.Assert(loadFactor > 0 && loadFactor <= 1, "Load factor must be greater than 0.0 and less than or equal to 1.0"); 105Debug.Assert(recycleMillis >= 0, "Recycle period in milliseconds must not be negative"); 140Debug.Assert(null != inQueryCacheEntry, "qEntry must not be null"); 174Debug.Assert(null != key, "key must not be null"); 217Debug.Assert(null != queryCacheKey, "queryCacheKey must not be null");
System\Data\Common\QueryCache\ShaperFactoryQueryCacheKey.cs (1)
22Debug.Assert(null != columnMapKey, "null columnMapKey");
System\Data\Common\Utils\Boolean\BoolExpr.cs (5)
84Debug.Assert(null != candidates && 1 < candidates.Length, "must be at least one to pick"); 255Debug.Assert(null != (object)identifier); 272Debug.Fail("use only typed equals"); 336Debug.Assert(null != children); 349Debug.Fail("use only typed Equals");
System\Data\Common\Utils\Boolean\Clause.cs (2)
53Debug.Assert(isAnd || ExprType.Or == treeType); 89Debug.Fail("call typed Equals");
System\Data\Common\Utils\Boolean\ConversionContext.cs (1)
80Debug.Assert(2 == vertex.Children.Length);
System\Data\Common\Utils\Boolean\DomainConstraint.cs (2)
38Debug.Assert(null != identifier && null != domain); 99Debug.Assert(null != variable && null != range);
System\Data\Common\Utils\Boolean\Literal.cs (2)
43Debug.Assert(null != term); 82Debug.Fail("use typed Equals");
System\Data\Common\Utils\Boolean\Sentence.cs (1)
83Debug.Assert(isAnd || ExprType.Or == treeType);
System\Data\Common\Utils\Boolean\Simplifier.cs (1)
59Debug.Assert(isAnd || ExprType.Or == tree.ExprType);
System\Data\Common\Utils\Boolean\Solver.cs (15)
106Debug.Assert(null != children, "children must be specified"); 107Debug.Assert(2 <= children.Length, "must be at least 2 children"); 108Debug.Assert(children.All(child => child != null), "children must not be null"); 109Debug.Assert(children.All(child => child.IsSink()), "children must be sinks"); 110Debug.Assert(variable <= _variableCount, "variable out of range"); 260Debug.Assert(variable == vertex.Variable, 266Debug.Assert(variableAssigment < vertex.Children.Length, "variable assignment out of range"); 276Debug.Assert(null != vertices); 290Debug.Assert(vertex != null, "vertex must not be null"); 297Debug.Assert(_knownVertices.TryGetValue(vertex, out comparisonVertex) && 347Debug.Assert(2 <= vertex.Children.Length, "internal vertices must have at least 2 children"); 370Debug.Assert(null != (object)value1, "null key element"); 371Debug.Assert(null != (object)value2, "null key element"); 372Debug.Assert(null != (object)value3, "null key element"); 387Debug.Fail("used typed Equals");
System\Data\Common\Utils\Boolean\Vertex.cs (5)
53Debug.Assert(null != children, "internal vertices must define children"); 54Debug.Assert(2 <= children.Length, "internal vertices must have at least two children"); 55Debug.Assert(0 < variable, "internal vertices must have 0 < variable"); 58Debug.Assert(variable < child.Variable, "children must have greater variable"); 118Debug.Fail("used typed Equals");
System\Data\Common\Utils\Boolean\Visitor.cs (5)
70Debug.Assert(null != expression); 130Debug.Assert(null != expression, "expression must be given"); 197Debug.Assert(null != translator); 249Debug.Assert(null != context, "must provide a context"); 255Debug.Assert(null != expr, "must provide an expression");
System\Data\Common\Utils\ByValueEqualityComparer.cs (4)
75Debug.Assert(bytes != null, "Byte array cannot be null"); 86Debug.Assert(first != null && second != null, "Arguments cannot be null"); 115Debug.Assert(comparer != null, "Non-ByValue comparer cannot be null"); 128Debug.Assert(!((object.ReferenceEquals(x, DBNull.Value)) && (object.ReferenceEquals(y,DBNull.Value))), "object.ReferenceEquals should catch the case when both values are dbnull");
System\Data\Common\Utils\CommandHelper.cs (9)
47Debug.Assert(null != commandText); 77Debug.Assert(null != entityCommand); 102Debug.Assert(null != entityCommand); 103Debug.Assert(null != storeProviderCommand); 122Debug.Assert(null != entityCommand); 123Debug.Assert(null != storeProviderCommand); 124Debug.Assert(null != connection); 160Debug.Assert(Helper.IsGeometricType(parameterType)); 168Debug.Assert(null != workspace && null != containerName && null != functionImportName);
System\Data\Common\Utils\DisposableCollectionWrapper.cs (1)
20Debug.Assert(enumerable != null, "don't pass in a null enumerable");
System\Data\Common\Utils\Helpers.cs (2)
71Debug.Assert(args != null, "Ensure 'args' is non-null before calling Prepend"); 97Debug.Assert(nodes.Count > 0, "At least one node is required");
System\Data\Common\Utils\KeyToListMap.cs (2)
29Debug.Assert(null != comparer); 98Debug.Assert(m_map.ContainsKey(key), "key not registered in map");
System\Data\Common\Utils\Memoizer.cs (1)
116Debug.Assert(null != createValueDelegate, "delegate must be given");
System\Data\Common\Utils\MetadataHelper.cs (24)
152Debug.Fail("unrecognized mode " + mode.ToString()); 166Debug.Assert(null != workspace); 221Debug.Assert(null != end); 222Debug.Assert(end.TypeUsage.EdmType.BuiltInTypeKind == BuiltInTypeKind.RefType, 226Debug.Assert(endType.BuiltInTypeKind == BuiltInTypeKind.EntityType, 243Debug.Assert(members.Count == 2, "only expecting two end members"); 248Debug.Assert(Object.ReferenceEquals(endMember, members[1]), "didn't match other member"); 275Debug.Assert(null != toEnd); 276Debug.Assert(null != type); 288Debug.Assert(null != end); 299Debug.Assert(function != null); 314Debug.Assert(member != null); 315Debug.Assert(Helper.IsEdmProperty(member) || Helper.IsAssociationEndMember(member)); 328Debug.Assert(table.EntityContainer.GetDataSpace() == DataSpace.SSpace); 446Debug.Assert(parentType != null, "Parent type not Entity Type ??"); 494Debug.Assert(!references.Contains(b), "Dictionary already has a --> b reference"); 593Debug.Assert(entitySet1 != null); 594Debug.Assert(entitySet2 != null); 595Debug.Assert(entitySet1.EntityContainer == entitySet2.EntityContainer, "EntityContainer must be the same for both the entity sets"); 620Debug.Assert(associationType.Members.Contains(endName), "EndName should be a valid name"); 634Debug.Assert(retValue == null, "There should be only one AssociationSet, given an assocationtype, end name and entity set"); 651Debug.Assert(entitySet != null); 688Debug.Assert(null != typeUsage && null != typeUsage.EdmType && typeUsage.EdmType.BuiltInTypeKind == BuiltInTypeKind.PrimitiveType); 907Debug.Assert(sourceEntityType.DataSpace == DataSpace.OSpace && sourceEntityType.ClrType != null, "sourceEntityType must contain an ospace type");
System\Data\Common\Utils\ModifiableIteratorCollection.cs (3)
58Debug.Assert(false == IsEmpty, "Empty set - cannot remove any element"); 76Debug.Assert(m_currentIteratorIndex >= 0, "Iterator not started yet"); 113Debug.Assert(index < m_elements.Count, "Removing an entry with too high an index");
System\Data\Common\Utils\Set.cs (5)
306Debug.Assert(!_isReadOnly, "attempting to modify readonly collection"); 312Debug.Assert(other != null, "other set null"); 313Debug.Assert(other.Comparer.GetType().Equals(this.Comparer.GetType())); 370Debug.Assert(null != x && null != y, "comparer must be used only in context of Dictionary/HashSet"); 376Debug.Assert(null != obj, "comparer must be used only in context of Dictionary/HashSet");
System\Data\Common\Utils\StringUtil.cs (2)
206Debug.Assert(args.Length > 0, "Formatting utilities must be called with at least one argument"); 213Debug.Assert(args.Length > 0, "Formatting utilities must be called with at least one argument");
System\Data\EntityClient\DbConnectionOptions.cs (1)
480Debug.Assert(null != connectionString, "null connectionstring");
System\Data\EntityClient\DbParameterCollectionHelper.cs (2)
222Debug.Assert((null != items) && (0 <= index) && (index < Count), "RemoveIndex, invalid"); 230Debug.Assert((null != items) && (0 <= index) && (index < Count), "Replace Index invalid");
System\Data\EntityClient\EntityAdapter.cs (1)
132Debug.Assert(null != entityCache);
System\Data\EntityClient\EntityCommand.cs (7)
555Debug.Assert(null != _commandDefinition, "_commandDefinition cannot be null"); 564Debug.Assert(this._connection != null); 624Debug.Assert(CommandType.StoredProcedure == this.CommandType); 698Debug.Assert(null != _connection, "Connection must not be null at this point"); 718Debug.Assert(null != queryCacheManager,"QuerycacheManager instance cannot be null"); 736Debug.Assert(null != entityCommandDefinition, "out entityCommandDefinition must not be null"); 810Debug.Assert(null != _parameters, "_parameters must not be null");
System\Data\EntityClient\EntityCommandDefinition.cs (9)
76Debug.Assert(mappedCommandList.Count > 0, "empty providerCommandInfo collection and no exception?"); // this shouldn't ever happen. 91Debug.Assert(DbCommandTreeKind.Function == commandTree.CommandTreeKind, "only query and function command trees are supported"); 192Debug.Assert(storeResultType.EdmType.BuiltInTypeKind == BuiltInTypeKind.CollectionType, "FunctionImport currently supports only collection result type"); 194Debug.Assert(Helper.IsScalarType(elementType.EdmType) 226Debug.Assert(null != complexType, "we should have a complex type here"); 243Debug.Assert(functionCommandTree.DataSpace == DataSpace.CSpace, "map from CSpace->SSpace function"); 244Debug.Assert(functionCommandTree != null, "null functionCommandTree"); 245Debug.Assert(!functionCommandTree.EdmFunction.IsComposableAttribute, "functionCommandTree.EdmFunction must be non-composable."); 329Debug.Assert(TypeSemantics.IsScalarType(queryParameter.Value), "Non-scalar type used as query parameter type");
System\Data\EntityClient\EntityConnection.cs (7)
150Debug.Assert(_storeConnection != null); 155Debug.Fail("Provider Invariant Name not found"); 278Debug.Assert(this.StoreConnection != null); 409Debug.Assert(_metadataWorkspace != null || _effectiveConnectionOptions != null, "The effective connection options is null, which should never be"); 755Debug.Assert(transaction != null || !EnlistedInUserTransaction, 969Debug.Assert(workspace.IsItemCollectionAlreadyRegistered(DataSpace.CSpace), "C-Space must be loaded before loading S or C-S space"); 1128System.Diagnostics.Debug.Assert(
System\Data\EntityClient\EntityDataReader.cs (3)
43Debug.Assert(command != null && storeDataReader != null); 172Debug.Assert(this._command.Connection != null); 508Debug.Assert(this.FieldCount == 0, "we have fields but no metadata?");
System\Data\EntityClient\EntityParameter.cs (2)
458Debug.Assert(typeUsage != null, "DbType.TryGetModelTypeUsage returned true for null TypeUsage?"); 508Debug.Assert(false, "The provided edmType is of an unknown primitive type.");
System\Data\EntityClient\EntityProviderServices.cs (2)
45Debug.Assert(commandTree != null, "Command Tree cannot be null"); 56Debug.Assert(commandTree != null, "Ensure command tree is non-null before calling ValidateDataSpace");
System\Data\EntityClient\EntityTransaction.cs (1)
35Debug.Assert(connection != null && storeTransaction != null);
System\Data\EntityClient\NameValuePair.cs (1)
22System.Diagnostics.Debug.Assert(!string.IsNullOrEmpty(name), "empty keyname");
System\Data\EntityKey.cs (43)
159Debug.Assert(entitySet != null, "entitySet is null"); 160Debug.Assert(entitySet.Name != null, "entitySet.Name is null"); 161Debug.Assert(entitySet.EntityContainer != null, "entitySet.EntityContainer is null"); 162Debug.Assert(entitySet.EntityContainer.Name != null, "entitySet.EntityContainer.Name is null"); 163Debug.Assert(record != null, "record is null"); 192Debug.Assert(entitySet.EntityContainer != null, "EntitySet.EntityContainer cannot be null."); 210Debug.Assert(entitySet != null, "EntitySet cannot be null."); 211Debug.Assert(entitySet.EntityContainer != null, "EntitySet.EntityContainer cannot be null."); 212Debug.Assert(singletonKeyValue != null, "Singleton key value cannot be null."); 230Debug.Assert(entitySet != null, "EntitySet cannot be null."); 231Debug.Assert(entitySet.EntityContainer != null, "EntitySet.EntityContainer cannot be null."); 232Debug.Assert(compositeKeyValues != null, "Composite key values cannot be null."); 708Debug.Assert(!IsTemporary, "GetKeyValueExpressions doesn't make sense for temporary keys - they have no values."); 709Debug.Assert(entitySet != null, "GetEntitySet should not return null."); 710Debug.Assert(entitySet.Name == _entitySetName, "EntitySet returned from GetEntitySet has incorrect name."); 744Debug.Assert(singletonKeyMember != null, "Metadata for singleton key member shouldn't be null."); 755Debug.Assert(_compositeKeyValues[i] != null, "Values within key-value pairs cannot be null."); 758Debug.Assert(keyMember != null, "Metadata for key members shouldn't be null."); 792Debug.Assert(!IsTemporary, "FindValueByName should not be called for temporary keys."); 795Debug.Assert(_keyNames[0] == keyName, "For a singleton key, the given keyName must match."); 913Debug.Assert(null == keyNames[i], "shouldn't have a name yet"); 946Debug.Assert(entityType != null, "Data record must be an entity."); 949Debug.Assert(entitySet != null && entitySet.ElementType.IsAssignableFrom(entityType), "Entity types do not match"); 950Debug.Assert(numExpectedKeyValues > 0, "Should be expecting a positive number of key-values."); 1094Debug.Assert(workspace != null, "workspace != null"); 1095Debug.Assert(keyMember != null, "keyMember != null"); 1096Debug.Assert(keyValue != null, "keyValue != null"); 1097Debug.Assert(Helper.IsScalarType(keyMember.TypeUsage.EdmType), "key member must be of a scalar type"); 1118Debug.Assert(Helper.IsEnumType(keyMember.TypeUsage.EdmType), "Enum type expected"); 1160Debug.Assert(!isTemporary, "Singleton keys should not be expected to be temporary."); 1161Debug.Assert(_compositeKeyValues == null, "The EntityKey is marked as both a singleton key and a composite key - this is illegal."); 1164Debug.Assert(entitySet.ElementType.KeyMembers.Count == 1, "For a singleton key, the number of key fields must be exactly 1."); 1169Debug.Assert(!isTemporary, "Composite keys should not be expected to be temporary."); 1172Debug.Assert(entitySet.ElementType.KeyMembers.Count > 1, "For a composite key, the number of key fields should be greater than 1."); 1173Debug.Assert(entitySet.ElementType.KeyMembers.Count == _compositeKeyValues.Length, "Incorrect number of values specified to composite key."); 1177Debug.Assert(_compositeKeyValues[i] != null, "Values passed to a composite EntityKey cannot be null."); 1183Debug.Assert(!isTemporary, "Static keys should not be expected to be temporary."); 1184Debug.Assert(this.EntityKeyValues == null, "The EntityKeyValues property for Static EntityKeys must return null."); 1185Debug.Assert(this.EntityContainerName == null, "The EntityContainerName property for Static EntityKeys must return null."); 1186Debug.Assert(this.EntitySetName != null, "The EntitySetName property for Static EntityKeys must not return null."); 1190Debug.Assert(isTemporary, "The EntityKey is marked as neither a singleton or composite. Therefore, it should be expected to be temporary."); 1191Debug.Assert(this.IsTemporary, "The EntityKey is marked as neither a singleton or composite. Therefore it must be marked as temporary."); 1192Debug.Assert(this.EntityKeyValues == null, "The EntityKeyValues property for temporary EntityKeys must return null.");
System\Data\EntityModel\SchemaObjectModel\CollectionTypeElement.cs (6)
62Debug.Assert(reader != null); 103Debug.Assert(reader != null); 112Debug.Assert(reader != null); 121Debug.Assert(reader != null); 130Debug.Assert(reader != null); 174Debug.Assert(_typeSubElement != null, "For attributes typeusage should have been resolved");
System\Data\EntityModel\SchemaObjectModel\EntityContainer.cs (7)
184Debug.Assert(reader != null); 192Debug.Assert(reader != null); 200Debug.Assert(null != reader); 346Debug.Assert(error != AddErrorKind.MissingNameError, "Since entity container members are already resolved, name must never be empty"); 347Debug.Assert(this.ExtendingEntityContainer != null, "ExtendingEntityContainer must not be null"); 351Debug.Assert(error == AddErrorKind.DuplicateNameError, "Error must be duplicate name error"); 550Debug.Assert(left.ParentElement.ParentElement == right.ParentElement.ParentElement, "both end should belong to the same entity container");
System\Data\EntityModel\SchemaObjectModel\EntityContainerAssociationSet.cs (4)
92Debug.Assert( reader != null ); 120Debug.Assert( 157Debug.Assert( relationshipEnd != null ); 158Debug.Assert( !_relationshipEnds.ContainsKey( relationshipEnd.Name ) );
System\Data\EntityModel\SchemaObjectModel\EntityContainerAssociationSetEnd.cs (1)
133Debug.Assert(set != null, "set parameter is null");
System\Data\EntityModel\SchemaObjectModel\EntityContainerEntitySet.cs (6)
143Debug.Assert(reader != null); 169Debug.Assert( reader != null ); 184Debug.Assert(Schema.DataModel == SchemaDataModelOption.ProviderDataModel, "We shouldn't see this attribute unless we are parsing ssdl"); 185Debug.Assert( reader != null ); 196Debug.Assert(Schema.DataModel == SchemaDataModelOption.ProviderDataModel, "We shouldn't see this attribute unless we are parsing ssdl"); 197Debug.Assert( reader != null );
System\Data\EntityModel\SchemaObjectModel\EntityContainerRelationshipSet.cs (4)
53Debug.Assert(value != null, "relationship can never be set to null"); 68Debug.Assert( reader != null ); 164Debug.Assert( Relationship != null ); 188Debug.Assert(relationshipEnd != null, "relationshipEnd parameter is null");
System\Data\EntityModel\SchemaObjectModel\EntityKeyElement.cs (5)
83Debug.Assert(_keyProperties != null, "xsd should have verified that there should be atleast one property ref element"); 98Debug.Assert(_keyProperties != null, "xsd should have verified that there should be atleast one property ref element"); 104Debug.Assert(property != null, "This should never be null, since if we were not able to resolve, we should have never reached to this point"); 133Debug.Assert(property.TypeUsage != null, "For scalar type, typeusage must be initialized"); 149Debug.Assert(SchemaDataModelOption.ProviderDataModel == Schema.DataModel, "Invalid DataModel encountered");
System\Data\EntityModel\SchemaObjectModel\FacetDescriptionElement.cs (1)
148Debug.Assert(_facetDescription != null, "Did you forget to call CreateAndValidate first?");
System\Data\EntityModel\SchemaObjectModel\FacetEnabledSchemaElement.cs (1)
103Debug.Assert(this.Type == null, "This must be resolved exactly once");
System\Data\EntityModel\SchemaObjectModel\Function.cs (20)
73Debug.Assert(false, "Unexpected modifier: " + match.Groups["modifier"].Value); 93Debug.Assert(colKind == CollectionKind.None, "Unexpected CollectionKind"); 192Debug.Assert(value != null, "StoreFunctionName should never be set null value"); 203Debug.Assert(_returnTypeList.Count == 1, "Shouldn't use Type if there could be multiple return types"); 399Debug.Assert(Schema.DataModel != SchemaDataModelOption.ProviderManifestModel, "ProviderManifest cannot have ReturnType as an attribute"); 576Debug.Assert(error == AddErrorKind.Succeeded, "Since we are cloning a validated function, this should never fail."); 607Debug.Assert(Schema.DataModel == SchemaDataModelOption.ProviderDataModel, "We shouldn't see this attribute unless we are parsing ssdl"); 608Debug.Assert(reader != null); 619Debug.Assert(reader != null); 631Debug.Assert(reader != null); 643Debug.Assert(reader != null); 658Debug.Assert(reader != null); 670Debug.Assert(reader != null); 678Debug.Assert(reader != null); 687Debug.Assert(reader != null); 688Debug.Assert(UnresolvedReturnType == null); 706Debug.Assert(false, "RemoveTypeModifier already checks for this"); 722Debug.Assert(reader != null); 737Debug.Assert(reader != null); 756Debug.Assert(reader != null);
System\Data\EntityModel\SchemaObjectModel\FunctionImportElement.cs (5)
115Debug.Assert(IsFunctionImport, "Only FunctionImport elkements specify EntitySets"); 116Debug.Assert(null != _container, "function imports must know container"); 142Debug.Assert(returnType.Type != null, "FunctionImport/ReturnType element must not have subelements."); 272Debug.Assert(returnType == null || returnType is ScalarType || returnType is SchemaEnumType || returnType is Relationship, 300Debug.Assert(
System\Data\EntityModel\SchemaObjectModel\ItemType.cs (1)
143System.Diagnostics.Debug.Assert(BaseType is SchemaEntityType, "ItemType.BaseType is not ItemType");
System\Data\EntityModel\SchemaObjectModel\KeyProperty.cs (1)
56Debug.Assert(false, "This method should never be used. Use other overload instead");
System\Data\EntityModel\SchemaObjectModel\ModelFunction.cs (2)
137Debug.Assert(ReturnTypeList.Count == 1, "returnTypeList should always be non-empty. Multiple ReturnTypes are only possible on FunctionImports."); 145Debug.Assert(reader != null);
System\Data\EntityModel\SchemaObjectModel\NavigationProperty.cs (2)
160System.Diagnostics.Debug.Assert(_fromEnd != null && _toEnd != null, 196Debug.Assert(_unresolvedRelationshipName == null, string.Format(CultureInfo.CurrentCulture, "{0} is already defined", reader.Name));
System\Data\EntityModel\SchemaObjectModel\OnOperation.cs (1)
101Debug.Assert(reader != null);
System\Data\EntityModel\SchemaObjectModel\Parameter.cs (10)
183Debug.Assert(reader != null); 184Debug.Assert(UnresolvedType == null); 200Debug.Assert(typeModifier == TypeModifier.None, string.Format(CultureInfo.CurrentCulture, "Type is not valid for property {0}: {1}. The modifier for the type cannot be used in this context.", FQName, reader.Value)); 212Debug.Assert(reader != null); 314Debug.Assert(reader != null); 323Debug.Assert(reader != null); 332Debug.Assert(reader != null); 341Debug.Assert(reader != null); 373Debug.Assert(Schema.DataModel == SchemaDataModelOption.ProviderDataModel || 379Debug.Assert(_typeSubElement == null, "Unexpected type subelement inside <Parameter> element.");
System\Data\EntityModel\SchemaObjectModel\ReferenceSchema.cs (2)
132Debug.Assert(String.IsNullOrEmpty(NamespaceName), "Alias must be set only once"); 144Debug.Assert(String.IsNullOrEmpty(Alias), "Alias must be set only once");
System\Data\EntityModel\SchemaObjectModel\ReferenceTypeElement.cs (4)
51Debug.Assert(reader != null); 65Debug.Assert(UnresolvedType != null && !UnresolvedType.Trim().Equals(String.Empty)); 78Debug.Assert(!(_type is ScalarType)); 83Debug.Assert(entityType != null);
System\Data\EntityModel\SchemaObjectModel\ReferentialConstraint.cs (2)
78Debug.Assert(_principalRole.RoleProperties.Count != 0, "There should be some ref properties in Principal Role"); 79Debug.Assert(_dependentRole.RoleProperties.Count != 0, "There should be some ref properties in Dependent Role");
System\Data\EntityModel\SchemaObjectModel\ReferentialConstraintRoleElement.cs (2)
104Debug.Assert(!String.IsNullOrEmpty(this.Name), "RoleName should never be empty"); 131Debug.Assert(_roleProperties != null, "xsd should have verified that there should be atleast one property ref element in referential role element");
System\Data\EntityModel\SchemaObjectModel\Relationship.cs (2)
189Debug.Assert(reader != null); 208Debug.Assert(reader != null);
System\Data\EntityModel\SchemaObjectModel\RelationshipEnd.cs (3)
197Debug.Assert(reader != null); 212Debug.Assert(reader != null); 237Debug.Assert(reader != null);
System\Data\EntityModel\SchemaObjectModel\RelationshipEndCollection.cs (7)
51Debug.Assert(end != null, "end parameter is null"); 54Debug.Assert(endElement != null, "end is not a SchemaElement"); 102Debug.Assert(end != null, "end parameter is null"); 130Debug.Assert(end != null, "end parameter is null"); 254Debug.Assert(ends.Length-index >= Count); 275Debug.Assert(data != null); 276Debug.Assert(keysInDefOrder != null);
System\Data\EntityModel\SchemaObjectModel\ReturnType.cs (16)
143Debug.Assert(_typeSubElement != null, "Nested type expected."); 155Debug.Assert(reader != null); 156Debug.Assert(UnresolvedType == null); 171Debug.Assert(typeModifier == TypeModifier.None, string.Format(CultureInfo.CurrentCulture, "Type is not valid for property {0}: {1}. The modifier for the type cannot be used in this context.", FQName, reader.Value)); 183Debug.Assert(reader != null); 193Debug.Assert(reader != null); 234Debug.Assert(reader != null); 243Debug.Assert(reader != null); 252Debug.Assert(reader != null); 261Debug.Assert(reader != null); 281Debug.Assert(!this.ParentElement.IsFunctionImport, "FunctionImports can't have sub elements in their return types, so we should NEVER see them here"); 304Debug.Assert(Schema.DataModel == SchemaDataModelOption.ProviderDataModel || 330Debug.Assert(Schema.DataModel == SchemaDataModelOption.ProviderDataModel, "Unexpected data model"); 362Debug.Assert(collection != null, "Can't find <CollectionType> inside TVF <ReturnType> element"); 366Debug.Assert(row != null, "Can't find <RowType> inside TVF <ReturnType><CollectionType> element"); 401Debug.Fail("This method was not called from anywhere in the code before. If you got here you need to update this method and possibly ResolveNestedTypeNames()");
System\Data\EntityModel\SchemaObjectModel\RowTypeElement.cs (2)
48Debug.Assert(reader != null); 112Debug.Assert(Schema.DataModel == SchemaDataModelOption.ProviderDataModel, "Only DataModel == SchemaDataModelOption.ProviderDataModel is expected");
System\Data\EntityModel\SchemaObjectModel\RowTypePropertyElement.cs (8)
64Debug.Assert(reader != null); 79Debug.Assert(typeModifier == TypeModifier.None, string.Format(CultureInfo.CurrentCulture, "Type is not valid for property {0}: {1}. The modifier for the type cannot be used in this context.", FQName, reader.Value)); 117Debug.Assert(reader != null); 126Debug.Assert(reader != null); 135Debug.Assert(reader != null); 144Debug.Assert(reader != null); 184Debug.Assert(_typeSubElement != null, "For attributes typeusage should have been resolved"); 216Debug.Assert(entityType != null);
System\Data\EntityModel\SchemaObjectModel\Schema.cs (31)
65Debug.Assert(schemaManager != null, "SchemaManager parameter should never be null"); 133Debug.Assert(sourceReader != null, "sourceReader parameter is null"); 192Debug.Assert(this.SchemaXmlNamespace == XmlConstants.ModelNamespace_3, "Unknown namespace in CSDL"); 208Debug.Assert(this.SchemaXmlNamespace == XmlConstants.TargetNamespace_3, "Unknown namespace in SSDL"); 302Debug.Assert(e != null); 317Debug.Assert(this.SchemaVersion >= XmlConstants.EdmVersionForV2 || SchemaVersion == XmlConstants.UndefinedVersion, "Have you added a new Edm Version?"); 698Debug.Assert(DataModel == SchemaDataModelOption.ProviderManifestModel, "Did you add a new option?"); 740Debug.Assert(_depth > 0); 824Debug.Assert(usingElement != null); 825Debug.Assert(typeName != null); 878Debug.Assert(type.Namespace != this.Namespace, "Using element is not allowed in the schema of ssdl and provider manifest"); 937Debug.Assert(reader != null); 953Debug.Assert(reader != null); 965Debug.Assert(reader != null); 978Debug.Assert(reader != null); 987Debug.Assert(reader != null); 1013Debug.Assert(reader != null); 1027Debug.Assert(reader != null); 1047Debug.Assert(reader != null); 1062Debug.Assert(reader != null); 1077Debug.Assert(reader != null); 1089Debug.Assert(reader != null); 1104Debug.Assert(reader != null); 1118Debug.Assert(reader != null); 1133Debug.Assert(reader != null); 1178Debug.Assert(error != AddErrorKind.MissingNameError, "Function identity can never be null while adding global functions"); 1223Debug.Assert(dataModel == SchemaDataModelOption.ProviderManifestModel, "Unknown SchemaDataModelOption did you add one?"); 1237Debug.Assert(namespaceNames.Count > 0, "Unknown Datamodel"); 1247Debug.Assert(schemaResourceMap.ContainsKey(namespaceName), "the namespace name is not one we have a schema set for"); 1276Debug.Assert(resourceName != null, "resourceName cannot be null"); 1285Debug.Assert(resourceStream != null, string.Format(CultureInfo.CurrentCulture, "Unable to load the resource {0} from assembly resources.", resourceName));
System\Data\EntityModel\SchemaObjectModel\SchemaElement.cs (9)
241Debug.Assert(reader.NodeType == XmlNodeType.Element); 415Debug.Assert(string.IsNullOrEmpty(field), string.Format(CultureInfo.CurrentCulture, "{0} is already defined", reader.Name)); 434Debug.Assert(string.IsNullOrEmpty(field), string.Format(CultureInfo.CurrentCulture, "{0} is already defined", reader.Name)); 497Debug.Assert(reader != null); 635Debug.Assert(reader.NamespaceURI != null); 674Debug.Assert( 682Debug.Assert( 706Debug.Assert(reader.NodeType == XmlNodeType.Attribute, "called an attribute function when not on an attribute"); 801Debug.Assert(reader.SchemaInfo == null ||
System\Data\EntityModel\SchemaObjectModel\SchemaElementLookUpTable.cs (5)
124Debug.Assert(type != null, "type parameter is null"); 146Debug.Assert(type != null, "type parameter is null"); 147Debug.Assert(null != duplicateKeyErrorFormat, "duplicateKeyErrorFormat cannot be null"); 167Debug.Assert(error == AddErrorKind.Succeeded, "Invalid error encountered"); 194Debug.Assert(!String.IsNullOrEmpty(unnormalizedKey), "unnormalizedKey parameter is null or empty");
System\Data\EntityModel\SchemaObjectModel\SchemaElementLookUpTableEnumerator.cs (2)
38Debug.Assert(data != null, "data parameter is null"); 39Debug.Assert(keysInOrder != null, "keysInOrder parameter is null");
System\Data\EntityModel\SchemaObjectModel\SchemaEnumMember.cs (3)
49Debug.Assert(value != null, "value != null"); 62Debug.Assert(reader != null, "reader != null"); 79Debug.Assert(reader != null, "reader != null");
System\Data\EntityModel\SchemaObjectModel\SchemaEnumType.cs (6)
73Debug.Assert(_underlyingType != null, "The type has not been resolved yet"); 96Debug.Assert(reader != null, "reader != null"); 132Debug.Assert(reader != null, "reader != null"); 159Debug.Assert(reader != null, "reader != null"); 207Debug.Assert(_unresolvedUnderlyingTypeName != string.Empty); 229Debug.Assert(!_enumMembers.Any(m => !m.Value.HasValue), "member values should have been fixed up already.");
System\Data\EntityModel\SchemaObjectModel\SchemaLookupTable.cs (3)
50Debug.Assert(usingElement != null, "usingElement parameter is null"); 90Debug.Assert(!String.IsNullOrEmpty(alias), "alias must never be null"); 124Debug.Assert(_definingSchema.ProviderManifest != null, "Since we don't allow using elements in provider manifest, provider manifest can never be null");
System\Data\EntityModel\SchemaObjectModel\SchemaManager.cs (3)
87Debug.Assert(errors.Count != 0, "There must be some error encountered"); 166Debug.Assert(schemaCollection.All(s => s.SchemaVersion == currentSchemaVersion || s.SchemaVersion != XmlConstants.UndefinedVersion)); 297Debug.Assert(schema.DataModel == _dataModel, "DataModel must match");
System\Data\EntityModel\SchemaObjectModel\StructuredProperty.cs (3)
154Debug.Assert(Type is SchemaEnumType); 212Debug.Assert(Schema.SchemaVersion != XmlConstants.EdmVersionForV1, 299Debug.Fail("Xsd should have changed", "XSD validation should have ensured that" +
System\Data\EntityModel\SchemaObjectModel\StructuredType.cs (5)
92Debug.Assert((BaseType == null && _unresolvedBaseType == null) || 210Debug.Assert(newMember != null, "newMember parameter is null"); 246Debug.Assert(definingMember == null, "we allow the scenario that members can have same name but different cases"); 371Debug.Assert(UnresolvedBaseType == null, string.Format(CultureInfo.CurrentCulture, "{0} is already defined", reader.Name)); 410Debug.Assert(baseType != null);
System\Data\EntityModel\SchemaObjectModel\TypeElement.cs (8)
108Debug.Assert(reader != null); 121Debug.Assert(reader != null); 133Debug.Assert(reader != null); 145Debug.Assert(reader != null); 157Debug.Assert(reader != null); 169Debug.Assert(reader != null); 181Debug.Assert(reader != null); 195Debug.Assert(reader != null);
System\Data\EntityModel\SchemaObjectModel\TypeRefElement.cs (3)
52Debug.Assert(reader != null); 87Debug.Assert(UnresolvedType != null && !UnresolvedType.Trim().Equals(String.Empty)); 93Debug.Assert(_typeUsage != null);
System\Data\EntityModel\SchemaObjectModel\TypeUsageBuilder.cs (8)
266Debug.Fail("Did you miss a value"); 374Debug.Assert(primitiveType.PrimitiveTypeKind == PrimitiveTypeKind.Decimal, "Expected decimal type"); 431Debug.Assert( (primitiveType.PrimitiveTypeKind == PrimitiveTypeKind.DateTime) ||(primitiveType.PrimitiveTypeKind == PrimitiveTypeKind.DateTimeOffset)||(primitiveType.PrimitiveTypeKind == PrimitiveTypeKind.Time)) ; 464Debug.Assert(primitiveType.PrimitiveTypeKind == PrimitiveTypeKind.Binary || 495Debug.Assert(Helper.IsSpatialType(primitiveType), "Expected spatial type"); 536Debug.Assert(reader.LocalName == EdmProviderManifest.MaxLengthFacetName); 556Debug.Assert(reader.LocalName == EdmProviderManifest.SridFacetName); 700Debug.Assert(_default != null);
System\Data\EntityModel\SchemaObjectModel\Utils.cs (18)
48Debug.Assert(!string.IsNullOrEmpty(qualifiedTypeName), "qualifiedTypeName parameter is null"); 55Debug.Assert(!string.IsNullOrEmpty(qualifiedTypeName), "qualifiedTypeName parameter is null or empty"); 100Debug.Assert(schema != null, "schema parameter is null"); 101Debug.Assert(reader != null, "reader parameter is null"); 140Debug.Assert(schema != null, "schema parameter is null"); 141Debug.Assert(reader != null, "reader parameter is null"); 142Debug.Assert(!string.IsNullOrEmpty(name), "name parameter is null or empty"); 143Debug.Assert(reader.SchemaInfo.Validity != System.Xml.Schema.XmlSchemaValidity.Invalid, "This method should not be called when the schema is invalid"); 170Debug.Assert(schema != null, "schema parameter is null"); 171Debug.Assert(reader != null, "reader parameter is null"); 196Debug.Assert(!(schema.DataModel == SchemaDataModelOption.EntityDataModel && name.IndexOf('.') >= 0), 231Debug.Assert(schema != null, "schema parameter is null"); 232Debug.Assert(reader != null, "reader parameter is null"); 249Debug.Assert(reader.SchemaInfo.Validity == Xml.Schema.XmlSchemaValidity.NotKnown, "The schema validity must be NotKnown at this point"); 260Debug.Assert(schema != null, "schema parameter is null"); 261Debug.Assert(reader != null, "reader parameter is null"); 283Debug.Assert(schema != null, "schema parameter is null"); 284Debug.Assert(reader != null, "reader parameter is null");
System\Data\EntityModel\SchemaObjectModel\ValidationHelper.cs (5)
34Debug.Assert(element != null); 35Debug.Assert(typeUsageBuilder != null); 46Debug.Assert(!(type is SchemaEnumType), "Note that enums should have already been handled."); 74Debug.Assert(element != null); 96Debug.Assert(element != null);
System\Data\EntityModel\SchemaObjectModel\XmlSchemaResource.cs (8)
21Debug.Assert(!string.IsNullOrEmpty(namespaceUri), "namespaceUri is null or empty"); 22Debug.Assert(!string.IsNullOrEmpty(resourceName), "resourceName is null or empty"); 23Debug.Assert(importedSchemas != null, "importedSchemas is null"); 30Debug.Assert(!string.IsNullOrEmpty(namespaceUri), "namespaceUri is null or empty"); 31Debug.Assert(!string.IsNullOrEmpty(resourceName), "resourceName is null or empty"); 72Debug.Assert(XmlConstants.SchemaVersionLatest == XmlConstants.StoreVersionForV3, "Did you add a new schema version"); 99Debug.Assert(XmlConstants.SchemaVersionLatest == XmlConstants.EdmVersionForV3, "Did you add a new schema version"); 136Debug.Assert(XmlConstants.SchemaVersionLatest == XmlConstants.EdmVersionForV3, "Did you add a new schema version");
System\Data\EntitySqlException.cs (2)
203Debug.Assert(errorPosition > -1, "position in input stream cannot be < 0"); 204Debug.Assert(errorPosition <= commandText.Length, "position in input stream cannot be greater than query text size");
System\Data\Mapping\BaseMetadataMappingVisitor.cs (5)
53Debug.Fail(string.Format(CultureInfo.InvariantCulture, "Found type '{0}', did we add a new type?", entitySetBase.BuiltInTypeKind)); 206Debug.Fail(String.Format(CultureInfo.InvariantCulture, "Found type '{0}', did we add a new type?", relationshipType.BuiltInTypeKind)); 247Debug.Fail(String.Format(CultureInfo.InvariantCulture, "Found type '{0}', did we add a new type?", edmType.BuiltInTypeKind)); 326Debug.Fail(String.Format(CultureInfo.InvariantCulture, "Found type '{0}', did we add a new type?", entityTypeBase.BuiltInTypeKind)); 385Debug.Fail(String.Format(CultureInfo.InvariantCulture, "Found type '{0}', did we add a new type?", storagePropertyMapping.GetType()));
System\Data\Mapping\DefaultObjectMappingItemCollection.cs (30)
236Debug.Assert((cdmType != null) && (clrType != null)); 242Debug.Assert(typeSpace == DataSpace.CSpace || typeSpace == DataSpace.OSpace || Helper.IsRowType(edmType) || Helper.IsCollectionType(edmType)); 277Debug.Assert(clrRowType.Properties.Count == edmRowType.Properties.Count, "Property count mismatch"); 325Debug.Assert((null != clrType), "null converted clr type"); 360Debug.Assert((null != cdmType), "null converted clr type"); 375Debug.Assert(ospaceType != null, "all primitive type must have been loaded"); 449Debug.Assert((edmType != null) && (objectType != null)); 450Debug.Assert((edmType.BuiltInTypeKind == objectType.BuiltInTypeKind), "The BuiltInTypeKind must be same in LoadObjectMapping"); 476Debug.Assert(Helper.IsAssociationType(edmType)); 505Debug.Assert(edmMember.DeclaringType.DataSpace == DataSpace.CSpace, "the cspace member is not on a cspace type"); 506Debug.Assert(objectMember.DeclaringType.DataSpace == DataSpace.OSpace, "the ospace member is not on a cspace type"); 541Debug.Assert( 588Debug.Assert( 591Debug.Assert( 609Debug.Assert(edmType.BuiltInTypeKind == BuiltInTypeKind.EntityType || 612Debug.Assert((edmType.BuiltInTypeKind == objectType.BuiltInTypeKind), "The BuiltInTypeKind must be same in LoadEntityTypeOrComplexTypeMapping"); 648Debug.Assert(edmMember.BuiltInTypeKind == BuiltInTypeKind.NavigationProperty, "Unexpected Property type encountered"); 663Debug.Assert(cdmStructuralType.BuiltInTypeKind == objectStructuralType.BuiltInTypeKind, "the types must be the same"); 691Debug.Assert(edmEnumType != null, "edmEnumType != null"); 692Debug.Assert(Helper.IsPrimitiveType(edmEnumType.UnderlyingType)); 693Debug.Assert(Helper.IsSupportedEnumUnderlyingType(edmEnumType.UnderlyingType.PrimitiveTypeKind)); 695Debug.Assert(objectEnumType != null, "objectEnumType != null"); 696Debug.Assert(Helper.IsPrimitiveType(objectEnumType.UnderlyingType)); 697Debug.Assert(Helper.IsSupportedEnumUnderlyingType(objectEnumType.UnderlyingType.PrimitiveTypeKind)); 751Debug.Assert(edmType.BuiltInTypeKind == BuiltInTypeKind.AssociationType, "Expected Type Encountered in LoadAssociationTypeMapping"); 752Debug.Assert((edmType.BuiltInTypeKind == objectType.BuiltInTypeKind), "The BuiltInTypeKind must be same in LoadAssociationTypeMapping"); 769Debug.Assert(edmEnd.TypeUsage.EdmType.BuiltInTypeKind == BuiltInTypeKind.RefType, "Ends must be of Ref type"); 793Debug.Assert(containingEdmMember.TypeUsage.EdmType.BuiltInTypeKind == BuiltInTypeKind.ComplexType, "edm member declaringType must be of complexType"); 794Debug.Assert(containingClrMember.TypeUsage.EdmType.BuiltInTypeKind == BuiltInTypeKind.ComplexType, "clr member declaringType must be of complexType"); 834Debug.Assert(cspaceItem.DataSpace == DataSpace.CSpace, "ContainsMap: It must be a CSpace item");
System\Data\Mapping\FunctionImportMapping.cs (4)
173Debug.Assert(structuralTypeMappings.First() is FunctionImportComplexTypeMapping, "only two types can have renames, complexType and entityType"); 176Debug.Assert(complexTypeMappings.Count() == 1, "how come there are more than 1, complex type cannot derive from other complex type"); 525Debug.Assert(columnConditions.Count == parent.DiscriminatorColumns.Count, 527Debug.Assert(impliedEntityTypes.Count == parent.MappedEntityTypes.Count,
System\Data\Mapping\FunctionImportMapping.ReturnTypeRenameMapping.cs (2)
214Debug.Assert(type is StructuralType, "we can only rename structural type"); 271Debug.Assert(null != lowestParent, "We should have the lowest parent");
System\Data\Mapping\FunctionImportMappingComposable.cs (36)
41Debug.Assert(functionImport.IsComposableAttribute, "functionImport.IsComposableAttribute"); 42Debug.Assert(targetFunction.IsComposableAttribute, "targetFunction.IsComposableAttribute"); 43Debug.Assert(functionImport.EntitySet == null || structuralTypeMappings != null, "Function import returning entities must have structuralTypeMappings."); 44Debug.Assert(structuralTypeMappings == null || structuralTypeMappings.Count > 0, "Non-null structuralTypeMappings must not be empty."); 46Debug.Assert( 50Debug.Assert(functionImport.EntitySet == null || targetFunctionKeys != null, "Keys must be inferred for a function import returning entities."); 51Debug.Assert(targetFunctionKeys == null || targetFunctionKeys.Length > 0, "Keys must be null or non-empty."); 105Debug.Assert(tree != null, "tree != null"); 112Debug.Assert(rootProjectOp.Outputs.Count == 1, "rootProjectOp.Outputs.Count == 1"); 125Debug.Assert(TypeSemantics.IsPromotableTo(functionViewType, this.FunctionImport.ReturnParameter.TypeUsage), "Mapping expression result type must be promotable to the c-space function return type."); 142Debug.Assert(m_internalTreeNode != null, "m_internalTreeNode != null"); 145Debug.Assert(m_commandParameters.Length == targetIqtArguments.Count, "m_commandParameters.Length == targetIqtArguments.Count"); 162Debug.Assert(TypeSemantics.IsPromotableTo(argumentNode.Op.Type, commandParam.ResultType), "Argument type must be promotable to parameter type."); 214Debug.Assert(errors != null, "errors != null"); 220Debug.Assert(this.TargetFunction != null, "this.TargetFunction != null"); 228Debug.Assert(queryExpression == null || 235Debug.Assert(queryExpression == null || 252Debug.Assert(this.FunctionImport.Parameters.Count == m_commandParameters.Length, "this.FunctionImport.Parameters.Count == m_commandParameters.Length"); 253Debug.Assert(this.TargetFunction.Parameters.Count == m_commandParameters.Length, "this.TargetFunction.Parameters.Count == m_commandParameters.Length"); 256Debug.Assert(this.FunctionImport.Parameters.Contains(targetParameter.Name), "this.FunctionImport.Parameters.Contains(targetParameter.Name)"); 273Debug.Assert(m_structuralTypeMappings != null && m_structuralTypeMappings.Count > 0, "m_structuralTypeMappings != null && m_structuralTypeMappings.Count > 0"); 310Debug.Assert(m_structuralTypeMappings.All(m => m.Item2.Count > 0), "In multi-type mapping each type must have conditions."); 333Debug.Assert(structuralTypeMappingViews.Count == structuralTypePredicates.Count, "structuralTypeMappingViews.Count == structuralTypePredicates.Count"); 336Debug.Assert(errors.Count > 0, "errors.Count > 0"); 350Debug.Assert(discriminatorMap != null, "discriminatorMap == null after it has been created"); 361Debug.Assert(properties.Count == propertyMappings.Count, "properties.Count == propertyMappings.Count"); 366Debug.Assert(properties[i].EdmEquals(propertyMapping.EdmProperty), "properties[i].EdmEquals(propertyMapping.EdmProperty)"); 375Debug.Assert(errors.Count > 0, "errors.Count > 0"); 387Debug.Assert(conditions.Count > 0, "conditions.Count > 0"); 394Debug.Assert(condition.EdmProperty == null, "C-side conditions are not supported in function mappings."); 409Debug.Assert(mapping is StorageScalarPropertyMapping, "Complex property mapping is not supported in function imports."); 426Debug.Assert(row.ResultType.EdmType.BuiltInTypeKind == BuiltInTypeKind.RowType, "Input type is expected to be a row type."); 428Debug.Assert(rowType.Properties.Contains(column.Name), "Column name must be resolvable in the TVF result type."); 441Debug.Fail("Failed to get the result type of the function import."); 444Debug.Assert(TypeSemantics.IsCollectionType(queryExpression.ResultType), "Store function must be TVF (collection expected)."); 446Debug.Assert(TypeSemantics.IsRowType(collectionType.TypeUsage), "Store function must be TVF (collection of rows expected).");
System\Data\Mapping\FunctionImportMappingNonComposable.cs (7)
35Debug.Assert(!functionImport.IsComposableAttribute, "!functionImport.IsComposableAttribute"); 36Debug.Assert(!targetFunction.IsComposableAttribute, "!targetFunction.IsComposableAttribute"); 47Debug.Assert(functionImport.ReturnParameters.Count == structuralTypeMappingsList.Count); 71Debug.Assert(resultSetIndex >= 0, "resultSetIndex >= 0"); 74Debug.Assert(this.ResultMappings.Count == 1, "this.ResultMappings.Count == 1"); 103Debug.Assert (resultMapping != null); 186Debug.Assert(null != structuralType, "this method must be called only for entity/complextype reader function imports");
System\Data\Mapping\MetadataMappingHasherVisitor.cs (4)
42Debug.Assert(storageEntityContainerMapping != null, "storageEntityContainerMapping cannot be null!"); 45Debug.Assert(m_MappingVersion == storageEntityContainerMapping.StorageMappingItemCollection.MappingVersion, "the original version and the mapping collection version are not the same"); 773Debug.Assert(instanceIndex >= 0, "referencing index should not be less than 0"); 826Debug.Assert(storageEntityContainerMapping != null, "storageEntityContainerMapping is null!");
System\Data\Mapping\MetadataMappingHasherVisitor.HashSourceBuilder.cs (3)
75Debug.Assert(this._indent > 0, "Indent and unindent should be paired"); 112Debug.Assert(startingBufferSize > 0, "should be a non zero positive integer"); 163Debug.Assert(start == byteCount, "Did we use a different calculation for these?");
System\Data\Mapping\ObjectMemberMapping.cs (1)
30System.Diagnostics.Debug.Assert(edmMember.BuiltInTypeKind == clrMember.BuiltInTypeKind, "BuiltInTypeKind must be the same");
System\Data\Mapping\ObjectTypeMapping.cs (4)
28Debug.Assert(clrType.BuiltInTypeKind == cdmType.BuiltInTypeKind, "BuiltInTypeKind must be the same for both types"); 131Debug.Assert(memberMapping.ClrMember.Name == memberMapping.EdmMember.Name, 135Debug.Assert(!m_memberMapping.ContainsKey(memberMapping.EdmMember.Name)); 136Debug.Assert(!Type.ReferenceEquals(m_memberMapping, EmptyMemberMapping),
System\Data\Mapping\StorageComplexTypeMapping.cs (1)
128Debug.Assert(conditionMember != null);
System\Data\Mapping\StorageConditionPropertyMapping.cs (4)
63Debug.Assert((cdmMember != null) || (columnMember != null), "Both CDM and Column Members can not be specified for Condition Mapping"); 64Debug.Assert((cdmMember == null) || (columnMember == null), "Either CDM or Column Members has to be specified for Condition Mapping"); 65Debug.Assert((isNull.HasValue) || (value != null), "Both Value and IsNull can not be specified on Condition Mapping"); 66Debug.Assert(!(isNull.HasValue) || (value == null), "Either Value or IsNull has to be specified on Condition Mapping");
System\Data\Mapping\StorageEntityContainerMapping.cs (1)
432Debug.Assert(object.ReferenceEquals(this, args.ContainerMapping));
System\Data\Mapping\StorageEntitySetMapping.cs (3)
143Debug.Assert(null != modificationFunctionMapping, "modification function mapping must not be null"); 144Debug.Assert(modificationFunctionMapping.EntityType.Equals(this.Set.ElementType) || 148Debug.Assert(!existingMapping.EntityType.Equals(modificationFunctionMapping.EntityType),
System\Data\Mapping\StorageMappingFragment.cs (3)
69Debug.Assert(tableExtent != null, "Table should not be null when constructing a Mapping Fragment"); 70Debug.Assert(typeMapping != null, "TypeMapping should not be null when constructing a Mapping Fragment"); 203Debug.Assert(conditionMember != null);
System\Data\Mapping\StorageMappingItemCollection.cs (22)
230Debug.Assert(errors != null); 417Debug.Assert(2088 == (int)StorageMappingErrorCode.MappingAllQueryViewAtCompileTime, "Please change the ERRORCODE_MAPPINGALLQUERYVIEWATCOMPILETIME value as well"); 456Debug.Assert(entitySet != null, "entitySet != null"); 457Debug.Assert(entityType != null, "entityType != null"); 473Debug.Assert(entitySet != null, "entitySet != null"); 474Debug.Assert(entityType != null, "entityType != null"); 487Debug.Assert(storageTypeMapping is StorageEntityTypeMapping, "StorageEntityTypeMapping expected."); 506Debug.Assert(interestingMembers != null, "interestingMembers must never be null."); 518Debug.Assert(associationTypeMapping != null, "entityTypeMapping != null"); 519Debug.Assert(interestingMembers != null, "interestingMembers != null"); 539Debug.Assert(entityTypeMapping != null, "entityTypeMapping != null"); 540Debug.Assert(interestingMembers != null, "interestingMembers != null"); 548Debug.Assert(!(propertyMapping is StorageEndPropertyMapping), "association mapping properties should be handled elsewhere."); 550Debug.Assert(scalarPropMapping != null || 600Debug.Assert(complexMapping != null, "complexMapping != null"); 607Debug.Assert(childScalarPropertyMapping != null || 655Debug.Assert(functionMappings != null && functionMappings.UpdateFunctionMapping != null, "Expected function mapping fragment with non-null update function mapping"); 656Debug.Assert(interestingMembers != null, "interestingMembers != null"); 671Debug.Assert( 737Debug.Assert(m_memberMappings.Count == 0, "Assumption: This method is called only once, and from the constructor because m_extentMappingViews is not thread safe."); 816Debug.Assert(key.First.Equals(setMapping.Set)); 894Debug.Assert(edmItemCollection != null && storeItemCollection != null && errorCollection != null, "The parameters must not be null in CheckForDuplicateItems");
System\Data\Mapping\StorageMappingItemCollection.ViewDictionary.cs (11)
73Debug.Assert(container != null); 117Debug.Assert(extentMappingViews.Count > 0, "view should be generated at this point"); 131Debug.Assert(entityContainerMap.HasViews); 163Debug.Assert(entityContainer != null); 164Debug.Assert(entity != null); 165Debug.Assert(type != null); 175Debug.Assert(!entityContainerMap.IsEmpty, "There are no entity set maps"); 192Debug.Assert(extentMappingViews.AllValues.Count() == 1, "Viewgen should have produced only one view"); 289Debug.Assert(aSet.ElementType.ReferentialConstraints.Count == 1, "aSet.ElementType.ReferentialConstraints.Count == 1"); 386Debug.Assert(viewContainer != null, "Should be able to create the type"); 471Debug.Assert(mappingCollection != null,"Must have Mapping Collection in the Metadataworkspace");
System\Data\Mapping\StorageMappingItemLoader.cs (42)
98Debug.Assert(storageMappingItemCollection != null); 99Debug.Assert(scalarMemberMappings != null); 129Debug.Assert(m_currentNamespaceUri == StorageMslConstructs.NamespaceUriV3, "Did you add a new Namespace?"); 319Debug.Assert(nav.LocalName == StorageMslConstructs.EntityContainerMappingElement); 1253Debug.Assert(nav.LocalName == StorageMslConstructs.QueryViewElement); 1309Debug.Assert(isOfTypeEntityTypes.Count > 0 || entityTypes.Count > 0); 1310Debug.Assert(!(isOfTypeEntityTypes.Count > 0 && entityTypes.Count > 0)); 1511Debug.Assert(false, "XSD validation should ensure this"); 1596Debug.Assert(sTypeTvfElementType == null, "sTypeTvfElementType == null"); 1602Debug.Assert(functionImport.ReturnParameters.Count == 1, "functionImport.ReturnParameters.Count == 1 for a composable function import."); 1626Debug.Assert(TypeSemantics.IsScalarType(resultType), "TypeSemantics.IsScalarType(resultType)"); 1627Debug.Assert(typeMappings.Count == 0, "typeMappings.Count == 0"); 1644Debug.Fail("Composable function import must have return type."); 1646Debug.Assert(mapping != null, "mapping != null"); 1778Debug.Assert(importType != null, "Function import parameters must be primitive."); 1888Debug.Assert(entitySet == null, "entitySet == null for complex type mapping in function imports."); 2003Debug.Assert(null != columnRenameMappings, "columnRenameMappings cannot be null"); 2004Debug.Assert(null != nav, "nav cannot be null"); 2005Debug.Assert(null != currentTypes, "currentTypes cannot be null"); 2114Debug.Assert(resultType.BuiltInTypeKind == BuiltInTypeKind.ComplexType, "resultType.BuiltInTypeKind == BuiltInTypeKind.ComplexType"); 2181Debug.Fail("Function import return type is expected to be a collection of complex type."); 2202Debug.Assert(structuralTypeMappings.Count > 0, "Function import returning entities must have non-empty structuralTypeMappings."); 2218Debug.Assert(keys.Length == currentKeys.Length, "All subtypes must have the same number of keys."); 2385Debug.Assert(condition.ConditionValue == ValueCondition.IsNotNull, "Only IsNull or IsNotNull condition values are expected."); 2392Debug.Assert(cTypeColumn != null, "cTypeColumn != null"); 2393Debug.Assert(Helper.IsPrimitiveType(cTypeColumn.TypeUsage.EdmType), "S-space columns are expected to be of a primitive type."); 2395Debug.Assert(cPrimitiveType.ClrEquivalentType != null, "Scalar Types should have associated clr type"); 2396Debug.Assert(condition is FunctionImportEntityTypeMappingConditionValue, "Non-sentinel condition is expected to be of type FunctionImportEntityTypeMappingConditionValue."); 2485Debug.Assert(cTypeTvfElementType.Properties.Contains(columnName), "cTypeTvfElementType.Properties.Contains(columnName)"); 2525Debug.Assert(errorFound || 2869Debug.Assert(columnName != null, "XSD validation should have caught this"); 3013Debug.Assert(partialAttribute == "true" || partialAttribute == "false"); 3024Debug.Assert(nav.LocalName == StorageMslConstructs.ComplexTypeMappingElement); 3143Debug.Assert(endRef != null); 3165Debug.Fail("XSD validation should have ensured that End EdmProperty Maps only have Schalar properties"); 3271Debug.Assert(clrMemberType != null, "Scalar Types should have associated clr type"); 3309Debug.Assert(isNullAttribute == "true" || isNullAttribute == "false"); 3346Debug.Fail("New primitive type kind added?"); 3597Debug.Assert( 3600Debug.Assert(Helper.IsPrimitiveType(columnMember.TypeUsage.EdmType), "s-space column type must be primitive"); 3676Debug.Assert(typeUsage != null); 4446Debug.Assert(typeUsage != null, "typeUsage != null");
System\Data\Mapping\StorageModificationFunctionMapping.cs (1)
303Debug.Assert(2 == this.Members.Count, "Association bindings must always consist of the end and the key");
System\Data\Mapping\StorageScalarPropertyMapping.cs (3)
58Debug.Assert(columnMember != null); 59Debug.Assert( 62Debug.Assert(Helper.IsPrimitiveType(columnMember.TypeUsage.EdmType), "StorageScalarPropertyMapping must only map primitive types");
System\Data\Mapping\StorageSetMapping.cs (2)
232Debug.Assert(!m_typeSpecificQueryViews.ContainsKey(key), "Query View already present for the given Key"); 243Debug.Assert(m_typeSpecificQueryViews.ContainsKey(key));
System\Data\Mapping\Update\Internal\CompositeKey.cs (4)
36Debug.Assert(null != constants, "key values must be given"); 58Debug.Assert(null != other && other.KeyComponents.Length == this.KeyComponents.Length, "expected a compatible CompositeKey"); 90Debug.Assert(null != left.KeyComponents && null != right.KeyComponents, 145Debug.Assert(null != keyComponent && null != keyComponent,
System\Data\Mapping\Update\Internal\DynamicUpdateCommand.cs (3)
72Debug.Assert(op == ModificationOperator.Insert || op == ModificationOperator.Update, "only inserts and updates have setters"); 207Debug.Assert(originalTree.CommandTreeKind == DbCommandTreeKind.Insert || originalTree.CommandTreeKind == DbCommandTreeKind.Update, "Set clauses specified for a modification tree that is not an update or insert tree?"); 309Debug.Assert(!object.ReferenceEquals(this, otherCommand), "caller is supposed to ensure otherCommand is different reference");
System\Data\Mapping\Update\Internal\ExtractedStateEntry.cs (2)
30Debug.Assert(null != stateEntry, "stateEntry must not be null"); 59Debug.Fail("unexpected IEntityStateEntry.State for entity " + stateEntry.State);
System\Data\Mapping\Update\Internal\ExtractorMetadata.cs (5)
143Debug.Assert(null != (object)key, "entities must have keys, and only entity members are marked IsKeyMember by " + 164Debug.Assert(record.GetName(ordinal) == memberInformation.Member.Name, "expect record to present properties in metadata order"); 222Debug.Assert(entityEntry.State == EntityState.Added, 231Debug.Assert(keyValue != null, "keyValue should've been retrieved."); 374Debug.Assert(entityKeyOrdinal.HasValue ==
System\Data\Mapping\Update\Internal\FunctionMappingTranslator.cs (4)
67Debug.Assert(null != setMapping && null != setMapping.ModificationFunctionMappings && 150Debug.Assert(-1 != toOrdinal, "to end of relationship doesn't exist in record"); 219Debug.Fail("unexpected state"); 335Debug.Assert(2 == parameterBinding.MemberPath.Members.Count, "relationship parameter binding member " +
System\Data\Mapping\Update\Internal\FunctionUpdateCommand.cs (3)
162Debug.Assert(rowsAffectedParameter.Mode == ParameterMode.Out || rowsAffectedParameter.Mode == ParameterMode.InOut, 356Debug.Fail("unexpected entity state " + state); 363Debug.Assert(!object.ReferenceEquals(this, otherCommand), "caller should ensure other command is different");
System\Data\Mapping\Update\Internal\KeyManager.cs (6)
87Debug.Assert(PropagatorResult.NullIdentifier != owner.Identifier, "invalid operation for a " + 299Debug.Assert(null != addedEntry); 300Debug.Assert(!addedEntry.IsRelationship); 301Debug.Assert(!addedEntry.IsKeyEntry); 302Debug.Assert(addedEntry.EntityKey.IsTemporary); 465Debug.Assert(!_nodeIds.Contains(nodeId), "don't add existing node to partition");
System\Data\Mapping\Update\Internal\Propagator.cs (1)
254Debug.Assert(null != node.Projection, "CQT validates DbProjectExpression.Projection property");
System\Data\Mapping\Update\Internal\Propagator.Evaluator.cs (11)
146Debug.Assert(null != result && result.IsSimple, "Must be a simple Boolean result"); 341Debug.Assert(null != node, "node is not visited when null"); 385Debug.Assert(null != node, "node is not visited when null"); 397Debug.Assert(null != node, "node is not visited when null"); 425Debug.Assert(null != node, "node is not visited when null"); 440Debug.Assert(null != node, "node is not visited when null"); 456Debug.Assert(null != node, "node is not visited when null"); 471Debug.Assert(null != node, "node is not visited when null"); 497Debug.Assert(null != node, "node is not visited when null"); 521Debug.Fail("view generator failed to validate cast in update mapping view"); 565Debug.Assert(null != node, "node is not visited when null");
System\Data\Mapping\Update\Internal\Propagator.ExtentPlaceholderCreator.cs (1)
163Debug.Assert(null != associationSet, "Caller must verify parameters are not null");
System\Data\Mapping\Update\Internal\Propagator.JoinPropagator.cs (4)
64Debug.Assert(DbExpressionKind.LeftOuterJoin == node.ExpressionKind || DbExpressionKind.InnerJoin == node.ExpressionKind, "(Update/JoinPropagagtor/JoinEvaluator) " + 239Debug.Assert((((joinInsert | joinDelete | lojInsert | lojDelete) & 244Debug.Assert(((joinInsert ^ joinDelete) & (Ops.LeftUnknown | Ops.RightUnknown)) == Ops.Nothing && 482Debug.Assert(null != change && null != keySelectors && null != parent);
System\Data\Mapping\Update\Internal\Propagator.JoinPropagator.JoinPredicateVisitor.cs (1)
93Debug.Assert(leftKeySelectors.Count == rightKeySelectors.Count,
System\Data\Mapping\Update\Internal\PropagatorResult.cs (5)
326Debug.Assert(null != record); 366Debug.Assert(null != stateEntry); 517Debug.Assert(null != structuralType); 518Debug.Assert(null != values); 519Debug.Assert(values.Length == TypeHelpers.GetAllStructuralMembers(structuralType).Count);
System\Data\Mapping\Update\Internal\RelationshipConstraintValidator.cs (8)
77Debug.Assert(null != (object)stateEntry.EntityKey, "entity state entry must have an entity key"); 123Debug.Assert(extendedRecord != null); 125Debug.Assert(BuiltInTypeKind.EntityType == extendedRecord.DataRecordInfo.RecordType.EdmType.BuiltInTypeKind); 141Debug.Assert(associationSet.ElementType.Equals(record.DataRecordInfo.RecordType.EdmType)); 411Debug.Assert(null != other, "other must not be null"); 412Debug.Assert(this.Equals(other), "other must be another instance of the same relationship target"); 413Debug.Assert(Object.ReferenceEquals(other._equivalenceSetLinkedListNext, other), "other must not be part of an equivalence set yet"); 476Debug.Fail("use only typed Equals method");
System\Data\Mapping\Update\Internal\SourceInterpreter.cs (4)
45Debug.Assert(null != source); 46Debug.Assert(null != translator); 47Debug.Assert(null != sourceTable); 57Debug.Assert(null != source);
System\Data\Mapping\Update\Internal\TableChangeProcessor.cs (2)
95Debug.Assert(keyOrdinals[keyMemberIndex] >= 0 && keyOrdinals[keyMemberIndex] < members.Count, 124Debug.Assert(hasDelete || hasInsert, "(update/TableChangeProcessor) m_keys must not contain a value " +
System\Data\Mapping\Update\Internal\UpdateCommand.cs (3)
145Debug.Assert(2 == record.FieldCount, "non-binary relationship?"); 173Debug.Assert(!owner.StateEntry.IsRelationship, "owner must not be a relationship"); 219Debug.Assert(null != other, "comparing to null UpdateCommand");
System\Data\Mapping\Update\Internal\UpdateCommandOrderer.cs (2)
111if (constraintFound) { Debug.Fail("relationship set should have at most one constraint"); } 118Debug.Assert(constraintFound && null != target && null != source, "relationship set must have at least one constraint");
System\Data\Mapping\Update\Internal\UpdateCompiler.cs (11)
217Debug.Assert(propertyResult.IsSimple); 300Debug.Assert(originalRow != null, "Updated records should have a original row"); 302Debug.Assert(originalPropertyResult.IsSimple, "Server Gen property that is not primitive?"); 303Debug.Assert(propertyResult.IsSimple, "Server Gen property that is not primitive?"); 403Debug.Assert(null != predicate, "some predicate term must exist"); 413Debug.Assert(null != target && null != property && null != value); 428Debug.Assert(null != target && null != property); 437Debug.Assert(null != value && value.IsSimple && null != property); 438Debug.Assert(Helper.IsPrimitiveType(property.TypeUsage.EdmType), "Properties in SSpace should be primitive."); 464Debug.Assert(Nullable.GetUnderlyingType(principalValue.GetType()) == null, "Unexpected nullable type."); 498Debug.Assert(null != processor);
System\Data\Mapping\Update\Internal\UpdateTranslator.cs (14)
345Debug.Assert(null != role); 346Debug.Assert(null != property); 347Debug.Assert(BuiltInTypeKind.RefType == role.TypeUsage.EdmType.BuiltInTypeKind, 350Debug.Assert(BuiltInTypeKind.EntityType == endType.ElementType.BuiltInTypeKind, 548Debug.Assert(clrEnumType.IsEnum); 553Debug.Assert(BuiltInTypeKind.PrimitiveType == member.TypeUsage.EdmType.BuiltInTypeKind, 761Debug.Assert(null != remainder && remainder.Count() > 0, "must provide non-empty remainder"); 782Debug.Assert(null != m_providerServices, "constructor ensures either the command definition " + 784Debug.Assert(null != m_connection.StoreConnection, "EntityAdapter.Update ensures the store connection is set"); 949Debug.Assert(null != record, "every state entry must contain a record"); 1022Debug.Assert(null != extent, "must be verified by caller"); 1067Debug.Assert(null != stateEntry, "state entry must exist"); 1112Debug.Assert(null != m_changes, "(UpdateTranslator/GetChangeNodeForExtent) method called before translator initialized"); 1133Debug.Assert(null != m_functionChanges, "method called before translator initialized");
System\Data\Mapping\Update\Internal\ViewLoader.cs (2)
35Debug.Assert(null != mappingCollection, "mapping collection required"); 197Debug.Fail("unexpected extent type " + entitySetBase.BuiltInTypeKind);
System\Data\Mapping\ViewGeneration\BasicViewGenerator.cs (5)
37Debug.Assert(usedCells.Count > 0, "No used cells"); 136Debug.Assert(extent != null, "Each cell must have a right extent"); 176Debug.Assert(rootNode.OpType == CellTreeOpType.FOJ, "So far, we have FOJs only"); 350Debug.Assert(extentMap.KeyValuePairs.All(m => m.Value.Count == 1), "extentMap must map to single nodes only."); 487Debug.Assert(opTypeToIsolate == CellTreeOpType.IJ || opTypeToIsolate == CellTreeOpType.LOJ
System\Data\Mapping\ViewGeneration\CellCreator.cs (9)
195Debug.Assert(originalCell != null); 196Debug.Assert(memberToExpand != null); 280Debug.Assert(entityTypeMap != null || 300Debug.Assert(extent != null, "Extent map for a null extent or type of extentMap.Exent " + 349Debug.Assert((fragmentInfo != null), "CSMappingFragment should support Line Info"); 378Debug.Assert(scalarPropMap != null || 385Debug.Assert(scalarPropMap.ColumnProperty != null, "ColumnMember for a Scalar Property can not be null"); 450Debug.Assert(conditionMap.EdmProperty != null); 494Debug.Assert(conditionExpression != null);
System\Data\Mapping\ViewGeneration\CellTreeSimplifier.cs (13)
62Debug.Assert(rootNode.OpType == CellTreeOpType.LOJ || rootNode.OpType == CellTreeOpType.IJ || 72Debug.Assert(children.Count > 0, "OpCellTreeNode has no children?"); 194Debug.Assert(child.OpType == commonChildOpType); 238Debug.Assert(opNode.OpType != CellTreeOpType.Leaf, "Leaf type for op cell node?"); 366Debug.Assert(leaf1 != null, "Merge only possible on leaf nodes (1)"); 367Debug.Assert(leaf2 != null, "Merge only possible on leaf nodes (2)"); 435Debug.Fail("Unsupported operator"); 466Debug.Assert(g1 == null && g2 == null, "IJ does not affect g1 and g2"); 475Debug.Assert(g1 == null, "LOJ does not affect g1"); 499Debug.Assert(g1 == null, "LASJ does not affect g1"); 504Debug.Fail("Unsupported operator"); 571Debug.Assert(bools1.Count == bools2.Count); 605Debug.Fail("No other operation expected for boolean merge");
System\Data\Mapping\ViewGeneration\ConfigViewGenerator.cs (1)
160Debug.Assert(m_singlePerfOp == perfType, "Started op for different activity " + m_singlePerfOp + " -- not " + perfType);
System\Data\Mapping\ViewGeneration\CqlGeneration\AliasedSlot.cs (2)
32Debug.Assert(block != null && slot != null, "Null input to QualifiedSlot constructor"); 91Debug.Assert(blockAlias == null || m_block.CqlAlias == blockAlias, "QualifiedSlot: blockAlias mismatch");
System\Data\Mapping\ViewGeneration\CqlGeneration\BooleanProjectedSlot.cs (1)
34Debug.Assert(!(expr.AsLiteral is CellIdBoolean) ||
System\Data\Mapping\ViewGeneration\CqlGeneration\CaseCqlBlock.cs (4)
51Debug.Assert(m_caseSlotInfo.OutputMember != null, "We only construct member slots, not boolean slots."); 54Debug.Assert(Children.Count == 1, "CaseCqlBlock can have exactly one child."); 78Debug.Assert(m_caseSlotInfo.OutputMember != null, "We only construct real slots not boolean slots"); 81Debug.Assert(Children.Count == 1, "CaseCqlBlock can have exactly one child.");
System\Data\Mapping\ViewGeneration\CqlGeneration\CqlBlock.cs (8)
118Debug.Assert(this.IsProjected(slotNum), StringUtil.FormatInvariant("Slot {0} that is to be qualified with the block alias is not projected in this block", slotNum)); 125Debug.Assert(slotNum < m_slots.Count, "Slotnum too high"); 131Debug.Assert(slotNum < m_slots.Count, "Slotnum too high"); 140Debug.Assert(slotNum < m_slots.Count, "Slotnum too high"); 193Debug.Assert(this.Slots.Where(slot => slot.IsRequiredByParent).Count() == 1, "Top level projection must project only one slot."); 209Debug.Assert(m_joinTreeContext == null, "Join tree context is already set."); 267Debug.Assert(parentQualifiers != null, "parentQualifiers != null"); 268Debug.Assert(leafQualifier != null, "leafQualifier != null");
System\Data\Mapping\ViewGeneration\CqlGeneration\CqlIdentifiers.cs (1)
94Debug.Fail("Found no unique _from till MaxValue?");
System\Data\Mapping\ViewGeneration\CqlGeneration\JoinCqlBlock.cs (1)
119Debug.Fail("Unknown operator");
System\Data\Mapping\ViewGeneration\CqlGeneration\SlotInfo.cs (2)
49Debug.Assert(false == m_isRequiredByParent || m_slotValue != null, "Required slots cannot be null"); 50Debug.Assert(m_slotValue is QualifiedSlot ||
System\Data\Mapping\ViewGeneration\CqlGeneration\UnionCqlBlock.cs (2)
37Debug.Assert(this.Children.Count > 0, "UnionCqlBlock: Children collection must not be empty"); 59Debug.Assert(this.Children.Count > 0, "UnionCqlBlock: Children collection must not be empty");
System\Data\Mapping\ViewGeneration\CqlGenerator.cs (8)
113Debug.Assert(query != null, "Null CQT generated for query/update view."); 131Debug.Assert(requiredSlots.Length == TotalSlots, "Wrong number of requiredSlots"); 225Debug.Assert(thisRequiredSlots.Length == parentRequiredSlots.Length && 288Debug.Assert(isRequiredByParent, "Case result not needed by parent"); 349Debug.Assert(true == m_caseStatements.ContainsKey(caseMemberPath), "Constructing case for regular field?"); 350Debug.Assert(requiredSlots.Length == TotalSlots, "Invalid array size for populating required slots"); 409Debug.Assert(refType != null, "What other non scalars do we have? Relation end must be a reference type"); 442Debug.Assert(index != -1, "Couldn't locate " + fullMember.ToString() + " in m_projectedSlotMap");
System\Data\Mapping\ViewGeneration\DiscriminatorMap.cs (1)
198Debug.Assert(entityType.Properties.Count == constructor.Arguments.Count, "invalid new instance");
System\Data\Mapping\ViewGeneration\GeneratedView.cs (11)
44Debug.Assert(!config.GenerateEsql || !String.IsNullOrEmpty(eSQL), "eSQL must be specified"); 56Debug.Assert(discriminatorMap != null, "discriminatorMap == null after it has been created"); 105Debug.Assert(commandTree != null, "commandTree not set after parsing the view"); 148Debug.Assert(commandTree != null || !String.IsNullOrEmpty(eSQL), "commandTree or eSQL must be specified"); 190Debug.Assert(!String.IsNullOrEmpty(m_eSQL), "m_eSQL must be initialized"); 195Debug.Assert(m_commandTree != null, "m_commandTree not set after parsing the view"); 208Debug.Assert(m_extent.EntityContainer.DataSpace == DataSpace.CSpace, "Internal Tree should be asked only for query view"); 221Debug.Assert(m_internalTreeNode != null, "m_internalTreeNode != null"); 255Debug.Assert(!String.IsNullOrEmpty(eSQL), "eSQL query is not specified"); 268Debug.Assert(discriminatorMap != null, "discriminatorMap == null after it has been created"); 290Debug.Assert(commandTree != null || parserException != null, "Either commandTree or parserException is expected.");
System\Data\Mapping\ViewGeneration\QueryRewriting\FragmentQueryKB.cs (3)
117Debug.Assert(constraint.ToRole.RelationshipMultiplicity.Equals(RelationshipMultiplicity.Many) == false); 144Debug.Assert(constraint.FromRole.RelationshipMultiplicity.Equals(RelationshipMultiplicity.One)); 145Debug.Assert(constraint.ToRole.RelationshipMultiplicity.Equals(RelationshipMultiplicity.One));
System\Data\Mapping\ViewGeneration\QueryRewriting\QueryRewriter.cs (24)
79Debug.Assert(typesGenerationMode != ViewGenMode.GenerateAllViews); 99Debug.Assert(_views.Count > 0); 128Debug.Assert(_errorLog.Count > 0); 214Debug.Assert(!Helper.IsRefType(_generatedType)); 315Debug.Assert(!Helper.IsRefType(_generatedType)); 350Debug.Assert(!(isAlwaysTrue && isAlwaysFalse)); 357Debug.Assert(caseStatement.Clauses.Count == 0); 446Debug.Assert(nonConditionalAttributes.Count > 0, "Must have caught key-only case earlier"); 470Debug.Assert(nonConditionalScalarAttributes != null); 556Debug.Assert(_context.ViewTarget == ViewTarget.UpdateView || !_config.IsValidationEnabled); 604Debug.Assert(_context.ViewTarget == ViewTarget.UpdateView, "Used for update views only"); 611Debug.Assert(unionCaseRewriting != null, "No union of rewritings for case statements"); 650Debug.Fail("Can't happen if EnsureExtentIsFullyMapped succeeded"); 721Debug.Assert(fragment != null); 768Debug.Assert(entry.Value.ElseValue == null); 831Debug.Assert(toFill.Query.Attributes.Count > 0, "Query has no attributes?"); 836Debug.Assert(!found || rewriting.GetNamedQueries().All(q => q != TrueViewSurrogate.Query), 924Debug.Assert(toFill.Query.Attributes.Count == 0, "This method is used for attribute-less queries only"); 945Debug.Assert(usedViews.Count > 0); 978Debug.Assert(attributeTile != null); 1108Debug.Fail("Shouldn't happen"); 1198Debug.Fail("unexpected"); 1218Debug.Assert(view.FromVariable != null); 1228Debug.Fail("unexpected");
System\Data\Mapping\ViewGeneration\QueryRewriting\RewritingProcessor.cs (1)
266Debug.Assert(succeeded);
System\Data\Mapping\ViewGeneration\QueryRewriting\RewritingSimplifier.cs (1)
206default: Debug.Fail("unexpected"); break;
System\Data\Mapping\ViewGeneration\QueryRewriting\RewritingValidator.cs (4)
70Debug.Assert(complementSQueryTreeForCondition != null, "Rewriting for S-side query is unsatisfiable"); 106Debug.Assert(plainSQueryTreeForCondition != null, "Rewriting for S-side query is unsatisfiable"); 220Debug.Fail(String.Format(CultureInfo.InvariantCulture, "No cached rewriting for {0}={1}", column, domainValue)); 296Debug.Assert(constant is ScalarConstant || constant.IsNull() || constant is NegatedConstant, "Invalid type of constant");
System\Data\Mapping\ViewGeneration\QueryRewriting\RoleBoolean.cs (2)
45Debug.Fail("Should not be called."); 54Debug.Fail("Should not be called.");
System\Data\Mapping\ViewGeneration\QueryRewriting\Tile.cs (3)
184Debug.Assert(namedQuery != null); 219Debug.Assert(arg1 != null && arg2 != null); 237default: Debug.Fail("Unexpected binary operator"); break;
System\Data\Mapping\ViewGeneration\Structures\BoolExpression.cs (4)
100Debug.Assert(childList.Count > 0); 120Debug.Assert(childList.Count == 1); 124Debug.Fail("Unknown expression type"); 426Debug.Assert(domainMap != null, "Member domain map is not set");
System\Data\Mapping\ViewGeneration\Structures\BoolExpressionVisitors.cs (7)
136Debug.Assert(result == isChildFinal, "All children must be final or non-final"); 279Debug.Assert(kind == ExprType.Or || kind == ExprType.And); 350Debug.Assert(cqt != null, "AND must have at least one child"); 357Debug.Assert(cqt != null, "OR must have at least one child"); 509Debug.Assert(kind == ExprType.Or || kind == ExprType.And); 581Debug.Assert(m_allowAllOperators, "Term should not be called when Nots are present in the expression"); 603Debug.Assert(m_allowAllOperators, "TermVisitor should not be called when Ors are present in the expression");
System\Data\Mapping\ViewGeneration\Structures\BoolLiteral.cs (1)
193Debug.Assert(range.Count == 1, "For BoolLiterals, there should be precisely one value - true or false");
System\Data\Mapping\ViewGeneration\Structures\CaseStatement.cs (11)
103Debug.Assert(!m_simplified, "Attempt to modify a simplified case statement"); 104Debug.Assert(value != null); 119Debug.Assert(m_memberPath.Equals(((MemberProjectedSlot)m_elseValue).MemberPath), "case statement slot (ELSE) must depend only on its own slot value"); 126Debug.Assert(m_memberPath.Equals(((MemberProjectedSlot)whenThen.Value).MemberPath), "case statement slot (THEN) must depend only on its own slot value"); 232Debug.Assert(this.ElseValue != null, "CASE statement with no WHEN/THENs must have ELSE."); 284Debug.Assert(elseValue != null, "CASE statement with no WHEN/THENs must have ELSE."); 292Debug.Assert(slot is MemberProjectedSlot || slot is QualifiedSlot || slot is ConstantProjectedSlot, 320Debug.Assert(slot is MemberProjectedSlot || slot is QualifiedSlot || slot is ConstantProjectedSlot, 342Debug.Assert(typeConstructor != null && typeConstructor.ResultType.EdmType.BuiltInTypeKind == BuiltInTypeKind.EntityType, 360Debug.Assert(constantSlot != null, "WITH RELATIONSHIP clauses should be specified for type constant slots only."); 362Debug.Assert(typeConstant != null, "WITH RELATIONSHIP clauses should be there for type constants only.");
System\Data\Mapping\ViewGeneration\Structures\Cell.cs (7)
45Debug.Assert(label != null, "Cell lacks label"); 50Debug.Assert(m_sQuery.NumProjectedSlots == m_cQuery.NumProjectedSlots, 181Debug.Assert(CQuery.NumProjectedSlots == SQuery.NumProjectedSlots, 187Debug.Assert(cSlot != null, "Has cell query been normalized?"); 188Debug.Assert(sSlot != null, "Has cell query been normalized?"); 191Debug.Assert(cSlot is MemberProjectedSlot, "cSlot is expected to be MemberProjectedSlot"); 192Debug.Assert(sSlot is MemberProjectedSlot, "sSlot is expected to be MemberProjectedSlot");
System\Data\Mapping\ViewGeneration\Structures\CellIdBoolean.cs (1)
30Debug.Assert(index >= 0);
System\Data\Mapping\ViewGeneration\Structures\CellQuery.cs (20)
129Debug.Assert(extent != null, "JoinTreeRoot in cellquery must be an extent"); 173Debug.Assert(m_basicCellRelation != null, "BasicCellRelation must be created first"); 196Debug.Assert(slotNum < m_projectedSlots.Length, "Slot number too high"); 221Debug.Assert(slot != null, "All slots for this method must be JoinTreeSlots"); 233Debug.Assert(indexes.Count >= 1, "Each slot must have one index at least"); 300Debug.Assert(cSideSlotIndexes.Count > 1, "Method called when no duplicate mapping"); 375Debug.Assert(m_projectedSlots[slotNumber] == null, "Another attempt to plug in a default value"); 406Debug.Assert(slot != null, "All slots during cell normalization must field slots"); 410Debug.Assert(newSlotNum >= 0, "Field projected but not in projectedSlotMap"); 447Debug.Assert(projectedVar != null, "Projected slot must not be a constant"); 472Debug.Assert(entitySetKeys.Count == 1, "Currently, we only support primary keys"); 489Debug.Assert(endKeys.Count == 1, "Currently, we only support primary keys"); 595Debug.Assert(slotIndexes != null); 600Debug.Assert(slotIndexes.Count == 1, "Expecting the path to be projected only once"); 611Debug.Assert(this.Extent is AssociationSet); 635Debug.Assert(slotIndexes != null); 647Debug.Assert(slotIndex == -1, "Should be projected only once"); 678Debug.Assert(restriction != null, "All bool literals must be OneOfConst at this point"); 733Debug.Assert(cellNum < numBoolVars, "Trying to set boolean with too high an index"); 763Debug.Assert(result != null, "Atom must be restriction");
System\Data\Mapping\ViewGeneration\Structures\CellTreeNodeVisitors.cs (4)
138Debug.Assert(flattenedChildren.Count >= 1, "node must have more than 1 child and be an OpCellTreeNode"); 145Debug.Assert(flattenedChildren.Count > 1, "Opnode has 0 children?"); 146Debug.Assert(node.OpType != CellTreeOpType.Leaf, "Wrong op type for operation node"); 192Debug.Assert(flattenedChildren.Count > 1, "node must have more than 1 child and be an OpCellTreeNode");
System\Data\Mapping\ViewGeneration\Structures\Constant.cs (11)
162Debug.Assert(outputMember.LeafEdmMember != null, "Constant can't correspond to an empty member path."); 173Debug.Assert(outputMember.LeafEdmMember != null, "Constant can't correspond to an empty path."); 186Debug.Assert(Object.ReferenceEquals(this, Instance), "this must be == Instance for NullConstant"); 233Debug.Fail("Should not be called."); 242Debug.Fail("Should not be called."); 253Debug.Assert(Object.ReferenceEquals(this, Instance), "this must be == Instance for NullConstant"); 262Debug.Fail("We should not emit a message about Undefined constants to the user."); 304Debug.Fail("Should not be called."); 313Debug.Fail("Should not be called."); 324Debug.Assert(Object.ReferenceEquals(this, Instance), "this must be == Instance for NullConstant"); 333Debug.Fail("We should not emit a message about Undefined constants to the user.");
System\Data\Mapping\ViewGeneration\Structures\ConstantProjectedSlot.cs (2)
30Debug.Assert(value != null); 31Debug.Assert(value.IsNotNull() == false, "Cannot store NotNull in a slot - NotNull is only for conditions");
System\Data\Mapping\ViewGeneration\Structures\Domain.cs (11)
46Debug.Assert(values != null); 47Debug.Assert(possibleDiscreteValues != null); 139Debug.Assert(Helper.AsPrimitive(type).PrimitiveTypeKind == PrimitiveTypeKind.Boolean, "Only boolean type has discrete domain."); 156Debug.Assert(Helper.IsEntityType(type) || Helper.IsComplexType(type) || Helper.IsRefType(type) || Helper.IsAssociationType(type)); 173Debug.Assert(domain != null, "Domain not set up for some type"); 320Debug.Assert(constElement as NegatedConstant == null, "Negated cell constant inside NegatedCellConstant"); 425Debug.Assert(cSlot != null, "Assuming constants are not projected"); 520Debug.Assert(result == null, "Multiple negated cell constants?"); 545Debug.Assert(domain1.m_possibleValues.SetEquals(domain2.m_possibleValues), "domains must be compatible"); 564Debug.Assert(negated == null, "m_possibleValues cannot contain negated constant"); 566Debug.Assert(m_domain.IsSubsetOf(AllPossibleValuesInternal),
System\Data\Mapping\ViewGeneration\Structures\ErrorLog.cs (3)
107Debug.Assert(wrappers != null); 137Debug.Assert(m_sourceCells.Count > 0, "Error record must have at least one cell"); 188Debug.Assert(isFirst == false, "No cells");
System\Data\Mapping\ViewGeneration\Structures\LeafCellTreeNode.cs (6)
75Debug.Assert(m_rightFragmentQuery != null, "Unassigned right fragment query"); 133Debug.Assert(cellQuery.NumProjectedSlots + cellQuery.NumBoolVars == totalSlots, 136Debug.Assert(cellQuery.NumProjectedSlots == ProjectedSlotMap.Count, 207Debug.Assert(foreignKeySlots != null); 234Debug.Assert(scalarPropertyMaps.Count() == 1, "Can't Map the same column multiple times in the same end"); 271Debug.Assert(otherEnds.Count() == 1);
System\Data\Mapping\ViewGeneration\Structures\LeftCellWrapper.cs (4)
120Debug.Assert(m_mergedCells.Count == 1); 166Debug.Assert(result != null, "Bad root value in join tree"); 282Debug.Assert(endMember != null, "Element in path before scalar path is not end property?"); 285Debug.Assert(result != null, "No end found for keyslots of table?");
System\Data\Mapping\ViewGeneration\Structures\MemberDomainMap.cs (1)
90Debug.Assert(condition is ScalarRestriction || condition is TypeRestriction,
System\Data\Mapping\ViewGeneration\Structures\MemberMaps.cs (3)
38Debug.Assert(m_queryDomainMap != null); 39Debug.Assert(m_updateDomainMap != null); 40Debug.Assert(m_projectedSlotMap != null);
System\Data\Mapping\ViewGeneration\Structures\MemberPath.cs (7)
501Debug.Assert(found == true, "We did not find the key property in a ref's element type - it cannot be in a subtype"); 502Debug.Assert(MetadataHelper.IsPartOfEntityTypeKey(member), "Member is expected to be a key property"); 512Debug.Assert(prevRefType == null, "We do not allow subtyping in key extraction from Refs"); 559Debug.Assert(keyAttributes.Any(), "No key attributes?"); 668Debug.Assert(assocSet != null && entitySet != null, 699Debug.Assert(assocPath0.Extent.Equals(assocSet) && assocPath1.Extent.Equals(assocSet), 752Debug.Assert(this.Extent is EntitySet, "path must be in the context of an entity set");
System\Data\Mapping\ViewGeneration\Structures\MemberProjectedSlot.cs (3)
147Debug.Assert(entitySet != null, "Prefix must have associated entity set"); 150Debug.Assert(keys.Count > 0, "No keys for entity?"); 151Debug.Assert(keys.Count == 1, "Currently, we only support primary keys");
System\Data\Mapping\ViewGeneration\Structures\MemberProjectionIndex.cs (7)
142Debug.Assert(boolIndex >= 0 && boolIndex < numBoolSlots, "No such boolean in this node"); 151Debug.Assert(slotNum < this.Count + numBoolSlots && slotNum >= this.Count, "No such boolean slot"); 160Debug.Assert(slotNum < this.Count + numBoolSlots, "No such slot in tree"); 169Debug.Assert(slotNum < this.Count + numBoolSlots, "Boolean slot does not exist in tree"); 191Debug.Assert(complexTypemember != null || 213Debug.Assert(possibleStructuralType != null, "Non-structural subtype?"); 245Debug.Assert(structuralMember.TypeUsage.EdmType is ComplexType ||
System\Data\Mapping\ViewGeneration\Structures\MemberRestriction.cs (5)
57Debug.Assert(m_domain.Count != 0, "If you want a boolean that evaluates to false, " + 68Debug.Assert(possibleValues != null); 230Debug.Assert(constants.Contains(constant), "Domain of negated constant does not have positive constant"); 241Debug.Assert(constants.Count > 0, "one of const is false?"); 283Debug.Assert((resourceName0 == null) != (resourceName1 == null),
System\Data\Mapping\ViewGeneration\Structures\NegatedConstant.cs (4)
33Debug.Assert(!values.Any(v => v is NegatedConstant), "Negated constant values must not contain another negated constant."); 117Debug.Fail("Should not be called."); 126Debug.Fail("Should not be called."); 181Debug.Assert(negatedConstants.Contains(constant), "Negated constant must contain all positive constants");
System\Data\Mapping\ViewGeneration\Structures\OpCellTreeNode.cs (14)
100Debug.Assert(m_children[0].RightDomainMap != null, "EdmMember domain map missing"); 116Debug.Assert(m_children.Count > 1, "No children for op node?"); 125Debug.Assert(m_children.Count > 1, "No children for op node?"); 152Debug.Fail("Unexpected optype: " + OpType); 223Debug.Assert(OpType == CellTreeOpType.Union); 266Debug.Assert(totalSlots == child.NumBoolSlots + child.NumProjectedSlots, 324Debug.Assert(boolArray.Length == another.Length); 340Debug.Assert(OpType == CellTreeOpType.IJ || 360Debug.Assert(totalSlots == child.NumBoolSlots + child.NumProjectedSlots, 391Debug.Assert(children[0].IsProjected(keySlotNum), "Key is not in 0th child"); 392Debug.Assert(child.IsProjected(keySlotNum), "Key is not in child"); 467Debug.Assert(false == IsBoolSlot(slotNum), "Boolean slots cannot come from two children"); 593Debug.Assert(children.Any()); 637Debug.Fail("Unknown operator");
System\Data\Mapping\ViewGeneration\Structures\ProjectedSlot.cs (1)
119Debug.Assert(slots1.Length == slots2.Length, "Merged slots of two cells must be same size");
System\Data\Mapping\ViewGeneration\Structures\QualifiedCellIdBoolean.cs (1)
42Debug.Assert(blockAlias == null, "QualifiedCellIdBoolean: blockAlias mismatch");
System\Data\Mapping\ViewGeneration\Structures\ScalarConstant.cs (3)
33Debug.Assert(value != null, "Scalar const value must not be null."); 75Debug.Assert(outputMember.LeafEdmMember != null, "Constant can't correspond to an empty member path."); 141Debug.Assert(outputMember.LeafEdmMember != null, "Constant can't correspond to an empty member path.");
System\Data\Mapping\ViewGeneration\Structures\ScalarRestriction.cs (10)
37Debug.Assert(value is ScalarConstant || value.IsNull() || value.IsNotNull(), "value is expected to be ScalarConstant, NULL, or NOT_NULL."); 62Debug.Assert(IsComplete, "Ranges are fixed only for complete scalar restrictions."); 76Debug.Assert(!this.IsComplete, "CreateCompleteMemberRestriction must be called only for incomplete restrictions."); 93Debug.Assert(cqt == null, "unexpected construction order - cqt must be null"); 99Debug.Assert(cqt == null, "unexpected construction order - cqt must be null"); 100Debug.Assert(domainValues.Count > 0, "domain must not be empty"); 163Debug.Assert(domainValues.Count > 0, "domain must not be empty"); 266Debug.Assert(this.RestrictedMemberSlot.MemberPath.IsScalarType(), "Expected scalar."); 269Debug.Assert(this.Domain.Values.Count(c => c is NegatedConstant) <= 1, "Multiple negated constants?"); 307Debug.Assert(!includeNull || !excludeNull, "includeNull and excludeNull can't be true at the same time.");
System\Data\Mapping\ViewGeneration\Structures\TypeConstant.cs (2)
35Debug.Assert(type != null, "type must not be null."); 192Debug.Assert(m_edmType is StructuralType, "m_edmType must be a structural type.");
System\Data\Mapping\ViewGeneration\Structures\TypeRestriction.cs (5)
44Debug.Assert(value is TypeConstant || value.IsNull(), "Type or NULL expected."); 61Debug.Assert(IsComplete, "Ranges are fixed only for complete type restrictions."); 75Debug.Assert(!this.IsComplete, "CreateCompleteMemberRestriction must be called only for incomplete restrictions."); 93Debug.Assert(typeConstant != null || constant.IsNull(), "Constants for type checks must be type constants or NULLs"); 185Debug.Assert(typeConstant != null || constant.IsNull(), "Constants for type checks must be type constants or NULLs");
System\Data\Mapping\ViewGeneration\Structures\WithStatement.cs (1)
107Debug.Fail("Should not be called.");
System\Data\Mapping\ViewGeneration\Utils\ExternalCalls.cs (11)
39Debug.Assert(!String.IsNullOrEmpty(viewDef), "!String.IsNullOrEmpty(viewDef)"); 40Debug.Assert(mappingItemCollection != null, "mappingItemCollection != null"); 46Debug.Assert(expr != null, "Compile returned empty tree?"); 57Debug.Assert(!String.IsNullOrEmpty(viewDef), "!String.IsNullOrEmpty(viewDef)"); 58Debug.Assert(mappingItemCollection != null, "mappingItemCollection != null"); 73Debug.Assert(functionBody != null, "functionBody != null"); 90Debug.Assert(!String.IsNullOrEmpty(functionFullName), "!String.IsNullOrEmpty(functionFullName)"); 91Debug.Assert(!String.IsNullOrEmpty(functionDefinition), "!String.IsNullOrEmpty(functionDefinition)"); 92Debug.Assert(functionParameters != null, "functionParameters != null"); 93Debug.Assert(edmItemCollection != null, "edmItemCollection != null"); 107Debug.Assert(functionBody != null, "functionBody != null");
System\Data\Mapping\ViewGeneration\Validation\BasicCellRelation.cs (5)
35Debug.Assert(m_slots.Count > 0, "Cell relation with not even an exent?"); 59Debug.Assert(this == m_cellQuery.BasicCellRelation, "Cellquery does not point to the correct BasicCellRelation?"); 60Debug.Assert(m_cellQuery.Extent is EntitySet || m_cellQuery.Extent is AssociationSet, 109Debug.Assert(keys.Count > 0, "No keys for entity?"); 110Debug.Assert(keys.Count == 1, "Currently, we only support primary keys");
System\Data\Mapping\ViewGeneration\Validation\ErrorPatternMatcher.cs (3)
50Debug.Assert(context.ViewTarget == ViewTarget.QueryView || context.Config.IsValidationEnabled); 719Debug.Fail("Unexpected comparison operator, only IsDisjointFrom and IsContainedIn are expected"); 737Debug.Fail("Unexpected comparison operator, only IsDisjointFrom and IsContainedIn are expected");
System\Data\Mapping\ViewGeneration\Validation\ExtentKey.cs (1)
68Debug.Assert(keyMember != null, "Bogus key member in metadata");
System\Data\Mapping\ViewGeneration\Validation\ForeignConstraint.cs (12)
293Debug.Assert(childEnd == null || parentEnd != childEnd, 321Debug.Assert(errorListForInvalidParentColumnsForForeignKey != null && errorListForInvalidParentColumnsForForeignKey.Count > 0); 436Debug.Assert(pNode != null); 626Debug.Assert(context.Extent.Equals(extent), "ViewgenContext extent and expected extent different"); 694Debug.Assert(childSlot != null); 717Debug.Assert(parentSlot != null); 768Debug.Assert(childPaths != null, "child paths should be set"); 769Debug.Assert(parentPaths != null, "parent paths should be set"); 770Debug.Assert(errorParentCell != null, "errorParentCell should be set"); 787Debug.Assert(foundParentCell == true, "Some cell that mapped the parent's key must be present!"); 788Debug.Assert(foundChildCell == true, "Some cell that mapped the child's foreign key must be present according to the requires clause!"); 803Debug.Assert(endSlots.Count > 0);
System\Data\Mapping\ViewGeneration\Validation\KeyConstraint.cs (1)
30Debug.Assert(m_keySlots.Count > 0, "Key constraint being created without any keyslots?");
System\Data\Mapping\ViewGeneration\Validation\ViewCellSlot.cs (3)
114Debug.Fail("Should not be called."); 123Debug.Fail("Should not be called."); 132Debug.Fail("Should not be called.");
System\Data\Mapping\ViewGeneration\Validator.cs (2)
370Debug.Assert(cConstraints.KeyConstraints.Count() == cViewConstraints.KeyConstraints.Count(), 372Debug.Assert(sConstraints.KeyConstraints.Count() == sViewConstraints.KeyConstraints.Count(),
System\Data\Mapping\ViewGeneration\ViewgenContext.cs (4)
63Debug.Assert(extent.Equals(cell.GetLeftQuery(viewTarget).Extent)); 64Debug.Assert(cell.CQuery.NumProjectedSlots == cell.SQuery.NumProjectedSlots); 248Debug.Assert(m_viewTarget == ViewTarget.QueryView); 295Debug.Assert(alignedCells.Count == extentCellsList.Count, "Cell counts disagree");
System\Data\Mapping\ViewGeneration\ViewGenerator.cs (6)
170Debug.Assert(mode != ViewGenMode.GenerateAllViews); 244Debug.Assert(mode != ViewGenMode.GenerateAllViews); 269Debug.Assert(exception.ErrorLog.Count > 0, "Incorrectly created mapping exception"); 334Debug.Assert(exception.ErrorLog.Count > 0, 406Debug.Assert(mode != ViewGenMode.GenerateAllViews, "By definition this method can not handle generating views for all extents"); 458Debug.Assert(false == basicView.IsEmptyRightFragmentQuery, "Basic view is empty?");
System\Data\Mapping\ViewGeneration\ViewgenGatekeeper.cs (10)
38Debug.Assert(containerMapping.HasViews, "Precondition Violated: No mapping exists to generate views for!"); 67Debug.Assert(!type.Abstract, "Can not generate OfType/OfTypeOnly query view for and abstract type"); 127Debug.Assert(exception.ErrorLog.Count > 0, "Incorrectly created mapping exception"); 135Debug.Assert(viewGenerator != null); //make sure there is no exception thrown that does not add error to log 163Debug.Assert(cells.Count > 0, "There must be at least one cell in the container mapping"); 168Debug.Assert(container != null); 194Debug.Assert(exception.ErrorLog.Count > 0, "Incorrectly created mapping exception"); 200Debug.Assert(viewGenerator != null); 237Debug.Assert(container != null); 282Debug.Assert(smallestCell != null && lowestLineNum >= 0);
System\Data\Mapping\ViewValidator.cs (5)
63Debug.Assert(null != setMapping); 64Debug.Assert(null != elementType); 240Debug.Assert(null != expression.Target); 245Debug.Assert(null != target.EntityContainer); 271Debug.Assert(setMapping != null);
System\Data\Metadata\AspProxy.cs (6)
79Debug.Assert(_triedLoadingWebAssembly == false); 80Debug.Assert(_webAssembly == null); 131Debug.Assert(path != null, "path == null"); 144Debug.Assert(!string.IsNullOrEmpty(path)); 145Debug.Assert(path.StartsWith(EdmConstants.WebHomeSymbol, StringComparison.Ordinal)); 157Debug.Assert(miMapPath != null, "Unpexpected missing member in type System.Web.Hosting.HostingEnvironment");
System\Data\Metadata\CacheForPrimitiveTypes.cs (5)
94Debug.Assert(facetDescriptions.Length > 0); 98Debug.Assert(type == null, "type must be null here"); 144Debug.Assert(type != null); 153Debug.Assert(facetDescriptions != null && facetDescriptions.Length > 0); 182Debug.Assert(false, "Unexpected facet");
System\Data\Metadata\ClrPerspective.cs (1)
112Debug.Assert(((GlobalItem)map.EdmItem).DataSpace == DataSpace.CSpace);
System\Data\Metadata\Converter.cs (29)
32Debug.Assert(Enum.GetUnderlyingType(typeof(ConcurrencyMode)) == typeof(int), "Please update underlying type below accordingly."); 49Debug.Assert(Enum.GetUnderlyingType(typeof(StoreGeneratedPattern)) == typeof(int), "Please update underlying type below accordingly."); 147Debug.Fail("Could not load model function definition"); //this should never happen. 158Debug.Assert(convertedItemCache.ItemCollection.DataSpace == DataSpace.SSpace, "Did you add a new space?"); 182Debug.Assert(providerManifest != null, "This will make the dataspace to be default SSpace"); 186Debug.Assert(!convertedItemCache.ItemCollection.TryGetValue(element.FQName, false, out item), "Som should have checked for duplicate items"); 237Debug.Assert(element is Som.TypeElement && 275Debug.Assert(relationshipSet.Relationship.RelationshipKind == RelationshipKind.Association, 450Debug.Assert(element.RelationshipKind == RelationshipKind.Association); 488Debug.Fail("Operation action not supported."); 501Debug.Assert(associationType.ReferentialConstraints.Count == 0, "This must never have been initialized"); 578Debug.Assert(properties.Count != 0); 655Debug.Assert(relationshipSet.Relationship.RelationshipKind == RelationshipKind.Association); 731Debug.Assert(somProperty.TypeUsage.EdmType.BuiltInTypeKind == BuiltInTypeKind.PrimitiveType); 809Debug.Assert(somRelationshipEnd.Multiplicity != RelationshipMultiplicity.Many); 941Debug.Assert(somFunctionImport.ReturnTypeList == null || somFunctionImport.ReturnTypeList.Count == 1, 944Debug.Assert(functionImportEntityContainer != null, "functionImportEntityContainer must be specified during function import conversion"); 950Debug.Assert(functionImportEntityContainer != null, "functionImportEntityContainer must be specified during function import conversion"); 1024Debug.Assert(!convertedItemCache.ItemCollection.TryGetValue(function.Identity, false, out returnFunction), 1045Debug.Assert(somEnumType != null, "somEnumType != null"); 1046Debug.Assert(newGlobalItems != null, "newGlobalItems != null"); 1047Debug.Assert(somEnumType.UnderlyingType is Som.ScalarType, "At this point the underlying type should have already been validated and should be ScalarType"); 1062Debug.Assert(somEnumMember.Value != null, "value must not be null at this point"); 1094Debug.Assert(null != element, "ConvertToDocumentation cannot be invoked with a null Som.Documentation element"); 1179Debug.Assert(somFunction.Schema.DataModel == Som.SchemaDataModelOption.EntityDataModel, "Enums live only in CSpace"); 1194Debug.Fail("Should never get here."); 1239Debug.Assert( 1333Debug.Assert(providerManifest != null, "null provider manifest will be consider as SSpace"); 1365Debug.Assert(scalarType != null, "Som scalar type should always resolve to a primitive type");
System\Data\Metadata\CustomAssemblyResolver.cs (2)
23Debug.Assert(wildcardAssemblyEnumerator != null); 24Debug.Assert(referenceResolver != null);
System\Data\Metadata\DefaultAssemblyResolver.cs (1)
64Debug.Assert(referenceName != null);
System\Data\Metadata\Edm\AssociationEndMember.cs (1)
51System.Diagnostics.Debug.Assert(null != value, "clearing GetRelatedEndMethod");
System\Data\Metadata\Edm\AssociationType.cs (2)
62Debug.Assert(IsReadOnly, "this is a wrapper around this.Members, don't call it during metadata loading, only call it after the metadata is set to read-only"); 109Debug.Assert(
System\Data\Metadata\Edm\ComplexType.cs (3)
66Debug.Assert(IsReadOnly, "this is a wrapper around this.Members, don't call it during metadata loading, only call it after the metadata is set to readonly"); 89Debug.Assert(Helper.IsEdmProperty(member) || Helper.IsNavigationProperty(member), 113System.Diagnostics.Debug.Assert(!String.IsNullOrEmpty(cspaceNamespaceName) &&
System\Data\Metadata\Edm\EdmFunction.cs (5)
34Debug.Assert(returnParameters.All((returnParameter) => returnParameter != null), "All return parameters must be non-null"); 35Debug.Assert(returnParameters.All((returnParameter) => returnParameter.Mode == ParameterMode.ReturnValue), "Return parameter in a function must have the ParameterMode equal to ReturnValue."); 62Debug.Assert(_returnParameters.Count == payload.EntitySets.Length, "The number of entity sets should match the number of return parameters"); 70Debug.Assert(_returnParameters.Count == 1, "If there was more than one result set payload.EntitySets should not have been null"); 90Debug.Assert(parameter.Mode != ParameterMode.ReturnValue, "No function parameter can have ParameterMode equal to ReturnValue.");
System\Data\Metadata\Edm\EdmProperty.cs (3)
64System.Diagnostics.Debug.Assert(name == propertyInfo.Name, "different PropertyName"); 130System.Diagnostics.Debug.Assert(null != value, "clearing ValueGetter"); 142System.Diagnostics.Debug.Assert(null != value, "clearing ValueSetter");
System\Data\Metadata\Edm\EdmType.cs (5)
114Debug.Assert(value != null, "The name should never be set to null"); 131Debug.Assert(value != null, "Namespace should never be set to null"); 168Debug.Assert(_baseType == null, "BaseType can't be set multiple times"); 174Debug.Assert(type != this, "Cannot set the given type as base type because it would introduce a loop in inheritance"); 180Debug.Assert(value == null ||
System\Data\Metadata\Edm\EntityContainer.cs (2)
213Debug.Assert(function != null, "function != null"); 214Debug.Assert(function.IsFunctionImport, "function.IsFunctionImport");
System\Data\Metadata\Edm\EntitySet.cs (1)
141Debug.Assert(associationSet.ElementType.ReferentialConstraints.Count == 1, "Expected exactly one constraint for FK");
System\Data\Metadata\Edm\EntityType.cs (6)
94Debug.Assert(Helper.IsEdmProperty(member) || Helper.IsNavigationProperty(member), 107Debug.Assert(Members.Contains(member)); 120Debug.Assert(Members.Contains(member)); 157Debug.Assert(IsReadOnly, "this is a wrapper around this.Members, don't call it during metadata loading, only call it after the metadata is set to readonly"); 249System.Diagnostics.Debug.Assert(!String.IsNullOrEmpty(cspaceNamespaceName) && 327Debug.Assert(ClrType != null, "Expecting non-null CLRType of o-space EntityType.");
System\Data\Metadata\Edm\EntityTypeBase.cs (3)
55Debug.Assert(_keyMembers.Count == 0, "Since the base type have keys, current type cannot have keys defined"); 83Debug.Assert(_keyMemberNames.Length == this.KeyMembers.Count, "This list is out of sync with the key members count. This property was called before all the keymembers were added"); 101Debug.Assert(this.BaseType == null || ((EntityTypeBase)this.BaseType).KeyMembers.Count == 0,
System\Data\Metadata\Edm\EnumMember.cs (2)
50Debug.Assert(value != null, "value != null"); 51Debug.Assert(value is SByte || value is Byte || value is Int16 || value is Int32 || value is Int64, "Unsupported type of enum member value.");
System\Data\Metadata\Edm\EnumType.cs (13)
65Debug.Assert(underlyingType != null, "underlyingType != null"); 66Debug.Assert(Helper.IsSupportedEnumUnderlyingType(underlyingType.PrimitiveTypeKind), "Unsupported underlying type for enum."); 67Debug.Assert(dataSpace == DataSpace.CSpace || dataSpace == DataSpace.OSpace, "Enums can be only defined in CSpace or OSpace."); 89Debug.Assert(clrType != null, "clrType != null"); 90Debug.Assert(clrType.IsEnum, "enum type expected"); 94Debug.Assert(_underlyingType != null, "only primitive types expected here."); 95Debug.Assert(Helper.IsSupportedEnumUnderlyingType(_underlyingType.PrimitiveTypeKind), 167Debug.Assert(enumMember != null, "enumMember != null"); 168Debug.Assert(Helper.IsEnumMemberValueInRange(UnderlyingType.PrimitiveTypeKind, Convert.ToInt64(enumMember.Value, CultureInfo.InvariantCulture))); 169Debug.Assert(enumMember.Value.GetType() == UnderlyingType.ClrEquivalentType); 196Debug.Assert(clrType != null, "clrType != null"); 197Debug.Assert(clrType.IsEnum, "enum type expected"); 198Debug.Assert(!String.IsNullOrEmpty(cspaceNamespaceName) && !String.IsNullOrEmpty(cspaceTypeName), "Mapping information must never be null");
System\Data\Metadata\Edm\Facet.cs (1)
93Debug.Assert(
System\Data\Metadata\Edm\FacetDescription.cs (3)
79Debug.Assert(FacetDescription.IsNumericType(facetType), "Min and Max Values can only be specified for numeric facets"); 83Debug.Assert(minValue != maxValue, "minValue should not be equal to maxValue"); 254System.Diagnostics.Debug.Assert(this.FacetType.Identity == "Edm.Boolean");
System\Data\Metadata\Edm\FacetValueContainer.cs (2)
62Debug.Assert(object.ReferenceEquals(unbounded, EdmConstants.UnboundedValue), "you must pass the unbounded value. If you are trying to set null, use the T parameter overload"); 77Debug.Assert(_hasValue, "Don't get the value if it has not been set");
System\Data\Metadata\Edm\FilteredReadOnlyMetadataCollection.cs (2)
51Debug.Assert(collection != null); 52Debug.Assert(collection.IsReadOnly, "wrappers should only be created once loading is over, and this collection is still loading");
System\Data\Metadata\Edm\GlobalItem.cs (2)
52Debug.Assert(GetDataSpace() != (DataSpace)(-1) || this.BuiltInTypeKind == BuiltInTypeKind.RowType || this.BuiltInTypeKind == BuiltInTypeKind.CollectionType, "DataSpace must have some valid value"); 59Debug.Assert(GetDataSpace() == (DataSpace)(-1) || GetDataSpace() == value || this.BuiltInTypeKind == BuiltInTypeKind.RowType || this.BuiltInTypeKind == BuiltInTypeKind.CollectionType, "Invalid Value being set for DataSpace");
System\Data\Metadata\Edm\ItemCollection.cs (3)
89Debug.Assert(item.IsReadOnly, "The item is not readonly, it should be by the time it is added to the item collection"); 90Debug.Assert(item.DataSpace == this.DataSpace); 208Debug.Assert(_itemsCache != null, "check the initialization of the Memoizer");
System\Data\Metadata\Edm\LightweightCodeGenerator.cs (10)
44Debug.Assert(null != getter, "null getter"); 86Debug.Assert(null != setter, "null setter"); 102Debug.Assert(null != getRelatedEnd, "null getRelatedEnd"); 152System.Diagnostics.Debug.Assert(type != null); 193Debug.Assert(!default(RuntimeTypeHandle).Equals(entityDeclaringType), "Type handle of entity should always be known."); 388Debug.Assert(null != (Action<Object,Type,String,String>)EntityUtil.ThrowSetInvalidValue, "missing method ThrowSetInvalidValue(object,Type,string,string)"); 401Debug.Assert(!default(RuntimeTypeHandle).Equals(entityDeclaringType), "Type handle of entity should always be known."); 436System.Diagnostics.Debug.Assert(mi != null); 468Debug.Assert(sourceMember.DeclaringType == targetMember.DeclaringType, "Source and Target members must be in the same DeclaringType"); 476Debug.Assert(genericCreateRelatedEndMethod != null, "Could not find method LightweightCodeGenerator.CreateGetRelatedEndMethod");
System\Data\Metadata\Edm\MemberCollection.cs (2)
61Debug.Assert(declaringType != null, "This member collection must belong to a declaring type"); 339Debug.Assert(member.DeclaringType == null, string.Format(CultureInfo.CurrentCulture, "The member {0} already has a declaring type, it cannot be added to this collection.", argumentName));
System\Data\Metadata\Edm\MetadataCollection.cs (7)
64Debug.Assert(!String.IsNullOrEmpty(item.Identity), "Identity of the item must never be null or empty"); 220Debug.Assert(collectionData != null && collectionData.IdentityDictionary != null, "the identity dictionary is null"); 221Debug.Assert(!String.IsNullOrEmpty(identity), "empty identity"); 363System.Diagnostics.Debug.Assert(index == -1 || index == listCount); 481Debug.Assert(null != identity, "null identity"); 515Debug.Assert(ignoreCase == (0 <= index), "indexof verification"); 654Debug.Assert((index < 0) ||
System\Data\Metadata\Edm\MetadataItem.cs (1)
261Debug.Assert(System.Convert.ToInt32(flag & ~MetadataFlags.Readonly,CultureInfo.InvariantCulture) == 0,
System\Data\Metadata\Edm\MetadataPropertyAttribute.cs (1)
60Debug.Assert(null != type);
System\Data\Metadata\Edm\MetadataPropertyCollection.cs (3)
64Debug.Assert(null != clrType); 111Debug.Assert(null != propertyInfo); 112Debug.Assert(null != attribute);
System\Data\Metadata\Edm\MetadataPropertyvalue.cs (2)
27Debug.Assert(null != propertyInfo); 28Debug.Assert(null != item);
System\Data\Metadata\Edm\NavigationProperty.cs (2)
47System.Diagnostics.Debug.Assert(name == propertyInfo.Name, "different PropertyName?"); 143Debug.Assert(
System\Data\Metadata\Edm\NavigationPropertyAccessor.cs (5)
62System.Diagnostics.Debug.Assert(null != value, "clearing ValueGetter"); 74System.Diagnostics.Debug.Assert(null != value, "clearing ValueSetter"); 85System.Diagnostics.Debug.Assert(null != value, "clearing CollectionAdd"); 96System.Diagnostics.Debug.Assert(null != value, "clearing CollectionRemove"); 107System.Diagnostics.Debug.Assert(null != value, "clearing CollectionCreate");
System\Data\Metadata\Edm\PrimitiveType.cs (3)
72Debug.Assert(clrType == ClrEquivalentType, "not equivalent to ClrEquivalentType"); 120Debug.Assert(_providerManifest != null, "This primitive type should have been added to a manifest, which should have set this"); 125Debug.Assert(value != null, "This primitive type should have been added to a manifest, which should have set this");
System\Data\Metadata\Edm\Provider\EdmProviderManifest.cs (4)
90Debug.Assert(type is PrimitiveType, "EdmProviderManifest.GetFacetDescriptions(): Argument is not a PrimitiveType"); 224Debug.Assert(clrType == primitiveType.ClrEquivalentType, "ClrEquivalentType mismatch"); 866Debug.Assert(null != typeUsage, "TypeUsage must not be null"); 898Debug.Assert(primitiveType != null, "type argument must be primitive in order to use this function");
System\Data\Metadata\Edm\Provider\EdmProviderManifestFunctionBuilder.cs (4)
23Debug.Assert(edmPrimitiveTypes != null, "Primitive types should not be null"); 30Debug.Assert((int)edmType.PrimitiveTypeKind < primitiveTypeUsages.Length && (int)edmType.PrimitiveTypeKind >= 0, "Invalid PrimitiveTypeKind value?"); 31Debug.Assert(primitiveTypeUsages[(int)edmType.PrimitiveTypeKind] == null, "Duplicate PrimitiveTypeKind value in EDM primitive types?"); 79Debug.Assert(!string.IsNullOrEmpty(aggregateFunctionName) && !string.IsNullOrWhiteSpace(aggregateFunctionName), "Aggregate function name should be valid");
System\Data\Metadata\Edm\RelationshipType.cs (1)
49Debug.Assert(IsReadOnly, "this is a wrapper around this.Members, don't call it during metadata loading, only call it after the metadata is set to readonly");
System\Data\Metadata\Edm\RowType.cs (2)
90Debug.Assert(IsReadOnly, "this is a wrapper around this.Members, don't call it during metadata loading, only call it after the metadata is set to readonly"); 121Debug.Assert(Helper.IsEdmProperty(member), "Only members of type Property may be added to Row types.");
System\Data\Metadata\Edm\SafeLink.cs (1)
36Debug.Assert(link._value == null || link._value == parent, "don't try to hook up the same child to a different parent");
System\Data\Metadata\Edm\StructuralType.cs (1)
107Debug.Assert(this.DataSpace == member.TypeUsage.EdmType.DataSpace || this.BuiltInTypeKind == BuiltInTypeKind.RowType, "Wrong member type getting added in structural type");
System\Data\Metadata\Edm\TypeUsage.cs (3)
432System.Diagnostics.Debug.Assert(((RefType)edmType).ElementType.DataSpace == DataSpace.CSpace); 457System.Diagnostics.Debug.Assert(false, "Unexpected type found in entity data reader"); 490Debug.Fail("TypeUsage.SetReadOnly should not need to ever be called");
System\Data\Metadata\Edm\util.cs (2)
31Debug.Assert(item != null, "The given item is null"); 46Debug.Assert(!string.IsNullOrEmpty(item.Identity), "Item has empty identity.");
System\Data\Metadata\EdmItemCollection.cs (2)
456Debug.Assert(function.IsModelDefinedFunction, "Function definition can be requested only for user-defined model functions."); 477Debug.Assert(generatedDefinition != null, "generatedDefinition != null");
System\Data\Metadata\EdmValidator.cs (2)
150Debug.Assert(item != null, "InternalValidate is called with a null item, the caller should check for null first"); 210Debug.Assert(false, "An instance with a built in type kind refering to the abstract type " + item.BuiltInTypeKind + " is encountered");
System\Data\Metadata\Helper.cs (14)
107Debug.Assert(firstType != null, "firstType should not be not null"); 121Debug.Assert(firstType != null, "firstType should not be not null"); 185Debug.Assert(stringList != null , "Expecting a non null list"); 222Debug.Assert(xmlReaders != null); 344Debug.Assert(edmType != null, "edmType != null"); 472Debug.Assert(false, "which ParameterDirection.ToString() is missing?"); 491Debug.Assert(false, "which ParameterMode.ToString() is missing?"); 534Debug.Assert(IsSupportedEnumUnderlyingType(underlyingTypeKind), "Unsupported underlying type."); 548Debug.Assert(type != null, "type != null"); 549Debug.Assert(IsScalarType(type), "This method must not be called for types that are neither primitive nor enums."); 563Debug.Assert(type != null, "type != null"); 564Debug.Assert(IsEnumType(type), "This method can be called only for enums."); 571Debug.Assert(type != null, "type != null"); 572Debug.Assert(IsPrimitiveType(type), "This method can be called only for enums.");
System\Data\Metadata\MappingMetadataHelper.cs (1)
26Debug.Assert(entityType != null, "EntityType parameter should not be null.");
System\Data\Metadata\MetadataArtifactLoader.cs (10)
87Debug.Assert(path != null); 88Debug.Assert(resolver != null); 147Debug.Assert(!string.IsNullOrEmpty(validExtension)); 225Debug.Assert(!string.IsNullOrEmpty(path)); 226Debug.Assert(!string.IsNullOrEmpty(validExtension)); 316Debug.Assert(!string.IsNullOrEmpty(resource)); 334Debug.Assert(!string.IsNullOrEmpty(resource)); 352Debug.Assert(!string.IsNullOrEmpty(resource)); 385Debug.Assert(!string.IsNullOrEmpty(resource)); 417Debug.Assert(false, "Invalid DataSpace specified.");
System\Data\Metadata\MetadataArtifactLoaderComposite.cs (1)
46Debug.Assert(children != null);
System\Data\Metadata\MetadataArtifactLoaderCompositeFile.cs (1)
182Debug.Assert(false, "Invalid DataSpace value.");
System\Data\Metadata\MetadataArtifactLoaderCompositeResource.cs (11)
46Debug.Assert(resolver != null); 160Debug.Assert(resolver != null); 163Debug.Assert(!string.IsNullOrEmpty(assemblyName)); 230Debug.Assert(assembly != null); 241Debug.Assert(resourceName != null); 242Debug.Assert(assembly != null); 265Debug.Assert(assembly != null); 279Debug.Assert(resolver != null); 294Debug.Assert(path != null); 295Debug.Assert(MetadataArtifactLoader.PathStartsWithResPrefix(path)); 315Debug.Assert(!string.IsNullOrEmpty(resourceName), "we should not get here is the resourceName is null");
System\Data\Metadata\MetadataArtifactLoaderFile.cs (1)
80Debug.Assert(false, "object is not a MetadataArtifactLoaderFile");
System\Data\Metadata\MetadataArtifactLoaderResource.cs (3)
35Debug.Assert(assembly != null); 36Debug.Assert(resourceName != null); 75Debug.Assert(false, "object is not a MetadataArtifactLoaderResource");
System\Data\Metadata\MetadataArtifactLoaderXmlReaderWrapper.cs (1)
77Debug.Assert(false, "object is not a MetadataArtifactLoaderXmlReaderWrapper");
System\Data\Metadata\MetadataCache.cs (18)
108Debug.Assert(!string.IsNullOrEmpty(paths), "paths cannot be empty or null"); 367Debug.Assert(entry.IsLoaded, "The entry must be loaded at this point"); 448Debug.Assert(_entryTokenReference.IsAlive, "You must call Ensure token before you call this method"); 449Debug.Assert(_markEntryForCleanup == false, "The entry must not be marked for cleanup"); 450Debug.Assert(_itemCollection == null, "Item collection must be null"); 451Debug.Assert(_filePermissions == null, "filePermissions must be null"); 484Debug.Assert(_entryTokenReference.IsAlive == false, "Entry Token must never be alive if the entry is marked for cleanup"); 539Debug.Assert(_markEntryForCleanup == false, "An entry with alive token cannot be marked for cleanup"); 549Debug.Assert(_weakReferenceItemCollection.IsAlive, "Since the strong reference is still there, weak reference must also be alive"); 556Debug.Assert(_markEntryForCleanup, "Since the strong reference is null, this entry must be marked for cleanup"); 582Debug.Assert(_itemCollection != null, "Item collection must be present since we want to reuse the metadata"); 583Debug.Assert(_entryTokenReference.IsAlive, "This entry must be in use"); 584Debug.Assert(_markEntryForCleanup == false, "The entry must not marked for cleanup"); 585Debug.Assert(_weakReferenceItemCollection.IsAlive, "Weak reference to item collection must be alive"); 636Debug.Assert(loader != null, "loader is null"); 825Debug.Assert(loader != null, "loader must never be null"); 852Debug.Assert(edmItemCollection != null, "EdmItemCollection must never be null"); 853Debug.Assert(loader != null, "loader must never be null");
System\Data\Metadata\MetadataWorkspace.cs (17)
137Debug.Assert(XmlConstants.SchemaVersionLatest == XmlConstants.EdmVersionForV3, "Did you add a new version?"); 242Debug.Assert(collection.DataSpace == DataSpace.OCSpace, "Invalid DataSpace Enum value: " + collection.DataSpace); 321Debug.Assert(itemCollectionType != null); 400Debug.Assert(null != type, "null type"); 448Debug.Assert(null != type, "null type"); 923Debug.Fail("Invalid DataSpace Enum value: " + dataSpace); 1001Debug.Assert( 1027Debug.Assert( 1118Debug.Assert( 1143Debug.Assert( 1222Debug.Assert(null != functionImport); 1261Debug.Assert(edmSpaceTypeUsage.EdmType != null, "The TypeUsage object does not have an EDMType."); 1279Debug.Assert(!Helper.IsPrimitiveType(clrType) || 1310Debug.Assert(this.IsItemCollectionAlreadyRegistered(DataSpace.CSSpace) && 1316Debug.Assert(!result || 1434Debug.Assert(entitySet.EntityContainer != null); 1476Debug.Assert(null != _itemsSSpace, "_itemsSSpace must not be null");
System\Data\Metadata\ObjectHelper.cs (12)
53Debug.Assert(errors != null); 66Debug.Assert(count!=0, "Empty Error List"); 145Debug.Assert(edmProperty.TypeUsage.EdmType.DataSpace == DataSpace.CSpace, "cspace property must have a cspace type"); 146Debug.Assert(columnProperty.TypeUsage.EdmType.DataSpace == DataSpace.SSpace, "sspace type usage must have a sspace type"); 147Debug.Assert( 150Debug.Assert(Helper.IsPrimitiveType(columnProperty.TypeUsage.EdmType), "sspace property must contain a primitive type"); 204Debug.Assert(cspaceType != null, "cspaceType != null"); 205Debug.Assert(storeType != null, "storeType != null"); 206Debug.Assert(cspaceType.EdmType.DataSpace == DataSpace.CSpace, "cspace property must have a cspace type"); 207Debug.Assert(storeType.EdmType.DataSpace == DataSpace.CSpace, "storeType type usage must have a sspace type"); 208Debug.Assert( 211Debug.Assert(Helper.IsPrimitiveType(storeType.EdmType), "storeType property must be a primitive type");
System\Data\Metadata\ObjectItemCollection.cs (6)
498Debug.Assert(objectSpaceType == null || objectSpaceType is StructuralType || objectSpaceType is EnumType, 520Debug.Assert(objectSpaceType == null || objectSpaceType is StructuralType || objectSpaceType is EnumType, 534Debug.Assert(objectSpaceType is ClrEntityType || objectSpaceType is ClrComplexType || objectSpaceType is ClrEnumType, 539Debug.Assert(clrType != null, "ClrType property of ClrEntityType/ClrComplexType/ClrEnumType objects must not be null"); 575Debug.Assert(DataSpace.CSpace == cspaceType.DataSpace, "DataSpace should be CSpace"); 595Debug.Assert(DataSpace.OSpace == edmType.DataSpace, "DataSpace must be OSpace");
System\Data\Metadata\ObjectLayer\AssemblyCache.cs (2)
42Debug.Assert(loaderCookie == null || loaderCookie is Func<Assembly, ObjectItemLoadingSessionData, ObjectItemAssemblyLoader>, "This is a bad loader cookie"); 117Debug.Assert(entry != null, "we should always have an entry, why don't we?");
System\Data\Metadata\ObjectLayer\KnownAssembliesSet.cs (1)
80Debug.Assert(current.SeenWithEdmItemCollection != knownAssemblyEntry.SeenWithEdmItemCollection &&
System\Data\Metadata\ObjectLayer\KnownAssemblyEntry.cs (1)
24Debug.Assert(cacheEntry != null, "Found a null cacheEntry");
System\Data\Metadata\ObjectLayer\LoadMessageLogger.cs (2)
45Debug.Assert(relatedType != null, "have to pass in a type to get the message"); 62Debug.Assert(relatedType != null, "have to have a type with this message");
System\Data\Metadata\ObjectLayer\LockedAssemblyCache.cs (1)
52Debug.Assert(entered, "The cache is being accessed by a thread that isn't holding the lock");
System\Data\Metadata\ObjectLayer\ObjectItemAssemblyLoader.cs (2)
117Debug.Assert(loaderCookie == null || loaderCookie is Func<Assembly, ObjectItemLoadingSessionData, ObjectItemAssemblyLoader>, "Non loader cookie passed in"); 143Debug.Assert(!_sessionData.KnownAssemblies.Contains(_assembly, SessionData.ObjectItemAssemblyLoaderFactory, _sessionData.EdmItemCollection), "This assembly must not be present in the list of known assemblies");
System\Data\Metadata\ObjectLayer\ObjectItemAttributeAssemblyLoader.cs (20)
39Debug.Assert(Create == sessionData.ObjectItemAssemblyLoaderFactory, "Why is there a different factory creating this class"); 69Debug.Assert(IsSchemaAttributePresent(SourceAssembly), "LoadAssembly shouldn't be called with assembly having no schema attribute"); 70Debug.Assert(!SessionData.KnownAssemblies.Contains(SourceAssembly, SessionData.ObjectItemAssemblyLoaderFactory, SessionData.EdmItemCollection), "InternalLoadAssemblyFromCache: This assembly must not be present in the list of known assemblies"); 139Debug.Assert(!SessionData.TypesInLoading.ContainsKey(clrType.FullName), "This should be called only after looking in typesInLoading"); 140Debug.Assert(SessionData.EdmItemErrors.Count > 0 || // had an error during loading 148Debug.Assert(SessionData.KnownAssemblies.Contains(clrType.Assembly, SessionData.LoaderCookie, SessionData.EdmItemCollection), "We should only be loading things directly from the cache if they are already in the collection"); 163Debug.Assert(CacheEntry.TypesInAssembly.Count == 0); 250Debug.Assert(!CacheEntry.ContainsType(associationType.FullName), "Relationship type must not be present in the list of types"); 276Debug.Assert(clrType.Assembly == SourceAssembly, "Why are we loading a type that is not in our assembly?"); 277Debug.Assert(!SessionData.TypesInLoading.ContainsKey(clrType.FullName), "Trying to load a type that is already loaded???"); 278Debug.Assert(!clrType.IsGenericType, "Generic type is not supported"); 313Debug.Assert(typeAttribute is EdmEnumTypeAttribute, "Invalid type attribute encountered"); 338Debug.Assert(!CacheEntry.ContainsType(edmType.Identity), "This type must not be already present in the list of types for this assembly"); 517Debug.Assert(propertyInfo.IsDefined(typeof(EdmRelationshipNavigationPropertyAttribute), false), "The property must have navigation property defined"); 524Debug.Assert(relationshipPropertyAttributes.Length == 1, "There should be exactly one property for every navigation property"); 617Debug.Assert(property.IsDefined(typeof(EdmScalarPropertyAttribute), false), "The property must have a scalar attribute"); 636Debug.Assert(attrs.Length == 1, "Every property can exactly have one ScalarProperty Attribute"); 656Debug.Assert(declaringType != null, "type != null"); 657Debug.Assert(clrProperty != null, "clrProperty != null"); 658Debug.Assert(
System\Data\Metadata\ObjectLayer\ObjectItemConventionAssemblyLoader.cs (42)
31Debug.Assert(Create == sessionData.ObjectItemAssemblyLoaderFactory, "Why is there a different factory creating this class"); 51Debug.Assert(ospaceType is StructuralType || Helper.IsEnumType(ospaceType), "Only StructuralType or EnumType expected."); 73Debug.Assert(CacheEntry.ClosureAssemblies.Count == 0, "How did we get closure assemblies?"); 100Debug.Assert(pair.Value > 1, "how did we get a negative count of types in the dictionary?"); 118Debug.Assert(type != null, "type != null"); 119Debug.Assert(cspaceType != null, "cspaceType != null"); 120Debug.Assert(cspaceType is StructuralType || Helper.IsEnumType(cspaceType), "Structural or enum type expected"); 139Debug.Assert(cspaceType is StructuralType); 153Debug.Assert(type != null, "type != null"); 154Debug.Assert(cspaceType != null, "cspaceType != null"); 158Debug.Assert(TypesMatchByConvention(type, cspaceType), "The types passed as parameters don't match by convention."); 167Debug.Assert(Helper.IsComplexType(cspaceType), "Invalid type attribute encountered"); 218Debug.Assert(enumType != null, "enumType != null"); 219Debug.Assert(enumType.IsEnum, "enum type expected"); 220Debug.Assert(cspaceEnumType != null, "cspaceEnumType != null"); 221Debug.Assert(Helper.IsEnumType(cspaceEnumType), "Enum type expected"); 222Debug.Assert(TypesMatchByConvention(enumType, cspaceEnumType), "The types passed as parameters don't match by convention."); 246Debug.Assert(enumType != null, "enumType != null"); 247Debug.Assert(enumType.IsEnum, "expected enum OSpace type"); 248Debug.Assert(cspaceEnumType != null, "cspaceEnumType != null"); 249Debug.Assert(Helper.IsEnumType(cspaceEnumType), "Enum type expected"); 282Debug.Assert(enumType != null, "enumType != null"); 283Debug.Assert(enumType.IsEnum, "expected enum OSpace type"); 284Debug.Assert(cspaceEnumType != null, "cspaceEnumType != null"); 285Debug.Assert(Helper.IsEnumType(cspaceEnumType), "Enum type expected"); 286Debug.Assert(cspaceEnumType.UnderlyingType.ClrEquivalentType == enumType.GetEnumUnderlyingType(), "underlying types should have already been checked"); 348Debug.Assert(!foundValue || ospaceType is StructuralType, "Structural type expected (if found)."); 490Debug.Assert(propertyType is StructuralType, "Structural type expected."); 511Debug.Assert(ospaceRelationship is StructuralType, "Structural type expected."); 521Debug.Assert(findType is StructuralType, "Structural type expected."); 532Debug.Assert(findType is StructuralType, "Structural type expected."); 539Debug.Assert(foundTarget, "Since the relationship will only be created if it can find the types for both ends, we will never fail to find one of the ends"); 681Debug.Assert(cspaceAssociation.RelationshipEndMembers.Count == 2, "Relationships are assumed to have exactly two ends"); 693Debug.Assert(ospaceEndTypes[0] is StructuralType); 694Debug.Assert(ospaceEndTypes[1] is StructuralType); 741Debug.Assert(type != null, "type != null"); 742Debug.Assert(clrProperty != null, "clrProperty != null"); 743Debug.Assert(clrProperty.CanRead && clrProperty.CanWrite, "The clr property has to have a setter and a getter."); 744Debug.Assert(ospaceType != null, "ospaceType != null"); 745Debug.Assert(cspaceProperty != null, "cspaceProperty != null"); 746Debug.Assert(propertyType != null, "propertyType != null"); 747Debug.Assert(Helper.IsScalarType(propertyType), "Property has to be primitive or enum.");
System\Data\Metadata\ObjectLayer\ObjectItemLoadingSessionData.cs (4)
109Debug.Assert(_loaderFactory == null || _typesInLoading.Count == 0, "Only reset the factory after types have not been loaded or load from the cache"); 122Debug.Assert(_loaderFactory == null || 132Debug.Assert(loaderCookie == null || loaderCookie is Func<Assembly, ObjectItemLoadingSessionData, ObjectItemAssemblyLoader>, "This is a bad loader cookie"); 168Debug.Assert(Helper.IsAssociationType(type));
System\Data\Metadata\StoreItemCollection.cs (3)
55Debug.Assert(factory != null, "factory is null"); 56Debug.Assert(manifest != null, "manifest is null"); 366Debug.Assert(sTypeFunction.DataSpace == Edm.DataSpace.SSpace, "sTypeFunction.DataSpace == Edm.DataSpace.SSpace");
System\Data\Metadata\StoreItemCollection.Loader.cs (4)
76Debug.Assert(_errors == null, "we are expecting this to be the location that sets _errors for the first time"); 123Debug.Assert(expected != null, "Expected provider name not initialized from _provider or _providerFactory?"); 207Debug.Assert(provEx != null); 208Debug.Assert(addError != null);
System\Data\Metadata\TypeHelpers.cs (10)
444Debug.Assert(scalarType != null, "scalarType != null"); 445Debug.Assert(TypeSemantics.IsScalarType(scalarType), "Primitive or enum type expected."); 459Debug.Assert(enumTypeUsage != null, "enumTypeUsage != null"); 460Debug.Assert(TypeSemantics.IsEnumerationType(enumTypeUsage), "enumTypeUsage is not an enumerated type"); 472Debug.Assert(spatialTypeUsage != null, "spatialTypeUsage != null"); 473Debug.Assert(TypeSemantics.IsStrongSpatialType(spatialTypeUsage), "spatialTypeUsage is not a strong spatial type"); 496System.Diagnostics.Debug.Assert(edmType != null); 677Debug.Assert(entitySet.EntityContainer != null, "entitySet.EntityContainer is null"); 800Debug.Assert(false, "Integer primitive type was not one of Byte, Int16, Int32, Int64, SByte?"); 843Debug.Assert(!isCanonicalFunction || (isCanonicalFunction && !function.HasUserDefinedBody),
System\Data\Metadata\TypeSemantics.cs (30)
103Debug.Assert(subType != null, "subType must not be NULL"); 104Debug.Assert(superType != null, "superType must not be NULL"); 138Debug.Assert(fromType != null, "fromType must not be NULL"); 139Debug.Assert(toType != null, "toType must not be NULL"); 194Debug.Fail("cannot enumerate subnodes of a leaf node"); 217Debug.Assert(fromType != null, "fromType != null"); 218Debug.Assert(toType != null, "toType != null"); 239Debug.Assert(type1 != null, "type1 must not be NULL"); 240Debug.Assert(type2 != null, "type2 must not be NULL"); 327Debug.Assert(!IsEnumerationType(type), "Implicit cast/Softcast is not allowed for enums so we should never see enum type here."); 379Debug.Assert(type != null, "type != null"); 401Debug.Assert(type != null, "type != null"); 676Debug.Assert(null != type, "type must not be null"); 713System.Diagnostics.Debug.Assert(assertPredicate(), 726Debug.Assert(fromType != null, "fromType must not be null"); 727Debug.Assert(Helper.IsPrimitiveType(fromType.EdmType), "fromType must be primitive type"); 728Debug.Assert(toType != null, "toType must not be null"); 729Debug.Assert(Helper.IsPrimitiveType(toType.EdmType), "toType must be primitive type"); 761Debug.Assert(fromRowType != null && toRowType != null); 781Debug.Assert(fromType != null, "fromType must not be null"); 782Debug.Assert(Helper.IsPrimitiveType(fromType.EdmType), "fromType must be primitive type"); 783Debug.Assert(toType != null, "toType must not be null"); 784Debug.Assert(Helper.IsPrimitiveType(toType.EdmType), "toType must be primitive type"); 799Debug.Assert(edmType1 != null && edmType2 != null); 850Debug.Assert(type1 != null, "type1 must not be null"); 851Debug.Assert(Helper.IsPrimitiveType(type1.EdmType), "type1 must be primitive type"); 852Debug.Assert(type2 != null, "type2 must not be null"); 853Debug.Assert(Helper.IsPrimitiveType(type2.EdmType), "type2 must be primitive type"); 921Debug.Assert(refType1.ElementType != null && reftype2.ElementType != null); 1035Debug.Assert(fromType != null && toType != null);
System\Data\Objects\DataClasses\ComplexObject.cs (9)
42Debug.Assert(null != parent, "Attempt to attach to a null parent"); 43Debug.Assert(null != parentPropertyName, "Must provide parentPropertyName in order to attach"); 50Debug.Assert(_parentPropertyName == null); 64Debug.Assert(_parent != null, "Attempt to detach from a null _parent"); 65Debug.Assert(_parentPropertyName != null, "Null _parentPropertyName on a non-null _parent"); 133Debug.Assert(complexObject != null, "invalid complexObject"); 134Debug.Assert(!String.IsNullOrEmpty(complexMemberName), "invalid complexMemberName"); 163Debug.Assert(complexObject != null, "invalid complexObject"); 164Debug.Assert(!String.IsNullOrEmpty(complexMemberName), "invalid complexMemberName");
System\Data\Objects\DataClasses\EntityCollection.cs (14)
165Debug.Assert(!(entity is IEntityWrapper), "Object is an IEntityWrapper instance instead of the raw entity."); 330Debug.Assert(wrappedEntity != null, "IEntityWrapper instance is null."); 351Debug.Assert(wrappedEntity != null, "IEntityWrapper instance is null."); 418Debug.Assert(tm.IsAddTracking || tm.IsAttachTracking, "Exclude being called while not part of attach/add rollback--PromotedEntityKeyRefs will be null."); 423Debug.Assert(otherEnd != null, "Other end of FK from a collection should be a reference."); 474Debug.Assert(_wrappedRelatedEntities.Count == 0, "After removing all related entities local collection count should be zero"); 498Debug.Assert(wrappedEntity != null, "IEntityWrapper instance is null."); 530Debug.Assert(wrappedEntity != null, "IEntityWrapper instance is null."); 550Debug.Assert(wrappedEntity != null, "IEntityWrapper instance is null."); 589Debug.Assert(wrappedEntity != null, "IEntityWrapper instance is null."); 657Debug.Assert(_wrappedRelatedEntities.Count == 0); 729Debug.Assert(this.RelationshipNavigation != null, "null RelationshipNavigation"); 823Debug.Assert(wrappedEntity != null, "IEntityWrapper instance is null."); 829Debug.Assert(wrappedEntity != null, "IEntityWrapper instance is null.");
System\Data\Objects\DataClasses\EntityObject.cs (9)
87Debug.Assert(EntityChangeTracker != null, 89Debug.Assert(EntityChangeTracker != s_detachedEntityChangeTracker ? EntityChangeTracker.EntityState != EntityState.Detached : true, 114Debug.Assert(EntityChangeTracker != null, "_entityChangeTracker should never be null -- if detached it should return s_detachedEntityChangeTracker"); 187Debug.Assert(EntityChangeTracker != null, "_entityChangeTracker should never be null -- if detached it should return s_detachedEntityChangeTracker"); 209Debug.Assert(EntityChangeTracker != null, "EntityChangeTracker should never return null -- if detached it should be return s_detachedEntityChangeTracker"); 243Debug.Assert(complexObject != null, "invalid complexObject"); 244Debug.Assert(!String.IsNullOrEmpty(complexMemberName), "invalid complexMemberName"); 266Debug.Assert(complexObject != null, "invalid complexObject"); 267Debug.Assert(!String.IsNullOrEmpty(complexMemberName), "invalid complexMemberName");
System\Data\Objects\DataClasses\EntityReference.cs (20)
92Debug.Assert(this.WrappedOwner.Entity != null, "Unexpected null Owner on EntityReference attached to a context"); 137Debug.Assert(attachedKey == null, "Found more than one non-Deleted relationship for the same AssociationSet and source role"); 144Debug.Assert(attachedKey == null || IsValidEntityKeyType(attachedKey), 175Debug.Assert(this.WrappedOwner.Entity != null, "Unexpected null Owner on EntityReference attached to a context"); 329Debug.Assert(this.ObjectContext != null && !UsingNoTracking, "Should only need to access AttachedEntityKey property on attached EntityReferences"); 405Debug.Assert(CachedForeignKey != null || EntityKey == null, "CachedForeignKey should not be null if EntityKey is not null."); 463Debug.Assert(dependentEntity.Entity != null, "dependentEntity.Entity == null"); 464Debug.Assert(principalEntity.Entity != null, "principalEntity.Entity == null"); 465Debug.Assert(this.IsForeignKey, "cannot update foreign key values if the relationship is not a FK"); 467Debug.Assert(constraint != null, "null constraint"); 533Debug.Assert(keyIndex >= 0 && keyIndex < numValues, "Could not find constraint prop name in entity set key names"); 567Debug.Assert(dependentEntity.Entity != null, "dependentEntity.Entity == null"); 568Debug.Assert(principalKey != null, "principalKey == null"); 569Debug.Assert(!principalKey.IsTemporary, "Cannot update from a temp key"); 570Debug.Assert(this.IsForeignKey, "cannot update foreign key values if the relationship is not a FK"); 572Debug.Assert(constraint != null, "null constraint"); 618Debug.Assert(RelationshipNavigation != null, "null RelationshipNavigation"); 629Debug.Assert(ObjectContext != null, "Nulling FKs only works when attached."); 630Debug.Assert(IsForeignKey, "Cannot null FKs for independent associations."); 646Debug.Assert(entry != null, "State entry must exist while detaching.");
System\Data\Objects\DataClasses\EntityReference_TResultType.cs (11)
259Debug.Assert(this.ObjectContext != null, "Should not be trying to add entities to state manager if context is null"); 372Debug.Assert(this.ObjectContext != null, "Should not be trying to remove entities from state manager if context is null"); 391Debug.Assert(IsForeignKey || relationshipEntry != null, "Should have been able to find a valid relationship since _cachedValue is non-null"); 557Debug.Assert(wrappedEntity != null, "IEntityWrapper instance is null."); 558Debug.Assert(null == _wrappedCachedValue.Entity || wrappedEntity.Entity == _wrappedCachedValue.Entity, "The specified object is not a part of this relationship."); 583Debug.Assert(wrappedEntity != null, "IEntityWrapper instance is null."); 598Debug.Assert(properties != null); 619Debug.Assert(retrievedProperties != null); 620Debug.Assert(constraint.FromProperties.Count == constraint.ToProperties.Count, "Referential constraints From/To properties list have different size"); 694Debug.Assert(this._wrappedCachedValue.Entity == null, "The EntityReference already has a value."); 705Debug.Assert(this.RelationshipNavigation != null, "null RelationshipNavigation");
System\Data\Objects\DataClasses\RelatedEnd.cs (77)
130add { Debug.Assert(false, "should never happen"); } 131remove { Debug.Assert(false, "should never happen"); } 144Debug.Assert(this.ObjectContext != null, "the IsForeignKey property shouldn't be used in detached scenarios"); 145Debug.Assert(this._relationMetadata != null, "this._relationMetadata == null"); 351Debug.Assert(stateEntry != null, "Entity should exist in the current context"); 363Debug.Assert(!(entityState != EntityState.Detached && UsingNoTracking), "Entity with NoTracking option cannot exist in the ObjectStateManager"); 381Debug.Assert(_relationshipSet != null, "If we are attached to a context, we should have a relationship set."); 390Debug.Assert(_relationshipSet.BuiltInTypeKind == BuiltInTypeKind.AssociationSet, "Non-AssociationSet Relationship Set?"); 420Debug.Assert(principalProps.Count == dependentProps.Count, "Mismatched foreign key properties?"); 473Debug.Assert(fkConstraint.FromRole.EdmEquals(_toEndProperty), "Source query for foreign key association related end is not based on principal or dependent?"); 572Debug.Assert(Helper.IsScalarType(parameterEdmType), "Only primitive or enum type expected for parameters"); 737Debug.Assert(_wrappedOwner != null, "Wrapper owner should never be null"); 866Debug.Assert(ownerEntry != null, "Both entities should be attached."); 869Debug.Assert(collection.Count == 1, "Dependant should attach to single principal"); 883Debug.Assert(targetEntry != null, "Both entities should be attached."); 936Debug.Assert(null != this.ObjectContext, 938Debug.Assert(!UsingNoTracking, "We should not be here for NoTracking case."); 951Debug.Assert(stateEntry.State != EntityState.Detached, 1002Debug.Assert(wrappedEntity != null, "IEntityWrapper instance is null."); 1049Debug.Assert(wrappedEntity != null, "IEntityWrapper instance is null."); 1102Debug.Assert(set != null, "null EntitySet"); 1103Debug.Assert(_relationshipSet != null, 1115Debug.Assert(wrappedEntity != null, "IEntityWrapper instance is null."); 1130Debug.Assert(wrappedTarget != null, "IEntityWrapper instance is null."); 1298Debug.Assert(this.CheckIfNavigationPropertyContainsEntity(wrappedTarget), "owner's navigation property doesn't contain the target entity as expected"); 1308Debug.Assert(entityToAdd != null, "entityToAdd should be set if attachedRelatedEnd is set"); 1341Debug.Assert(this is EntityReference, "Dependent end cannot be a collection."); 1346Debug.Assert(targetRelatedEnd is EntityReference, "Dependent end cannot be a collection."); 1360Debug.Assert(wrappedEntity != null, "IEntityWrapper instance is null."); 1361Debug.Assert(!UsingNoTracking, "Should not be attempting to add graphs to the state manager with NoTracking related ends"); 1569Debug.Assert(wrappedEntity != null, "IEntityWrapper instance is null."); 1570Debug.Assert(!UsingNoTracking, "Should not be trying to include entities in the state manager for NoTracking related ends"); 1576Debug.Assert(cacheEntry == null || cacheEntry.Entity == wrappedEntity.Entity, 1603Debug.Assert(ObjectContext != null, "Expected attached context at this point."); 1694Debug.Assert(IsForeignKey, "cannot update foreign key values if the relationship is not a FK"); 1696Debug.Assert(constraint != null, "null constraint"); 1699Debug.Assert(dependentEntry != null, "Expected tracked entity."); 1718Debug.Assert(this.RelationshipNavigation != null, "null RelationshipNavigation"); 1722Debug.Assert(wrapper.Context != null, "Expected context to be available."); 1736Debug.Assert(this.RelationshipNavigation != null, "null RelationshipNavigation"); 1748Debug.Assert(wrappedEntity != null, "IEntityWrapper instance is null."); 1749Debug.Assert(!UsingNoTracking, "Should not try to exclude entities from the state manager for NoTracking related ends."); 1781Debug.Assert(wrappedEntity != null, "IEntityWrapper instance is null."); 1782Debug.Assert(!UsingNoTracking, "Should not look for RelationshipEntry in ObjectStateManager for NoTracking cases."); 1810Debug.Assert(this is EntityReference, "Expected reference to principal"); 1911Debug.Assert(constraint.FromProperties.Count == constraint.ToProperties.Count, "RIC: Referential constraints From/To properties list have different size"); 1922Debug.Assert(currentValue != null, "currentValue is part of Key on an attached entity, it must not be null"); 2046Debug.Assert(this.IsEmpty(), "Collection or reference should be empty"); 2093Debug.Assert(!(entity is IEntityWrapper), "Object is an IEntityWrapper instance instead of the raw entity."); 2105Debug.Assert(wrappedEntity != null, "IEntityWrapper instance is null."); 2106Debug.Assert(_context != null, "Can't add to state manager if _context is null"); 2107Debug.Assert(!UsingNoTracking, "Should not add an Entity to ObjectStateManager for NoTracking cases."); 2136Debug.Assert(associationSet != null, "(AssociationSet) cast failed"); 2139Debug.Assert(associationEndMember != null, "(AssociationEndMember) cast failed"); 2142Debug.Assert(entitySet != null, "cannot find entitySet"); 2148Debug.Assert(wrappedEntity != null, "IEntityWrapper instance is null."); 2149Debug.Assert(!UsingNoTracking, "Should not add Relationship to ObjectStateManager for NoTracking cases."); 2150Debug.Assert(!this.IsForeignKey, "for IsForeignKey relationship ObjectStateEntries don't exist"); 2151Debug.Assert(this._context != null && wrappedEntity.Context != null, "should be called only if both entities are attached"); 2152Debug.Assert(this._context == wrappedEntity.Context, "both entities should be attached to the same context"); 2171Debug.Assert(wrappedEntity != null, "IEntityWrapper instance is null."); 2180Debug.Assert(wrappedEntity != null, "IEntityWrapper instance is null."); 2203Debug.Assert(wrappedEntity != null, "IEntityWrapper instance is null."); 2204Debug.Assert(relationshipSet == null || !(relationshipSet.ElementType as AssociationType).IsForeignKey, "for IsForeignKey relationships ObjectStateEntries don't exist"); 2215Debug.Assert(wrappedEntity != null, "IEntityWrapper instance is null."); 2223Debug.Assert(wrappedEntity != null, "IEntityWrapper instance is null."); 2239Debug.Assert(wrappedEntity != null, "IEntityWrapper instance is null."); 2240Debug.Assert(relationshipSet == null || !(relationshipSet.ElementType as AssociationType).IsForeignKey, "for IsForeignKey relationships ObjectStateEntries don't exist"); 2256Debug.Assert(wrappedEntity != null, "IEntityWrapper instance is null."); 2273Debug.Assert(wrappedEntity1 != null, "IEntityWrapper instance is null."); 2274Debug.Assert(wrappedEntity2 != null, "IEntityWrapper instance is null."); 2365Debug.Assert(!foundFromRelationEnd, "More than one related end was found with the same role name."); 2372Debug.Assert(!foundToRelationEnd, "More than one related end was found with the same role name."); 2421Debug.Assert(context.MetadataWorkspace != null, "The context should not have a null metadata workspace."); 2483Debug.Assert(wrappedEntity != null, "IEntityWrapper instance is null."); 2591Debug.Assert(_navigation != null, "Null RelationshipNavigation"); 2592Debug.Assert(_wrappedOwner.Entity != null, "Must be connected to lookup metadata");
System\Data\Objects\DataClasses\RelationshipManager.cs (46)
170Debug.Assert(_owner != null || !(wrappedOwner.Entity is IEntityWithRelationships), "_owner should only be null if entity is not IEntityWithRelationships"); 222Debug.Assert(collection != null, "should never receive anything but an EntityCollection here"); 235Debug.Assert(existingRelatedEnd._onAssociationChanged == null, "Disconnected RelatedEnd had events"); 239Debug.Assert(_relationships != null, "Expected _relationships to be non-null."); 259Debug.Assert(_relationships != null, "Expected _relationships to be non-null."); 280Debug.Assert(collection != null, "collection is null"); 355Debug.Assert(entityRef != null, "should never receive anything but an EntityReference here"); 374Debug.Assert(wrappedOwner.Entity != null, "Entity is null"); 375Debug.Assert(wrappedOwner.Context != null, "Context is null"); 376Debug.Assert(wrappedOwner.Context.MetadataWorkspace != null, "MetadataWorkspace is null"); 377Debug.Assert(wrappedOwner.Context.Perspective != null, "Perspective is null"); 442Debug.Assert(associationType != null, "associationType is null"); 456Debug.Assert(relationshipName != null, "null relationshipNameFromUser"); 457Debug.Assert(targetRoleName != null, "null targetRoleName"); 459Debug.Assert(relationship != null, "null relationshipType"); 463Debug.Assert(relationship.AssociationEndMembers.Count == 2, "Only 2-way relationships are currently supported"); 493Debug.Assert(sourceEntityType.DataSpace == DataSpace.OSpace && sourceEntityType.ClrType != null, "sourceEntityType must contain an ospace type"); 554Debug.Assert(_relationships != null, "Expected _relationships to be non-null."); 641Debug.Assert(!string.IsNullOrEmpty(ns), "Expected non-empty namespace for type."); 848Debug.Assert(association.AssociationSetEnds[sourceEndName].EntitySet == entitySet, "AssociationSetEnd does have the matching EntitySet"); 914Debug.Assert(null != relatedEnd, "CreateSourceEnd should always return a valid RelatedEnd"); 943Debug.Assert(wrappedOwner.Context == null || wrappedOwner.MergeOption == MergeOption.NoTracking, "Expected null context when initializing an existing related end"); 955Debug.Assert(wrappedOwner.Context == null || wrappedOwner.MergeOption == MergeOption.NoTracking, "Expected null context or NoTracking when initializing an existing related end"); 994Debug.Assert(wrappedOwner.EntityKey != null, "null entityKey on a attached entity"); 1078Debug.Assert(wrappedOwner.Context != null && wrappedOwner.Context.ObjectStateManager != null, "Null context or ObjectStateManager"); 1094Debug.Assert(doAttach == (transManager.IsAttachTracking), "In attach the recovery collection should be not null"); 1117Debug.Assert(wrappedEntity != null, "IEntityWrapper instance is null."); 1123Debug.Assert(!relatedEnd.UsingNoTracking, "Shouldn't be touching the state manager with entities that were retrieved with NoTracking"); 1165Debug.Assert(dependentEnd is EntityReference, "Dependent end in FK relationship should always be a reference."); 1195Debug.Assert(wrappedEntity != null, "IEntityWrapper instance is null."); 1222Debug.Assert(wrappedOwner.Entity != null); 1223Debug.Assert(visited != null); 1229Debug.Assert((object)ownerKey != null); 1272Debug.Assert(entry != null, "Owner entry not found in the object state manager"); 1293Debug.Assert(entry != null, "Owner entry not found in the object state manager"); 1301Debug.Assert(properties != null); 1302Debug.Assert(propertiesToRetrieve != null); 1364Debug.Assert(ownerEntry != null); 1437Debug.Assert(wrappedOwner.Entity != null); 1446Debug.Assert(entitySet != null, "Unable to find entity set"); 1493Debug.Assert(wrappedEntity != null, "IEntityWrapper instance is null."); 1502Debug.Assert(null != context, "context"); 1503Debug.Assert(null != entitySet, "entitySet"); 1539Debug.Assert(null != context, "context"); 1540Debug.Assert(null != entitySet, "entitySet"); 1583Debug.Assert(false, "Cannot change a state of a Deleted entity if the entity has other than deleted relationships with other entities.");
System\Data\Objects\ELinq\CompiledELinqQueryState.cs (3)
55Debug.Assert(this.Span == null, "Include span specified on compiled LINQ-based ObjectQuery instead of within the expression tree?"); 56Debug.Assert(this._cachedPlan == null, "Cached plan should not be set on compiled LINQ queries"); 176Debug.Assert(plan != null, "Failed to produce an execution plan?");
System\Data\Objects\ELinq\ELinqQueryState.cs (2)
94Debug.Assert(this.Span == null, "Include span specified on compiled LINQ-based ObjectQuery instead of within the expression tree?"); 243Debug.Assert(includeMethod != null, "Unable to find ObjectQuery.Include method?");
System\Data\Objects\ELinq\ExpressionConverter.cs (12)
289Debug.Assert(null != metadata); 433Debug.Assert(leftSpan != null || rightSpan != null, "Span mappings contain null?"); 629Debug.Assert(operationType == ExpressionType.TypeAs || operationType == ExpressionType.TypeIs); 725Debug.Assert(availableParams != null, "Parameter collection cannot be null"); 843Debug.Assert(null != input); 907Debug.Assert(null != linq); 976Debug.Assert(null != left); 977Debug.Assert(null != right); 1300Debug.Fail("unknown pattern"); 1328Debug.Fail("unexpected pattern"); 1380Debug.Assert(preparedValue != null, "The prepared value should not be null when the input is non-null"); 1512Debug.Assert(null != candidateFunctions && candidateFunctions.Count > 0, "provider functions must not be null or empty");
System\Data\Objects\ELinq\Funcletizer.cs (1)
138Debug.Assert(_mode == Mode.ConventionalQuery, "No other options...");
System\Data\Objects\ELinq\InitializerFacet.cs (12)
40Debug.Assert(null != clrType); 106Debug.Fail("use typed Equals method only"); 112Debug.Assert(null != other, "must not use a null key"); 220Debug.Assert(ClrType.IsGenericType && 222Debug.Assert(propertyTranslatorResults.Count == 2); 237Debug.Assert(ClrType.IsGenericType && 257Debug.Assert(null != newExpression); 356Debug.Assert(null != initExpression); 357Debug.Assert(null != members); 446Debug.Assert(null != navigationProperty); 471Debug.Assert(propertyTranslatorResults.Count > 1, "no properties?"); 472Debug.Assert(propertyTranslatorResults[1] is CollectionTranslatorResult, "not a collection?");
System\Data\Objects\ELinq\LinqExpressionNormalizer.cs (2)
430Debug.Fail("This method should never be called. It exists merely to support creation of relational LINQ expressions."); 442Debug.Fail("CreateRelationalOperator has unknown op " + op);
System\Data\Objects\ELinq\MethodCallTranslator.cs (33)
178Debug.Assert(!s_vbMethodsInitialized); 351Debug.Assert(convertExpression.Type.IsGenericType && typeof(ObjectQuery<>) == convertExpression.Type.GetGenericTypeDefinition(), "MethodCall with internal MergeAs/IncludeSpan method was not constructed by LINQ to Entities?"); 376Debug.Assert(translatorFound, "Translator not found for " + sequenceEquivalent.ToString()); 434Debug.Assert(call.Object != null && call.Arguments.Count == 1 && call.Arguments[0] != null && call.Arguments[0].Type.Equals(typeof(string)), "Invalid Include arguments?"); 470Debug.Assert(call.Object != null && call.Arguments.Count == 1 && call.Arguments[0] != null && call.Arguments[0].Type.Equals(typeof(MergeOption)), "Invalid MergeAs arguments?"); 506Debug.Assert(call.Object != null && call.Arguments.Count == 1 && call.Arguments[0] != null && call.Arguments[0].Type.Equals(typeof(Span)), "Invalid IncludeSpan arguments?"); 507Debug.Assert(call.Arguments[0].NodeType == ExpressionType.Constant, "Whenever an IncludeSpan MethodCall is inlined, the argument must be a constant"); 583Debug.Assert(!s_vbMethodsInitialized); 863Debug.Assert(call.Object != null, "Instance method without this"); 1017Debug.Assert(call.Arguments.Count == 1, "Expecting 1 argument for String.IndexOf"); 1106Debug.Assert(call.Arguments.Count == 1 || call.Arguments.Count == 2, "Expecting 1 or 2 arguments for String.Substring"); 1145Debug.Assert(call.Arguments.Count == 1 || call.Arguments.Count == 2, "Expecting 1 or 2 arguments for String.Remove"); 1224Debug.Assert(call.Arguments.Count == 2, "Expecting 2 arguments for String.Insert"); 1267Debug.Assert(call.Arguments.Count == 1, "Expecting 1 argument for String.IsNullOrEmpty"); 1300Debug.Assert(call.Arguments.Count >= 2 && call.Arguments.Count <= 4, "Expecting between 2 and 4 arguments for String.Concat"); 1499Debug.Assert(call.Arguments.Count == 4, "Expecting 4 arguments for Microsoft.VisualBasic.DateAndTime.DatePart"); 1542Debug.Assert(call.Arguments.Count == 2, "Skip and Take must have 2 arguments"); 1574Debug.Assert(5 == call.Arguments.Count); 1672Debug.Assert(1 == call.Arguments.Count); 1680Debug.Assert(2 == call.Arguments.Count); 1748Debug.Assert(isUnary || 2 == call.Arguments.Count); 1788Debug.Assert(parent != null, "parent != null"); 1789Debug.Assert(call != null, "call != null"); 1863Debug.Assert(parent != null, "parent != null"); 1864Debug.Assert(call != null, "call != null"); 1906Debug.Assert(parent != null, "parent != null"); 1907Debug.Assert(call != null, "call != null"); 2026Debug.Assert(0 <= call.Arguments.Count); 2033Debug.Assert(1 <= call.Arguments.Count); 2115Debug.Assert(2 <= call.Arguments.Count); 2332Debug.Assert(TypeSemantics.IsScalarType(element.ResultType), "Primitive or enum type expected at this point."); 2840Debug.Fail("unreachable code"); 3014Debug.Assert(2 == call.Arguments.Count);
System\Data\Objects\ELinq\ObjectQueryProvider.cs (2)
38Debug.Assert(null != context, "context must be given"); 51Debug.Assert(null != query, "query must be given");
System\Data\Objects\ELinq\OrderByLifter.cs (1)
250Debug.Fail("only valid for integer constants");
System\Data\Objects\ELinq\SpatialMethodCallTranslator.cs (4)
46Debug.Assert(method.IsStatic && method.IsPublic && 55Debug.Assert(!method.IsStatic && method.IsPublic && 239Debug.Assert(call.Object == null, "Static method call with instance argument?"); 244Debug.Assert(call.Object != null, "Instance method call with no instance argument?");
System\Data\Objects\ELinq\SpatialPropertyTranslator.cs (2)
46Debug.Assert(property.GetGetMethod().IsPublic && 157Debug.Assert(call.Expression != null, "No static spatial properties currently map to canonical functions");
System\Data\Objects\ELinq\Translator.cs (5)
364Debug.Assert(clrMember is PropertyInfo, "Navigation property was not a property; should not be allowed by metadata."); 387Debug.Assert(null != countMethod, "Count() must exist"); 395Debug.Assert(!s_vbPropertiesInitialized); 667Debug.Assert(!TypeSemantics.IsCollectionType(argument.ResultType), "Did not expect collection type"); 687Debug.Assert(!TypeSemantics.IsCollectionType(argument.ResultType), "Did not expect collection type");
System\Data\Objects\ELinq\TypeSystem.cs (5)
82default: Debug.Fail("unexpected argument count"); delegateType = null; break; 91Debug.Assert(null != expression, "expression required"); 92Debug.Assert(null != requiredType, "requiredType"); 242Debug.Assert(interfaceType.IsInterface, "Ensure interfaceType is an interface before calling IsImplementationOf"); 257Debug.Assert(Enumerable.Contains(propertyInfo.DeclaringType.GetInterfaces(), interfaceType), "Ensure propertyInfo.DeclaringType implements interfaceType before calling IsImplementationOf");
System\Data\Objects\EntityEntry.cs (152)
63Debug.Assert(wrappedEntity != null, "entity wrapper cannot be null."); 64Debug.Assert(wrappedEntity.Entity != null, "entity cannot be null."); 65Debug.Assert(typeMetadata != null, "typeMetadata cannot be null."); 66Debug.Assert(entitySet != null, "entitySet cannot be null."); 67Debug.Assert((null == (object)entityKey) || (entityKey.EntitySetName == entitySet.Name), "different entitySet"); 104Debug.Assert((object)entityKey != null, "entityKey cannot be null."); 105Debug.Assert(entitySet != null, "extent cannot be null."); 106Debug.Assert(typeMetadata != null, "typeMetadata cannot be null."); 107Debug.Assert(entityKey.EntitySetName == entitySet.Name, "different entitySet"); 193Debug.Assert(null != _modifiedFields, "null fields"); 214Debug.Assert(State == EntityState.Unchanged || State == EntityState.Modified, "ValidateAndGetOrdinalForProperty should have thrown."); 287Debug.Assert(State == EntityState.Modified, "Should have handled all other states above."); 431Debug.Assert(!this.IsKeyEntry || State == EntityState.Unchanged, "Key ObjectStateEntries must always be unchanged."); 445Debug.Assert(Entity != null, "Non-relationship entries should have a non-null entity."); 446Debug.Assert((object)_entityKey != null, "All entities in the state manager should have a non-null EntityKey."); 447Debug.Assert(_entityKey.IsTemporary, "All entities in the Added state should have a temporary EntityKey."); 633Debug.Assert(_countRelationshipEnds == (new RelationshipEndEnumerable(this)).ToArray().Length, "different count"); 661Debug.Assert(null != item, "removing null"); 662Debug.Assert(null != item.RelationshipWrapper, "null RelationshipWrapper"); 663Debug.Assert(1 <= _countRelationshipEnds, "negative _relationshipEndCount"); 664Debug.Assert(EntityKey.Equals(item.RelationshipWrapper.Key0) || EntityKey.Equals(item.RelationshipWrapper.Key1), "entity key doesn't match"); 680Debug.Assert(EntityKey.Equals(current.RelationshipWrapper.Key0), "entity key didn't match"); 686Debug.Assert(EntityKey.Equals(current.RelationshipWrapper.Key1), "entity key didn't match"); 704Debug.Assert(_countRelationshipEnds == (new RelationshipEndEnumerable(this)).ToArray().Length, "different count"); 707Debug.Assert(!item.RelationshipWrapper.Equals(current.RelationshipWrapper), "same wrapper, different RelationshipEntry instances"); 713Debug.Assert(false, "didn't remove a RelationshipEntry"); 723Debug.Assert(null != (object)oldKey, "bad oldKey"); 724Debug.Assert(!Object.ReferenceEquals(this, promotedEntry), "shouldn't be same reference"); 747Debug.Assert(count == _countRelationshipEnds, "didn't traverse all relationships"); 783Debug.Assert(false, "dead code, don't box the RelationshipEndEnumerable"); 788Debug.Assert(false, "dead code, don't box the RelationshipEndEnumerable"); 804Debug.Assert(null != relationshipEnd, "count larger than list"); 805Debug.Assert(_entityEntry.EntityKey.Equals(relationshipEnd.Key0) || _entityEntry.EntityKey.Equals(relationshipEnd.Key1), "entity key mismatch"); 810Debug.Assert(null == relationshipEnd, "count smaller than list"); 841Debug.Assert(false, "dead code, don't box the RelationshipEndEnumerator"); 865Debug.Assert(false, "not implemented"); 903Debug.Assert(_cache != null, "Cannot Reset an entity that is not currently attached to a context."); 956Debug.Assert(entry.State == EntityState.Deleted, "Relationship ObjectStateEntry should be in deleted state"); 963Debug.Assert(!this.IsKeyEntry, "SetModifiedAll called on a KeyEntry"); 964Debug.Assert(State == EntityState.Modified, "SetModifiedAll called when not modified"); 1132Debug.Assert(relatedEnd != null, "relatedEnd should exist if property is a foreign key"); 1134Debug.Assert(reference != null, "relatedEnd should be an EntityReference"); 1182Debug.Assert(_cache != null, "Unexpected null state manager."); 1271Debug.Assert(changingOrdinal != -1, "Expected GetAndValidateChangeMemberInfo to throw for a invalid property name"); 1287Debug.Assert(this.State != EntityState.Detached, "Change tracking should not happen on detached entities."); 1300Debug.Assert(updatableRecord != ObjectStateValueRecord.OriginalUpdatablePublic, "OriginalUpdatablePublic records must preserve complex type information, use the overload that takes parentEntityPropertyIndex"); 1320Debug.Assert(updatableRecord != ObjectStateValueRecord.OriginalUpdatablePublic, "OriginalUpdatablePublic records must preserve complex type information, use the overload that takes parentEntityPropertyIndex"); 1330Debug.Assert(null != member, "didn't throw ArgumentOutOfRangeException"); 1359Debug.Assert(false, "shouldn't happen"); 1409Debug.Assert((object)this.EntityKey != null, "entry should have a not null EntityKey"); 1414Debug.Assert(null != endMember, "should be one of the ends of the relationship"); 1422Debug.Assert((object)this.EntityKey != null, "entry should have a not null EntityKey"); 1441Debug.Assert(memberMetadata.IsComplex, "Cannot expand non-complex objects"); 1446Debug.Assert(oldComplexObject == null || (oldComplexObject.GetType() == newComplexObject.GetType()), "Cannot replace a complex object with an object of a different type, unless the original one was null"); 1494Debug.Assert(this.Entity is IEntityWithChangeTracker, "for POCO objects the snapshot should contain all original values"); 1562Debug.Assert(this.State != EntityState.Detached, "Change tracking should not happen on detached entities."); 1641Debug.Assert(!this.IsKeyEntry, "should not edit original key entry"); 1642Debug.Assert(EntityState.Modified == State || 1675Debug.Assert(!this.IsKeyEntry); 1714Debug.Assert(reference != null, "EntityReference expected"); 1715Debug.Assert(pair.Value.Count == 1, "Unexpected number of keys"); 1727Debug.Assert(member.IsComplex, "Cannot expand non-complex objects"); 1757Debug.Assert(userObject != null, "null userObject"); 1758Debug.Assert(ordinal >= 0, "invalid ordinal"); 1779Debug.Assert(!ordinal2complexObject.ContainsKey(ordinal), "shouldn't contain this ordinal yet"); 1840Debug.Assert(_cache.SaveOriginalValues, "complex object instance was changed so the SaveOriginalValues flag should be set to true"); 1871Debug.Assert(originalValueFound, "Original value not found even after snapshot."); 1906Debug.Assert(!this.IsKeyEntry, "Entry should be an EntityEntry"); 1907Debug.Assert(this.State != EntityState.Added, "This method should not be called for entries in Added state"); 1924Debug.Assert(complexMember.IsComplex, "Cannot expand non-complex objects"); 1942Debug.Assert(oldComplexValue != null, "original complex type value should not be null at this point"); 2000Debug.Assert(!member.IsPartOfKey, "Found member of complex type that is part of a key"); 2044Debug.Assert(ordinal2complexObject != null, "value should already exists"); 2092Debug.Assert(EntitySet is EntitySet, "Expect entity entries to have true entity sets."); 2103Debug.Assert(reference != null, "Expected reference to exist and be an entity reference (not collection)"); 2114Debug.Assert(principalEntry is EntityEntry, "Existing entry for an entity must be an EntityEntry, not a RelationshipEntry"); 2125Debug.Assert(this._wrappedEntity != null, "wrapped entity shouldn't be null"); 2126Debug.Assert(!(this._wrappedEntity.Entity is IEntityWithRelationships), "this method should be called only for entities which don't implement IEntityWithRelationships"); 2177Debug.Assert(this.ObjectStateManager.TransactionManager.IsAddTracking || 2189Debug.Assert(relatedWrapper.ObjectStateEntry != null, "Expected related entity to be tracked in snapshot code."); 2247Debug.Assert(!this.IsKeyEntry, "Entry should be an EntityEntry"); 2248Debug.Assert(!(this.Entity is IEntityWithRelationships), "Entity shouldn't implement IEntityWithRelationships"); 2258Debug.Assert(relatedEnd != null, "relatedEnd is null"); 2343Debug.Assert(!relatedKey.IsTemporary, "the relatedKey was created by a method which returns only permaanent keys"); 2389Debug.Assert(objectsInRelatedEnd.Count() == 1, "unexpected number of entities for EntityReference"); 2411Debug.Assert(!this.IsKeyEntry); 2416Debug.Assert(relationshipManager != null, "Entity wrapper returned a null RelationshipManager"); 2493Debug.Assert(EntityState.Added == State, "Expected ObjectStateEntry state is Added; make sure FixupRelationship did not corrupt cache entry state"); 2497Debug.Assert(null == _modifiedFields, "There should not be any modified fields"); 2508Debug.Assert(EntityState.Modified == State, "Expected ObjectStateEntry state is Modified; make sure FixupRelationship did not corrupt cache entry state"); 2521Debug.Assert(State == EntityState.Unchanged, "Unexpected state"); 2522Debug.Assert(EntityState.Unchanged == State, "Expected ObjectStateEntry state is Unchanged; make sure FixupRelationship did not corrupt cache entry state"); 2524Debug.Assert(null == _modifiedFields, "There should not be any modified fields"); 2543Debug.Assert(relatedEnd != null, "Expected non-null EntityReference to principal."); 2573Debug.Assert(relationshipManager != null, "Unexpected null RelationshipManager"); 2574Debug.Assert(!this.IsKeyEntry, "Should only be detaching relationships with key entries if the source is not a key entry"); 2580Debug.Assert((object)targetKey != null, "EntityKey not on either side of relationship as expected"); 2620Debug.Assert(relationshipManager != null, "Entity wrapper returned a null RelationshipManager"); 2675Debug.Assert(relationshipManager != null, "Entity wrapper returned a null RelationshipManager"); 2724Debug.Assert(association != null, "relationship is not an association"); 2735Debug.Assert(!otherEnd.EntityKey.IsTemporary, "key of key entry can't be temporary"); 2737Debug.Assert(otherEndKeyValues != null, "key entry must have key values"); 2758Debug.Assert(properties != null); 2759Debug.Assert(propertyName != null); 2760Debug.Assert(propertyValue != null); 2797Debug.Assert(association != null, "relationship is not an association"); 2808Debug.Assert(!otherEnd.EntityKey.IsTemporary, "key of Unchanged or Modified entry can't be temporary"); 2832Debug.Assert(wrappedEntity != null, "entity wrapper cannot be null."); 2833Debug.Assert(wrappedEntity.Entity != null, "entity cannot be null."); 2834Debug.Assert(this.IsKeyEntry, "ObjectStateEntry should be a key."); 2835Debug.Assert(typeMetadata != null, "typeMetadata cannot be null."); 2866Debug.Assert(!this.IsKeyEntry); 2867Debug.Assert((object)_entityKey != null); 2903Debug.Assert(this.IsKeyEntry); 2909Debug.Assert(_wrappedEntity.Entity != null, "Cannot attach a null entity to the state manager"); 2917Debug.Assert(properties != null); 2918Debug.Assert(_cacheTypeMetadata != null); 2919Debug.Assert(_cacheTypeMetadata.DataRecordInfo != null); 2920Debug.Assert(_cacheTypeMetadata.DataRecordInfo.RecordType != null); 2923Debug.Assert(entityType != null, "EntityType == null"); 2945Debug.Assert(changed != null, "changed object is null"); 2946Debug.Assert(!this.IsKeyEntry); 2959Debug.Assert(!member.IsComplex); 2990Debug.Assert(typeMetadata != null, "Cannot verify entity or complex object is editable if typeMetadata is null."); 2993Debug.Assert(member != null, "Member shouldn't be null."); 3014Debug.Assert(member != null, "StateManagerMemberMetadata was not found for the given ordinal."); 3059Debug.Assert(!this.IsKeyEntry, "shouldn't be called for a key entry"); 3234Debug.Fail("detached entry"); 3241Debug.Assert(EntityState.Added != this.State, "Cannot change original values of an entity in the Added state"); 3274Debug.Assert(null != value, "null value"); 3275Debug.Assert(null != current, "null CurrentValueRecord"); 3276Debug.Assert(!(value is IEntityWrapper)); 3277Debug.Assert(propertyIndex == s_EntityRoot || 3312Debug.Assert(Helper.IsScalarType(field.FieldType.TypeUsage.EdmType), "Expected primitive or enum type."); 3343Debug.Assert(!IsKeyEntry, "Cannot apply values to a key KeyEntry."); 3344Debug.Assert(wrappedCurrentEntity != null, "null entity wrapper"); 3364Debug.Assert(!(value is IEntityWrapper)); 3370Debug.Assert(!IsKeyEntry, "Cannot apply values to a key KeyEntry."); 3371Debug.Assert(wrappedOriginalEntity != null, "null entity wrapper"); 3418Debug.Assert(_cache != null, "Attempt to fixup detached entity entry"); 3427Debug.Assert(relatedEnd != null, "Expected non-null EntityReference to principal."); 3498Debug.Assert(_cache != null, "Unexpected null state manager."); 3521Debug.Assert(relatedEnd != null, "Found null RelatedEnd or EntityCollection to principal"); 3556Debug.Assert(_cache.TransactionManager.IsAddTracking || _cache.TransactionManager.IsAttachTracking, 3655Debug.Assert(relatedEnd != null, "Expected there to be a non null EntityReference to the principal"); 3672Debug.Assert(_cache != null, "Attempt to fixup detached entity entry"); 3703Debug.Assert(reference != null, "Expected reference to exist and be an entity reference (not collection)"); 3759Debug.Assert(dependentEntry != null, "Should have fully tracked graph at this point."); 3783Debug.Assert(principalRef != null, "Expected reference to exist and be an entity reference (not collection)"); 3844Debug.Assert(associationSet.AssociationSetEnds.Count == 2, "Expected an association set with only two ends."); 3907Debug.Assert(this.State == EntityState.Added || this.State == EntityState.Modified, "unexpected state"); 3931Debug.Assert(!originalKeyIsConceptualNull, "If FK is nullable there shouldn't be a conceptual null set");
System\Data\Objects\FieldDescriptor.cs (2)
46System.Diagnostics.Debug.Assert(_fieldType != null, "FieldDescriptor's CLR type has unexpected value of null."); 93Debug.Fail(string.Format(CultureInfo.CurrentCulture, "The type {0} was not the expected scalar, enumeration, collection, structural, nominal, or reference type.", edmType.GetType()));
System\Data\Objects\Internal\BaseEntityWrapper.cs (9)
47Debug.Assert(!(entity is IEntityWrapper), "Object is an IEntityWrapper instance instead of the raw entity."); 48Debug.Assert(entity != null, "Factory should ensure wrapped entity here is never null."); 71Debug.Assert(!(entity is IEntityWrapper), "Object is an IEntityWrapper instance instead of the raw entity."); 72Debug.Assert(entity != null, "Factory should ensure wrapped entity here is never null."); 114Debug.Assert(value == MergeOption.AppendOnly || value == MergeOption.NoTracking, "Merge option must be one of NoTracking or AppendOnly."); 149Debug.Assert(null != context, "context"); 161Debug.Assert(null != entitySet, "entitySet should not be null"); 162Debug.Assert(null != context, "context"); 163Debug.Assert(MergeOption.NoTracking == mergeOption ||
System\Data\Objects\Internal\ComplexTypeMaterializer.cs (22)
34Debug.Assert(null != record, "null IExtendedDataRecord"); 35Debug.Assert(null != recordInfo, "null DataRecordInfo"); 36Debug.Assert(null != recordInfo.RecordType, "null TypeUsage"); 37Debug.Assert(null != recordInfo.RecordType.EdmType, "null EdmType"); 39Debug.Assert(Helper.IsEntityType(recordInfo.RecordType.EdmType) || 54Debug.Assert(null != record, "null IExtendedDataRecord"); 55Debug.Assert(null != result, "null object"); 56Debug.Assert(null != properties, "null object"); 96Debug.Assert(null != record, "null IExtendedDataRecord"); 97Debug.Assert(null != recordInfo, "null DataRecordInfo"); 98Debug.Assert(null != recordInfo.RecordType, "null TypeUsage"); 117Debug.Assert(0 <= index, "negative index"); 118Debug.Assert(index != _lastPlanIndex || (null == plans[index]), "index wrapped around"); 122Debug.Assert(null != mapping, "null ObjectTypeMapping"); 124Debug.Assert(Helper.IsComplexType(recordInfo.RecordType.EdmType), 140Debug.Assert(null != mapping, "null ObjectTypeMapping"); 141Debug.Assert(null != fields, "null FieldMetadata"); 144Debug.Assert(!Helper.IsEntityType(mapping.ClrType), "Expecting complex type"); 153Debug.Assert(unchecked((uint)field.Ordinal) < unchecked((uint)fields.Count), "FieldMetadata.Ordinal out of range of Fields.Count"); 154Debug.Assert(lastOrdinal < field.Ordinal, "FieldMetadata.Ordinal is not increasing"); 170Debug.Assert(0 <= ordinal, "negative ordinal"); 171Debug.Assert(null != property, "unsupported shadow state");
System\Data\Objects\Internal\EntityProxyFactory.cs (22)
130Debug.Assert(instance != null, "the instance should not be null"); 154Debug.Assert(ospaceEntityType != null, "ospaceEntityType must be non-null"); 155Debug.Assert(ospaceEntityType.DataSpace == DataSpace.OSpace, "ospaceEntityType.DataSpace must be OSpace"); 212Debug.Assert(ospaceEntityTypes != null, "ospaceEntityTypes must be non-null"); 223Debug.Assert(ospaceEntityType != null, "Null EntityType element reference present in enumeration."); 235Debug.Assert(s_TypeMapLock.IsUpgradeableReadLockHeld, "EntityProxyTypeInfo.TryCreateProxyType method was called without first acquiring an upgradeable read lock from s_TypeMapLock."); 277Debug.Assert(type != null, "type is null, was this intended?"); 309Debug.Assert(propertyInfo != null, "Null propertyInfo"); 348Debug.Assert(propertyInfo != null, "Null propertyInfo"); 391Debug.Assert(s_TypeMapLock.IsUpgradeableReadLockHeld, "EntityProxyTypeInfo.BuildType method was called without first acquiring an upgradeable read lock from s_TypeMapLock."); 461Debug.Assert(property != null, String.Format(CultureInfo.CurrentCulture, "Expected property {0} to be defined on proxy type {1}", member.Name, proxyType.FullName)); 464Debug.Assert(interceptorField != null, String.Format(CultureInfo.CurrentCulture, "Expected interceptor field for property {0} to be defined on proxy type {1}", member.Name, proxyType.FullName)); 498Debug.Assert(resetFKSetterFlagField != null, "Expected resetFKSetterFlagField to be defined on the proxy type."); 513Debug.Assert(getEntityWrapperDelegate != null, "entityWrapperDelegate must not be null"); 527Debug.Assert(wrappedEntityAsObject == null || wrappedEntityAsObject is IEntityWrapper, "wrappedEntityAsObject must be an IEntityWrapper"); 542Debug.Assert(compareByteArraysField != null, "Expected compareByteArraysField to be defined on the proxy type."); 599Debug.Assert(clrProperty != null, "clrProperty should have a value"); 605Debug.Assert(clrProperty != null, "clrProperty should have a value"); 801Debug.Assert(false, "Unable to find ScriptIgnoreAttribute type"); 1207Debug.Assert(member != null, "member is null"); 1208Debug.Assert(member.BuiltInTypeKind == BuiltInTypeKind.NavigationProperty); 1586Debug.Assert(!(_canOverride && (_getObjectDataMethod == null || _serializationConstructor == null)), "Both GetObjectData method and Serialization Constructor must be present when proxy overrides ISerializable implementation.");
System\Data\Objects\Internal\EntityProxyTypeInfo.cs (5)
48Debug.Assert(proxyType != null, "proxyType must be non-null"); 81Debug.Assert(entityWrapperField != null, "entityWrapperField does not exist"); 180Debug.Assert(ospaceEntityType.ClrType == _entityType.ClrType); 198Debug.Assert(wrapper != null, "wrapper must be non-null"); 199Debug.Assert(wrapper.Entity != null, "proxy must be non-null");
System\Data\Objects\Internal\EntitySqlQueryBuilder.cs (15)
55Debug.Assert(builderMethodParams != null, "params array argument should not be null"); 156Debug.Assert(leftQuery != null, "Left query is null?"); 157Debug.Assert(rightQuery != null, "Right query is null?"); 158Debug.Assert(leftQuery.ElementType.Equals(rightQuery.ElementType), "Incompatible element types in arguments to Except<T>/Intersect<T>/Union<T>/UnionAll<T>?"); 202Debug.Assert(!StringUtil.IsNullOrEmptyOrWhiteSpace(alias), "Invalid alias"); 203Debug.Assert(!StringUtil.IsNullOrEmptyOrWhiteSpace(projection), "Invalid projection"); 234Debug.Assert(!StringUtil.IsNullOrEmptyOrWhiteSpace(alias), "Invalid alias"); 235Debug.Assert(!StringUtil.IsNullOrEmptyOrWhiteSpace(predicateOrKeys), "Invalid predicate/keys"); 236Debug.Assert(null == skipCount || op == _orderByOp, "Skip clause used with WHERE operator?"); 333Debug.Assert(!StringUtil.IsNullOrEmptyOrWhiteSpace(alias), "Invalid alias"); 334Debug.Assert(!StringUtil.IsNullOrEmptyOrWhiteSpace(alias), "Invalid keys"); 335Debug.Assert(!StringUtil.IsNullOrEmptyOrWhiteSpace(projection), "Invalid projection"); 404Debug.Assert(newType != null, "OfType cannot be null"); 405Debug.Assert(Helper.IsEntityType(newType) || Helper.IsComplexType(newType), "OfType must be Entity or Complex type"); 482Debug.Assert(!StringUtil.IsNullOrEmptyOrWhiteSpace(count), "Invalid skip count");
System\Data\Objects\Internal\EntitySqlQueryState.cs (3)
194Debug.Assert(queryExpression != null, "EntitySqlQueryState.Parse returned null expression?"); 250Debug.Assert(typeUsage != null, "typeUsage != null"); 265Debug.Assert(lambda.Variables == null || lambda.Variables.Count == 0, "lambda.Variables must be empty");
System\Data\Objects\Internal\EntityWrapper.cs (4)
173Debug.Assert(_changeTrackingStrategy != null, "Change tracking strategy cannot be null."); 174Debug.Assert(_keyStrategy != null, "Key strategy cannot be null."); 206Debug.Assert(_changeTrackingStrategy != null, "Change tracking strategy cannot be null."); 207Debug.Assert(_keyStrategy != null, "Key strategy cannot be null.");
System\Data\Objects\Internal\EntityWrapperFactory.cs (2)
51Debug.Assert(!(entity is IEntityWrapper), "Object is an IEntityWrapper instance instead of the raw entity."); 228Debug.Assert(!(entity is IEntityWrapper), "Object is an IEntityWrapper instance instead of the raw entity.");
System\Data\Objects\Internal\ForeignKeyFactory.cs (5)
46Debug.Assert(IsConceptualNullKey(conceptualNullKey), "The key supplied is not a null key"); 63Debug.Assert(originalKey != null, "Original key can not be null"); 81Debug.Assert(constraint.FromRole.Identity == relatedEnd.TargetRoleName, "Unexpected constraint role"); 115Debug.Assert(keyNames.Length == numValues, "Number of entity set key names does not match constraint names"); 128Debug.Assert(keyIndex >= 0 && keyIndex < numValues, "Could not find constraint prop name in entity set key names");
System\Data\Objects\Internal\LazyLoadBehavior.cs (5)
58Debug.Assert(member.BuiltInTypeKind == BuiltInTypeKind.NavigationProperty, "member should represent a navigation property"); 117Debug.Assert(ospaceEntityType.DataSpace == DataSpace.OSpace, "ospaceEntityType.DataSpace must be OSpace"); 127Debug.Assert(propertyInfo != null, "Should have found lazy loading property"); 166Debug.Assert(wrapperObject == null || wrapperObject is IEntityWrapper, "wrapperObject must be an IEntityWrapper"); 172Debug.Assert(relationshipManager != null, "relationshipManager should be non-null");
System\Data\Objects\Internal\LightweightEntityWrapper.cs (8)
36Debug.Assert(entity is IEntityWithChangeTracker, "LightweightEntityWrapper only works with entities that implement IEntityWithChangeTracker"); 37Debug.Assert(entity is IEntityWithRelationships, "LightweightEntityWrapper only works with entities that implement IEntityWithRelationships"); 38Debug.Assert(entity is IEntityWithKey, "LightweightEntityWrapper only works with entities that implement IEntityWithKey"); 39Debug.Assert(!EntityProxyFactory.IsProxyType(entity.GetType()), "LightweightEntityWrapper only works with entities that are not proxies"); 59Debug.Assert(entity is IEntityWithChangeTracker, "LightweightEntityWrapper only works with entities that implement IEntityWithChangeTracker"); 60Debug.Assert(entity is IEntityWithRelationships, "LightweightEntityWrapper only works with entities that implement IEntityWithRelationships"); 61Debug.Assert(entity is IEntityWithKey, "LightweightEntityWrapper only works with entities that implement IEntityWithKey"); 62Debug.Assert(!EntityProxyFactory.IsProxyType(entity.GetType()), "LightweightEntityWrapper only works with entities that are not proxies");
System\Data\Objects\Internal\NullEntityWrapper.cs (25)
42Debug.Fail("Cannot access RelationshipManager from null wrapper."); 51Debug.Fail("Cannot access RelationshipManager from null wrapper."); 69Debug.Fail("Cannot modify collection from null wrapper."); 74Debug.Fail("Cannot modify collection from null wrapper."); 82Debug.Fail("Cannot access EntityKey from null wrapper."); 87Debug.Fail("Cannot access EntityKey from null wrapper."); 93Debug.Assert(false, "Method on NullEntityWrapper should not be called"); 101Debug.Fail("Cannot access Context from null wrapper."); 106Debug.Fail("Cannot access Context from null wrapper."); 114Debug.Fail("Cannot access MergeOption from null wrapper."); 121Debug.Fail("Cannot access Context from null wrapper."); 126Debug.Fail("Cannot access Context from null wrapper."); 131Debug.Fail("Cannot access Context from null wrapper."); 136Debug.Fail("Cannot access ChangeTracker from null wrapper."); 141Debug.Fail("Cannot take snapshot of using null wrapper."); 146Debug.Fail("Cannot take snapshot using null wrapper."); 153Debug.Fail("Cannot access IdentityType from null wrapper."); 160Debug.Fail("Cannot modify collection from null wrapper."); 165Debug.Fail("Cannot access property using null wrapper."); 171Debug.Fail("Cannot access property using null wrapper."); 176Debug.Fail("Cannot access property using null wrapper."); 181Debug.Fail("Cannot set a value onto a null entity."); 188Debug.Fail("Cannot access flag on null wrapper."); 193Debug.Fail("Cannot access flag on null wrapper."); 199Debug.Fail("Cannot UpdateCurrentValueRecord on a null entity.");
System\Data\Objects\Internal\ObjectFullSpanRewriter.cs (4)
55Debug.Assert(span != null, "Span cannot be null"); 56Debug.Assert(span.SpanList.Count > 0, "At least one span path is required"); 155Debug.Assert(retType != null, "Navigation property has non-Entity and non-Entity collection result type?"); 201Debug.Assert(relationship.AssociationEndMembers.Contains(property.ToEndMember.Name), "Association does not declare member referenced by Navigation property?");
System\Data\Objects\Internal\ObjectQueryExecutionPlan.cs (5)
39Debug.Assert(commandDefinition != null, "A command definition is required"); 40Debug.Assert(resultShaperFactory != null, "A result shaper factory is required"); 41Debug.Assert(resultType != null, "A result type is required"); 222Debug.Assert(context != null, "ObjectContext cannot be null"); 223Debug.Assert(query != null, "Command tree cannot be null");
System\Data\Objects\Internal\ObjectQueryState.cs (3)
315Debug.Assert(createMethod != null, "Unable to retrieve ObjectQueryState.CreateObjectQuery<> method?"); 330Debug.Assert(queryState != null, "Query state is required"); 331Debug.Assert(typeof(TResultType) == queryState.ElementType, "Element type mismatch");
System\Data\Objects\Internal\ObjectSpanRewriter.cs (6)
74Debug.Assert(rewriter.SpanIndex != null || tree.Query.ResultType.EdmEquals(newQuery.ResultType), "Query was rewritten for Span but no SpanIndex was created?"); 89Debug.Assert(toRewrite != null, "Expression to rewrite cannot be null"); 721Debug.Assert(originalNavigation != null, "originalNavigation cannot be null"); 722Debug.Assert(rewrittenNavigation != null, "rewrittenNavigation cannot be null"); 742Debug.Assert(TypeSemantics.IsCollectionType(expression.ResultType), "Non-collection input to projection?"); 756Debug.Assert(visitor._original != null && visitor._rewritten != null, "Expression was rewritten but no navigation was found?");
System\Data\Objects\Internal\PocoPropertyAccessorStrategy.cs (1)
158Debug.Assert(collection != null, "Collection is null");
System\Data\Objects\Internal\TransactionManager.cs (22)
59Debug.Assert(_originalMergeOption != null, "OriginalMergeOption used before being initialized"); 220Debug.Assert(!this.IsAddTracking); 221Debug.Assert(this.PopulatedEntityReferences == null, "Expected promotion index to be null when begining tracking."); 222Debug.Assert(this.AlignedEntityReferences == null, "Expected promotion index to be null when begining tracking."); 239Debug.Assert(this.IsAddTracking); 258Debug.Assert(!this.IsAttachTracking); 275Debug.Assert(this.IsAttachTracking); 316Debug.Assert(this.IsDetectChanges); 344Debug.Assert(this.ProcessedEntities != null, "ProcessedEntities should not be null"); 350Debug.Assert(!this.IsLocalPublicAPI); 357Debug.Assert(this.IsLocalPublicAPI); 364Debug.Assert(!this.IsOriginalValuesGetter); 371Debug.Assert(this.IsOriginalValuesGetter); 378Debug.Assert(!this.IsForeignKeyUpdate); 386Debug.Assert(this.IsForeignKeyUpdate); 394Debug.Assert(!this.IsRelatedEndAdd); 400Debug.Assert(this.IsRelatedEndAdd); 411Debug.Assert(_graphUpdateCount > 0); 417Debug.Assert(!IsDetaching); 423Debug.Assert(IsDetaching); 429Debug.Assert(!IsFixupByReference); 435Debug.Assert(IsFixupByReference);
System\Data\Objects\ObjectContext.cs (56)
233Debug.Assert(null != connection, "null connection"); 611Debug.Assert(!(entity is IEntityWrapper), "Object is an IEntityWrapper instance instead of the raw entity."); 631Debug.Assert((object)existingEntry.Entity == (object)entity, "FindEntityEntry should return null if existing entry contains a different object."); 649Debug.Assert(relationshipManager != null, "Entity wrapper returned a null RelationshipManager"); 699Debug.Assert(entitySet != null, "The extent for an entity must be a non-null entity set."); 700Debug.Assert(wrappedEntity != null, "The entity wrapper must not be null."); 701Debug.Assert(wrappedEntity.Entity != null, "The entity must not be null."); 725Debug.Assert(this.ObjectStateManager.TransactionManager.TrackProcessedEntities, "Expected tracking processed entities to be true when adding."); 726Debug.Assert(this.ObjectStateManager.TransactionManager.ProcessedEntities != null, "Expected non-null collection when flag set."); 992Debug.Assert(!(entity is IEntityWrapper), "Object is an IEntityWrapper instance instead of the raw entity."); 1012Debug.Assert((object)existingEntry.Entity == (object)entity, "FindEntityEntry should return null if existing entry contains a different object."); 1031Debug.Assert(relationshipManager != null, "Entity wrapper returned a null RelationshipManager"); 1095Debug.Assert(wrappedEntity != null, "entity wrapper shouldn't be null"); 1096Debug.Assert(wrappedEntity.Entity != null, "entity shouldn't be null"); 1097Debug.Assert(entitySet != null, "entitySet shouldn't be null"); 1102Debug.Assert(relationshipManager != null, "Entity wrapper returned a null RelationshipManager"); 1115Debug.Assert(key != null, "GetEntityKey should have returned a non-null key"); 1145Debug.Assert(this.ObjectStateManager.TransactionManager.TrackProcessedEntities, "Expected tracking processed entities to be true when adding."); 1146Debug.Assert(this.ObjectStateManager.TransactionManager.ProcessedEntities != null, "Expected non-null collection when flag set."); 1166Debug.Assert(!Object.ReferenceEquals(entry.Entity, wrappedEntity.Entity)); 1176Debug.Assert(this.ObjectStateManager.TransactionManager.TrackProcessedEntities, "Expected tracking processed entities to be true when adding."); 1177Debug.Assert(this.ObjectStateManager.TransactionManager.ProcessedEntities != null, "Expected non-null collection when flag set."); 1213Debug.Assert(!(entity is IEntityWrapper), "Object is an IEntityWrapper instance instead of the raw entity."); 1241Debug.Assert(!(entityLike is IEntityWrapper), "Object is an IEntityWrapper instance instead of the raw entity."); 1434Debug.Assert(ConnectionState.Open == _connection.State, "Connection must be open."); 1490Debug.Assert(currentTransaction != null, "transaction has changed and the lastTransaction was null"); 1570Debug.Assert(_connectionRequestCount > 0, "_connectionRequestCount is zero or negative"); 1590Debug.Assert(!MetadataWorkspace.IsItemCollectionAlreadyRegistered(DataSpace.CSSpace), "ObjectContext has C-S metadata but not S?"); 1600Debug.Assert(connectionWorkspace.IsItemCollectionAlreadyRegistered(DataSpace.CSpace) && 1680Debug.Assert(connectionWorkspace != null, "EntityConnection.MetadataWorkspace is null."); 1711Debug.Assert(!(entity is IEntityWrapper), "Object is an IEntityWrapper instance instead of the raw entity."); 1759Debug.Assert(!(entity is IEntityWrapper), "Object is an IEntityWrapper instance instead of the raw entity."); 1836Debug.Assert(entitySetName != null, "entitySetName should be not null"); 1843Debug.Assert(container != null, "Problem with metadata - default container not found"); 1923Debug.Assert(entityTypeUsage != null, "entityTypeUsage is null"); 1939Debug.Assert(entitySet != null, "Key's EntitySet should not be null in the MetadataWorkspace"); 1991Debug.Assert(!(entity is IEntityWrapper), "Object is an IEntityWrapper instance instead of the raw entity."); 2019Debug.Assert(!(entity is IEntityWrapper), "Object is an IEntityWrapper instance instead of the raw entity."); 2020Debug.Assert(entity != null, "The entity is null."); 2031Debug.Assert(EntityState.Added != entry.State, "not expecting added"); 2032Debug.Assert(EntityState.Detached != entry.State, "not expecting detached"); 2043Debug.Assert(null != entity, "null entity"); 2044Debug.Assert(null != (object)key, "null entity.Key"); 2045Debug.Assert(null != key.EntitySetName, "null entity.Key.EntitySetName"); 2052Debug.Assert(collection != null, "collection may not contain any entities but should never be null"); 2101Debug.Assert(EntityState.Added != item.Value.State, "should not be possible"); 2118Debug.Assert(EntityState.Detached != item.Value.State, "not expecting detached"); 2131Debug.Assert(EntityState.Added != item.Value.State, "should not be possible"); 2220Debug.Assert(batchSize > 0, "Didn't create a refresh expression?"); 2250Debug.Assert(RefreshMode.ClientWins == refreshMode, "StoreWins always becomes unchanged"); 2492Debug.Assert(entitySet != null, "Key's EntitySet should not be null in the MetadataWorkspace"); 2538Debug.Assert(entity == null, "Query for a key returned more than one entity!"); 2675Debug.Assert(edmTypes != null && edmTypes.Length > 0); 2797Debug.Assert(objectParameter.MappableType != null, "MappableType must not be null"); 2798Debug.Assert(Nullable.GetUnderlyingType(objectParameter.MappableType) == null, "Nullable types not expected here."); 3001Debug.Assert(ctor != null, "Could not find entity constructor");
System\Data\Objects\ObjectParameter.cs (2)
163Debug.Assert(template != null, "Template ObjectParameter cannot be null"); 281Debug.Assert(null == _effectiveType, "Effective type should only be set once");
System\Data\Objects\ObjectQuery.cs (2)
71Debug.Assert(queryState != null, "ObjectQuery state cannot be null"); 165Debug.Assert(commandText != null && commandText.Length != 0, "Invalid Command Text returned");
System\Data\Objects\ObjectQuery_TResultType.cs (2)
134Debug.Assert(mergeAsMethod != null, "Could not retrieve ObjectQuery<T>.MergeAs method using reflection?"); 142Debug.Assert(includeSpanMethod != null, "Could not retrieve ObjectQuery<T>.IncludeSpan method using reflection?");
System\Data\Objects\ObjectSet.cs (2)
54Debug.Assert(entitySet != null, "ObjectSet constructor requires a non-null EntitySet"); 55Debug.Assert(context != null, "ObjectSet constructor requires a non-null ObjectContext");
System\Data\Objects\ObjectStateEntry.cs (3)
43Debug.Assert(cache != null, "cache cannot be null."); 357Debug.Assert(null != _cache, "null ObjectStateManager"); 358Debug.Assert(null != _entitySet, "null EntitySetBase");
System\Data\Objects\ObjectStateEntryBaseUpdatableDataRecord.cs (5)
49Debug.Assert(_cacheEntry != null, "CacheEntry is required."); 255Debug.Assert(_cacheEntry != null, "CacheEntry is required."); 310Debug.Assert(_cacheEntry != null, "CacheEntry is required."); 320Debug.Assert(_cacheEntry != null, "CacheEntry is required."); 537Debug.Assert(_cacheEntry != null, "CacheEntry is required.");
System\Data\Objects\ObjectStateEntryDbDataRecord.cs (6)
32Debug.Assert(!cacheEntry.IsKeyEntry, "Cannot create an ObjectStateEntryDbDataRecord for a key entry"); 43Debug.Assert(false, "A DbDataRecord cannot be created for an entity object that is in an added or detached state."); 50Debug.Assert(!cacheEntry.IsKeyEntry, "Cannot create an ObjectStateEntryDbDataRecord for a key entry"); 59Debug.Assert(false, "A DbDataRecord cannot be created for an entity object that is in an added or detached state."); 67Debug.Assert(_cacheEntry != null, "CacheEntry is required."); 262Debug.Assert(_cacheEntry != null, "CacheEntry is required.");
System\Data\Objects\ObjectStateEntryDbUpdatableDataRecord.cs (3)
28Debug.Assert(!cacheEntry.IsKeyEntry, "Cannot create an ObjectStateEntryDbUpdatableDataRecord for a key entry"); 36Debug.Assert(false, "A CurrentValueRecord cannot be created for an entity object that is in a deleted or detached state."); 51Debug.Assert(false, "A CurrentValueRecord cannot be created for an entity object that is in a deleted or detached state.");
System\Data\Objects\ObjectStateEntryOriginalDbUpdatableDataRecord.cs (5)
30Debug.Assert(!cacheEntry.IsKeyEntry, "Cannot create an ObjectStateEntryOriginalDbUpdatableDataRecord_Internal for a key entry"); 38Debug.Assert(false, "An OriginalValueRecord cannot be created for an object in an added or detached state."); 44Debug.Assert(!_cacheEntry.IsRelationship, "should not be relationship"); 49Debug.Assert(!_cacheEntry.IsRelationship, "should not be relationship"); 72Debug.Assert(!_cacheEntry.IsRelationship, "should not be relationship");
System\Data\Objects\ObjectStateManager.cs (145)
253Debug.Assert(!(entity is IEntityWrapper), "Object is an IEntityWrapper instance instead of the raw entity."); 262Debug.Assert(!(entity is IEntityWrapper), "Object is an IEntityWrapper instance instead of the raw entity."); 278Debug.Assert((object)entityKey != null, "entityKey cannot be null."); 279Debug.Assert(entitySet != null, "entitySet must be non-null."); 331Debug.Assert(wrappedObject != null, "entity wrapper cannot be null."); 332Debug.Assert(wrappedObject.Entity != null, "entity cannot be null."); 333Debug.Assert(wrappedObject.Context != null, "the context should be already set"); 334Debug.Assert(entitySet != null, "entitySet must be non-null."); 336Debug.Assert(argumentName != null, "argumentName cannot be null."); 348Debug.Assert(!entityEdmType.Abstract, "non-abstract type in O space is mapped to abstract type in C space"); 432Debug.Assert(entityKey == newEntry.EntityKey, "The key on the new entry was not set correctly"); 435Debug.Assert(null == FindEntityEntry(entityKey), "should not have existing entry"); 489Debug.Assert(entry.ObjectStateManager != null, "Attempt to add detached state entry to dangling keys"); 500Debug.Assert(dFkEntry.EntityKey == null || entry.EntityKey == null || 519Debug.Assert(entry._cache != null, "found an entry in the _danglingForeignKeys collection that has been nulled out"); 520Debug.Assert(validEntries.Contains(entry), "The entry in the dangling foreign key store is no longer in the ObjectStateManager. Key=" + (entry.State == EntityState.Detached ? "detached" : entry.EntityKey != null ? "null" : entry.EntityKey.ConcatKeyValue())); 521Debug.Assert(entry.State == EntityState.Detached || !ForeignKeyFactory.IsConceptualNullKey(entry.EntityKey), "Found an entry with conceptual null Key=" + entry.EntityKey.ConcatKeyValue()); 643Debug.Assert(keyEntry != null, "keyEntry must be non-null."); 644Debug.Assert(wrappedEntity != null, "entity cannot be null."); 694Debug.Assert(keyEntry != null, "keyEntry must be non-null."); 695Debug.Assert(wrappedEntity != null, "entity wrapper cannot be null."); 696Debug.Assert(wrappedEntity.Entity != null, "entity cannot be null."); 697Debug.Assert(wrappedEntity.Context != null, "the context should be already set"); 699Debug.Assert(argumentName != null, "argumentName cannot be null."); 758Debug.Assert(relatedEnd != null); 759Debug.Assert(wrappedEntity != null); 760Debug.Assert(wrappedEntity.Entity != null); 761Debug.Assert(this.TransactionManager.IsAttachTracking || this.TransactionManager.IsAddTracking, "This method should be called only from ObjectContext.AttachTo/AddObject (indirectly)"); 774Debug.Assert(this.TransactionManager.IsAttachTracking || this.TransactionManager.IsAddTracking, "This method should be called only from the cleanup code"); 817Debug.Assert(relatedEnd is EntityReference, "If end is not Many multiplicity, then the RelatedEnd should be an EntityReference."); 826Debug.Assert(relatedEnd.IsEmpty(), "This can occur when objects are loaded using a NoTracking merge option. Try using a different merge option when loading objects."); 854Debug.Assert(relationshipEntry != null || relatedEnd.IsForeignKey, "Could not find relationship entry for LAT relationship."); 860Debug.Assert(relationshipEntry != null, "Could not find relationship entry."); 869Debug.Assert(relationshipEntry.State == EntityState.Detached, "relationshipEntry should be Detached"); 902Debug.Assert(!(inKeyEntryPromotion && wrappedSource.Context == null), 904Debug.Assert( 1037Debug.Assert(false, "Unexpected sourceMember.RelationshipMultiplicity"); 1109Debug.Assert(mergeOption == MergeOption.PreserveChanges || mergeOption == MergeOption.OverwriteChanges, "Unexpected MergeOption"); 1165Debug.Assert(mergeOption != MergeOption.NoTracking, "Existing relationships should not be updated with NoTracking"); 1218Debug.Assert(relationshipEntry.State == EntityState.Added || relationshipEntry.State == EntityState.Unchanged, "Unexpected relationshipEntry state"); 1254Debug.Assert(false, "Unexpected relationship entry state"); 1259Debug.Assert(false, "Unexpected MergeOption"); 1267Debug.Assert(false, "Unexpected targetMember.RelationshipMultiplicity"); 1345Debug.Assert(false, "Unexpected MergeOption"); 1410Debug.Assert(wrappedObject != null, "entity wrapper cannot be null."); 1411Debug.Assert(wrappedObject.Entity != null, "entity cannot be null."); 1412Debug.Assert(wrappedObject.Context != null, "the context should be already set"); 1413Debug.Assert(entitySet != null, "entitySet must be non-null."); 1414Debug.Assert(argumentName != null, "argumentName cannot be null."); 1415Debug.Assert(entityKey != null, "argumentName cannot be null."); 1435Debug.Assert(entityKey == newEntry.EntityKey, "newEntry.EntityKey should match entityKey"); 1456Debug.Assert(wrappedEntity != null, "Cannot verify key for null entity wrapper."); 1457Debug.Assert(wrappedEntity.Entity != null, "Cannot verify key for null entity."); 1459Debug.Assert((object)entityKey != null, "Cannot verify a null EntityKey."); 1460Debug.Assert(!entityKey.IsTemporary, "Verifying a temporary EntityKey doesn't make sense because the key doesn't contain any values."); 1461Debug.Assert(entitySetForType != null, "Cannot verify against a null entity set."); 1470Debug.Assert(entitySetForType.Name == entitySetForKey.Name && 1502Debug.Assert(null == FindRelationship(wrapper), "relationship should not exist, caller verifies"); 1512Debug.Assert(EntityState.Added == desiredState || // result entry should be added or left alone 1518Debug.Assert(null == entry || (EntityState.Modified != entry.State), "relationship should never be modified"); 1541Debug.Assert(EntityState.Deleted == entry.State, "should be deleted state"); 1546Debug.Assert(desiredState == entry.State || 1549Debug.Assert(entry is RelationshipEntry, "unexpected type of entry"); 1558Debug.Assert(relationship != null, "relationship can't be null"); 1572Debug.Assert(null != FindEntityEntry(key), "EntityEntry doesn't exist"); 1575Debug.Assert(key.Equals(entry.EntityKey), "EntityKey mismatch"); 1597Debug.Assert(relationship.State != EntityState.Detached, "Cannot remove a detached cache entry."); 1598Debug.Assert(null != FindEntityEntry(key), "EntityEntry doesn't exist"); 1601Debug.Assert(key.Equals(entry.EntityKey), "EntityKey mismatch"); 1622Debug.Assert(result == (null != entry), "found null entry"); 1688Debug.Assert(!(entry.Entity is IEntityWithKey), "_keylessEntityStore contains an entry that implement IEntityWithKey"); 1707Debug.Assert(result, "entry in _keylessEntityStore doesn't exist in one of the other stores"); 1723Debug.Assert(null != _keylessEntityStore, "There should be a store that keyless entries are in"); 1726Debug.Assert(object.ReferenceEquals(entry, keylessEntry), "keylessEntry and entry from stores do not match"); 1730Debug.Assert(false, "The entry containing an entity not implementing IEntityWithKey is not in the _keylessEntityStore"); 1744Debug.Assert(!(entity is IEntityWrapper), "Object is an IEntityWrapper instance instead of the raw entity."); 1745Debug.Assert(!(entity is IEntityWithKey)); 1784Debug.Assert((EntityState.Detached & state) == 0, "Cannot get state entries for detached entities"); 1840Debug.Assert((EntityState.Detached & state) == 0, "Cannot get state entries for detached entities"); 1959Debug.Assert(entry != null, "entry should not be null."); 1960Debug.Assert(entry.State == EntityState.Added, "Cannot do key fixup for an entry not in the Added state."); 1961Debug.Assert(entry.Entity != null, "must have entity, can't be entity stub in added state"); 1964Debug.Assert(entry == _addedEntityStore[oldKey], "not the same EntityEntry"); 1965Debug.Assert((object)oldKey != null, "Cannot fixup a cache entry with a null key."); 1966Debug.Assert(oldKey.IsTemporary, "Cannot fixup an entry with a non-temporary key."); 1967Debug.Assert(null != _addedEntityStore, "missing added store"); 2037Debug.Assert(existingEntry.State == EntityState.Unchanged, "entity stub must be in unchanged state"); 2038Debug.Assert(existingEntry.IsKeyEntry, "existing entry must be a key entry to promote"); 2039Debug.Assert(Object.ReferenceEquals(newKey, existingEntry.EntityKey), "should be same key reference"); 2057Debug.Assert((null == _addedEntityStore) || !_addedEntityStore.ContainsKey(oldKey), "EntityEntry exists with OldKey"); 2058Debug.Assert((null != _unchangedEntityStore) && _unchangedEntityStore.ContainsKey(newKey), "EntityEntry does not exist with NewKey"); 2068Debug.Assert(entry != null, "entry should not be null."); 2069Debug.Assert(entry.State != EntityState.Added, "Cannot replace key with a temporary key if the entry is in Added state."); 2070Debug.Assert(!entry.IsKeyEntry, "Cannot replace a key of a KeyEntry"); 2073Debug.Assert(!oldKey.IsTemporary, "Entity is not in the Added state but has a temporary key."); 2078Debug.Assert(FindEntityEntry(newKey) == null, "no entry should exist with the new temporary key"); 2114Debug.Assert((object)entry.EntityKey != null, "Cannot reset an entry's key if it hasn't been set in the first place."); 2115Debug.Assert(!_inRelationshipFixup, "already _inRelationshipFixup"); 2116Debug.Assert(!entry.EntityKey.Equals(value), "the keys should not be equal"); 2138Debug.Assert(value == entry.EntityKey, "The new key was not set onto the entry correctly"); 2311Debug.Assert(relationshipState != EntityState.Detached || relationshipEntry.State == EntityState.Detached, "state should be detached"); 2350Debug.Assert(requestedState != EntityState.Modified, "relationship cannot be in Modified state"); 2364Debug.Assert(relationshipEntry != null, "null relationshipEntry"); 2383Debug.Assert(false, "Invalid requested state"); 2455Debug.Assert(!(entity is IEntityWrapper), "Object is an IEntityWrapper instance instead of the raw entity."); 2466Debug.Assert(entity != null, "entity is null"); 2467Debug.Assert(!(entity is IEntityWrapper), "Object is an IEntityWrapper instance instead of the raw entity."); 2485Debug.Assert(!(entity is IEntityWrapper), "Object is an IEntityWrapper instance instead of the raw entity."); 2570Debug.Assert(result == (null != entry), "result and entry mismatch"); 2590Debug.Assert(!(entity is IEntityWrapper), "Object is an IEntityWrapper instance instead of the raw entity."); 2591Debug.Assert(!(entity is EntityKey), "Object is a EntityKey instead of raw entity."); 2713Debug.Assert((object)entry.EntityKey != null, "attached entry must have a key"); 2756Debug.Assert(entry.IsRelationship, "expecting IsRelationship"); 2757Debug.Assert(null != entry.RelationshipWrapper, "null RelationshipWrapper"); 2784Debug.Assert(false, "Invalid state."); 2787Debug.Assert(dictionaryToAdd != null, "Couldn't find the correct relationship dictionary based on entity state."); 2793Debug.Assert(null != (object)entry.EntityKey, "missing EntityKey"); 2809Debug.Assert(!entry.EntityKey.IsTemporary, "adding temporary entity key into Unchanged state"); 2817Debug.Assert(entry.EntityKey.IsTemporary, "adding non-temporary entity key into Added state"); 2825Debug.Assert(!entry.EntityKey.IsTemporary, "adding temporary entity key into Deleted state"); 2833Debug.Assert(!entry.EntityKey.IsTemporary, "adding temporary entity key into Modified state"); 2836Debug.Assert(false, "Invalid state."); 2841Debug.Assert(dictionaryToAdd != null, "Couldn't find the correct entity dictionary based on entity state."); 2884Debug.Assert(false, "Invalid state."); 2887Debug.Assert(dictionaryContainingEntry != null, "Couldn't find the correct relationship dictionary based on entity state."); 2890Debug.Assert(result, "The correct relationship dictionary based on entity state doesn't contain the entry."); 2931Debug.Assert(false, "Invalid state."); 2934Debug.Assert(dictionaryContainingEntry != null, "Couldn't find the correct entity dictionary based on entity state."); 2937Debug.Assert(result, "The correct entity dictionary based on entity state doesn't contain the entry."); 2975Debug.Assert(entityType != null, "entityType cannot be null."); 2976Debug.Assert(entitySet != null, "must have entitySet to correctly qualify Type"); 2995Debug.Assert(edmType != null, "edmType cannot be null."); 2996Debug.Assert(Helper.IsEntityType(edmType) || 3015Debug.Assert(null != entitySet, "null entitySet"); 3016Debug.Assert(null != mapping, "null mapping"); 3019Debug.Assert(Helper.IsEntityType(edmType) || 3045Debug.Assert(null != edmType, "null EdmType"); 3046Debug.Assert(Helper.IsEntityType(edmType) || 3396Debug.Assert(reference != null); 3418Debug.Assert(wrappedOwner == relatedEnd.WrappedOwner, "entry.WrappedEntity is not the same as relatedEnd.WrappedOwner?"); 3691Debug.Assert(!entry.IsKeyEntry, "List should be filtered before it gets to this method."); 3703Debug.Assert(!entry.IsKeyEntry, "List should be filtered before it gets to this method."); 3717Debug.Assert(!(entity is IEntityWrapper), "Object is an IEntityWrapper instance instead of the raw entity."); 3718Debug.Assert(entitySet != null, "null entitySet"); 3719Debug.Assert(entity != null, "null entity");
System\Data\Objects\ObjectStateManagerMetadata.cs (14)
28Debug.Assert(null != type, "null Type"); 29Debug.Assert(null != set, "null EntitySet"); 30Debug.Assert(null != set.EntityContainer, "null EntityContainer"); 31Debug.Assert(null != set.EntityContainer.Name, "null EntityContainer.Name"); 61Debug.Assert(null != memberMap, "shadowstate not supported"); 62Debug.Assert(null != memberMetadata, "CSpace should never be null"); 82Debug.Assert(null != _clrProperty, "shadowstate not supported"); 109Debug.Assert(null != _clrProperty, "shadowstate not supported"); 122Debug.Assert(null != _clrProperty, "shadowstate not supported"); 128Debug.Assert(null != _clrProperty, "shadowstate not supported"); 152Debug.Assert(null != edmType, "null EdmType"); 153Debug.Assert(Helper.IsEntityType(edmType) || 156Debug.Assert(Object.ReferenceEquals(mapping, null) || 261Debug.Assert(Member(ordinal) != null,
System\Data\Objects\ObjectView.cs (2)
424Debug.Assert(((IList)this).Contains(value), "Value does not exist in view."); 494Debug.Assert(sender is TElement, "Entity should be of type TElement");
System\Data\Objects\ObjectViewFactory.cs (6)
127Debug.Assert(viewDataConstructor != null, "ObjectViewQueryResultData constructor not found. Please ensure constructor signature is correct."); 176Debug.Assert(clrElementType != null, "clrElementType has unexpected value of null."); 210Debug.Assert(viewDataConstructor != null, "ObjectViewEntityCollectionData constructor not found. Please ensure constructor signature is correct."); 236Debug.Assert(viewDataInterfaces.Length == 1, "Could not find IObjectViewData<T> interface definition for ObjectViewQueryResultData<T>."); 243Debug.Assert(viewConstructor != null, "ObjectView constructor not found. Please ensure constructor signature is correct."); 275Debug.Assert(typeUsage.EdmType.DataSpace == DataSpace.CSpace, String.Format(System.Globalization.CultureInfo.InvariantCulture, "Expected EdmType.DataSpace to be C-Space, but instead it is {0}.", typeUsage.EdmType.DataSpace.ToString()));
System\Data\Objects\ObjectViewListener.cs (2)
81Debug.Assert(entity != null, "Entity should not be null"); 106Debug.Assert(entity != null, "entity should not be null");
System\Data\Objects\ObjectViewQueryResultData.cs (4)
155Debug.Assert(_objectContext != null, "ObjectContext is null."); 172Debug.Assert(_objectContext != null, "ObjectContext is null."); 192Debug.Assert(_objectContext != null, "ObjectContext is null."); 233Debug.Assert(e.Action != CollectionChangeAction.Refresh, "Cache should never fire with refresh, it does not have clear");
System\Data\Objects\RelationshipEntry.cs (19)
38Debug.Assert(null != relationshipWrapper, "null RelationshipWrapper"); 39Debug.Assert(EntityState.Added == state || 84Debug.Assert(false, "RelationshipEntry cannot be in Modified state"); 131Debug.Assert(false, "EntityKey setter shouldn't be called for RelationshipEntry"); 242Debug.Assert(this.RelationshipWrapper.Key0 == this.Key1, "invalid relationship"); 373Debug.Assert(associationSet.ElementType.AssociationEndMembers[0].Name == associationMember.Name || 425Debug.Assert(null != value, "don't set wrapper to null"); 536Debug.Assert(relationshipManager != null, "Entity wrapper returned a null RelationshipManager"); 581Debug.Assert(false, "RelationshipEntry cannot be in Modified state"); 608Debug.Assert(requestedState != EntityState.Modified, "Invalid requested state for relationsihp"); 609Debug.Assert(this.State != EntityState.Modified, "Invalid initial state for relationsihp"); 634Debug.Assert(false, "Invalid requested state"); 658Debug.Assert(false, "Invalid requested state"); 692Debug.Assert(false, "Invalid requested state"); 697Debug.Assert(false, "Invalid entry state"); 707Debug.Assert(null != (object)entityKey, "null EntityKey"); 708Debug.Assert(entityKey.Equals(Key0) || entityKey.Equals(Key1), "EntityKey mismatch"); 714Debug.Assert(null != (object)entityKey, "null EntityKey"); 715Debug.Assert(entityKey.Equals(Key0) || entityKey.Equals(Key1), "EntityKey mismatch");
System\Data\Objects\RelationshipWrapper.cs (13)
24Debug.Assert(null != extent, "null RelationshipWrapper"); 25Debug.Assert(null != (object)key, "null key"); 34Debug.Assert(null != wrapper, "null RelationshipWrapper"); 35Debug.Assert((uint)ordinal <= 1u, "ordinal out of range"); 36Debug.Assert(null != (object)key, "null key2"); 54Debug.Assert(null != extent, "null AssociationSet"); 55Debug.Assert(null != (object)key0, "null key0"); 56Debug.Assert(null != (object)key1, "null key1"); 59Debug.Assert(extent.ElementType.AssociationEndMembers.Count == 2, "only 2 ends are supported"); 69Debug.Assert(extent.ElementType.AssociationEndMembers[1].Name == role1, "a)roleAndKey1 Name differs"); 75Debug.Assert(extent.ElementType.AssociationEndMembers[0].Name == role1, "b)roleAndKey1 Name differs"); 76Debug.Assert(extent.ElementType.AssociationEndMembers[1].Name == role0, "b)roleAndKey0 Name differs"); 89Debug.Assert(Key0 == key || Key1 == key, "didn't match a key");
System\Data\Objects\Span.cs (1)
271Debug.Assert(navigations.Count > 0, "Empty path found");
System\Data\Objects\SpanIndex.cs (6)
72Debug.Assert(spannedRowType != null, "Spanned RowType cannot be null"); 73Debug.Assert(originalRowType != null, "Original RowType cannot be null"); 74Debug.Assert(originalRowType.EdmType.BuiltInTypeKind == BuiltInTypeKind.RowType, "Original RowType must be a RowType"); 96Debug.Assert(spanRowType != null, "Span RowType cannot be null"); 107Debug.Assert(rowType != null, "Span row type cannot be null"); 108Debug.Assert(columnMap != null, "Span column map cannot be null");
System\Data\Query\InternalTrees\ColumnMap.cs (18)
91Debug.Assert(type != null, "Unspecified type"); 109Debug.Assert(!String.IsNullOrEmpty(value), "invalid name?"); 181Debug.Assert(commandId >= 0, "invalid command id"); 182Debug.Assert(columnPos >= 0, "invalid column position"); 248Debug.Assert(properties != null, "No properties (gasp!) for a structured type"); 372Debug.Assert(typeDiscriminator != null, "Must specify a type discriminator column"); 373Debug.Assert(typeChoices != null, "No type choices for polymorphic column"); 456Debug.Assert(typeDiscriminators != null, "Must specify type discriminator columns"); 457Debug.Assert(typeChoices != null, "No type choices for polymorphic column"); 458Debug.Assert(discriminate != null, "Must specify discriminate"); 601Debug.Assert(entityIdentity != null, "Must specify an entity identity"); 663Debug.Assert(entityIdentity != null, "Must specify entity identity information"); 724Debug.Assert(elementMap != null, "Must specify column map for element"); 830Debug.Assert(discriminator != null, "Must specify a column map for the collection discriminator"); 831Debug.Assert(discriminatorValue != null, "Must specify a discriminator value"); 901Debug.Assert(keyColumns != null, "Must specify column maps for key columns"); 985Debug.Assert(entitySetColumn != null, "Must specify a column map to identify the entity set"); 986Debug.Assert(entitySetMap != null, "Must specify a dictionary to look up entitysets");
System\Data\Query\InternalTrees\ColumnMapFactory.cs (10)
36Debug.Assert(resultMapping != null); 40Debug.Assert(!baseStructuralType.Abstract, "mapping loader must verify abstract types have explicit mapping"); 47Debug.Assert(null != baseEntityType, "We should have entity type here"); 87Debug.Assert(Helper.IsEntityType(edmType) || null == entitySet, "The specified non-null EntitySet is incompatible with the EDM type specified."); 117Debug.Assert(false, "unexpected edmType?"); 130Debug.Assert(null != reader); 131Debug.Assert(null != type); 132Debug.Assert(null != workspace); 245Debug.Assert(keyOrdinal >= 0, "keyMember for entity is not found by name in the data reader?"); 249Debug.Assert(null != keyColumnMap, "keyMember for entity isn't in properties collection for the entity?");
System\Data\Query\InternalTrees\Command.cs (12)
379Debug.Assert(m_vars[id].VarType != VarType.NotValid, "The var has been replaced by a different var and is no longer valid."); 434Debug.Assert(oldVar != null, "oldVar != null"); 435Debug.Assert(m_vars.Contains(oldVar)); 1060Debug.Assert(definingExpr.Op != null); 1062Debug.Assert(scalarOp != null); 1368Debug.Assert(leftMap.Count == rightMap.Count, "VarMap count mismatch"); 1385Debug.Assert(leftMap.Count == rightMap.Count, "VarMap count mismatch"); 1401Debug.Assert(leftMap.Count == rightMap.Count, "VarMap count mismatch"); 1610Debug.Assert((inputVars.Count % inputNodes.Count == 0) && (varPerNode >= 1), "Inconsistent nodes/vars count:" + inputNodes.Count + "," + inputVars.Count); 1658Debug.Assert(inputNodes.Count == inputVars.Count, "Count mismatch:" + inputNodes.Count + "," + inputVars.Count); 1684Debug.Assert(inputNode.Op.IsRelOp, "Expected a RelOp. Found " + inputNode.Op.OpType); 1777Debug.Assert(commonType != null, "No common type for " + arg0.Op.Type + " and " + arg1.Op.Type);
System\Data\Query\InternalTrees\Dump.cs (1)
1008Debug.Assert(false, "need to special case enum->string: " + op.ToString());
System\Data\Query\InternalTrees\Metadata.cs (1)
87Debug.Assert(false, "keyMember not in columns?");
System\Data\Query\InternalTrees\NodeInfo.cs (5)
334Debug.Assert(m_maxRows >= m_minRows, "MaxRows less than MinRows?"); 409Debug.Assert(n.Op.IsScalarOp || n.Op.IsAncillaryOp, "not a supported optype"); 538Debug.Assert(nodeInfo.Keys.NoKeys, "UnnestOp should have no keys in all cases except TVFs mapped to entities."); 564Debug.Assert(varDefListNode.Op.OpType == OpType.VarDefList); 573Debug.Assert(varDefOp != null);
System\Data\Query\InternalTrees\Nodes.cs (1)
170Debug.Assert(extendedNodeInfo != null);
System\Data\Query\InternalTrees\OpCopier.cs (7)
448Debug.Assert(op.EntitySet == null, "op.EntitySet must be null for the constructor that hasn't been scoped yet."); 681Debug.Assert(!n.HasChild0); 699Debug.Assert(n.HasChild0); 961Debug.Assert(false, "Unexpected SetOpType"); 1046Debug.Assert(op.Var.VarType == VarType.Computed, "Unexpected VarType"); 1088Debug.Assert(newColumnMap != null, "Coping of a physical project's columnMap did not return a SimpleCollectionColumnMap" ); 1100Debug.Assert(op != null);
System\Data\Query\InternalTrees\Ops.cs (1)
517Debug.Assert(type != null, "No type specified for ScalarOp");
System\Data\Query\InternalTrees\PhysicalOps.cs (1)
76Debug.Assert(null != columnMap, "null columnMap?");
System\Data\Query\InternalTrees\RelOps.cs (6)
484Debug.Assert(null != vars, "null vars?"); 485Debug.Assert(!vars.IsEmpty, "empty varlist?"); 578Debug.Assert(opType == OpType.Sort || opType == OpType.ConstrainedSort, "SortBaseOp OpType must be Sort or ConstrainedSort"); 695Debug.Assert(opType == OpType.GroupBy || opType == OpType.GroupByInto, "GroupByBaseOp OpType must be GroupBy or GroupByInto"); 993Debug.Assert(keyVars != null); 994Debug.Assert(!keyVars.IsEmpty);
System\Data\Query\InternalTrees\Rule.cs (5)
50Debug.Assert(nodeProcessDelegate != null, "null process delegate"); 51Debug.Assert(opType != OpType.NotValid, "bad OpType"); 52Debug.Assert(opType != OpType.Leaf, "bad OpType - Leaf"); 154Debug.Assert(pattern != null, "null pattern"); 155Debug.Assert(pattern.Op != null, "null pattern Op");
System\Data\Query\InternalTrees\RuleProcessor.cs (3)
68Debug.Assert(newNode == currentNode, "Liar! This rule should have returned 'true'"); 96Debug.Assert(loopCount < 12, "endless loops?"); 134Debug.Assert(subTreeRoot == newSubTreeRoot);
System\Data\Query\InternalTrees\ScalarOps.cs (9)
85Debug.Assert(value != null, "ConstantOp with a null value?"); 165Debug.Assert(value != null, "InternalConstantOp with a null value?"); 430Debug.Assert((property is EdmProperty) || (property is RelationshipEndMember) || (property is NavigationProperty), "Unexpected EdmMember type"); 999Debug.Assert(scoped || entitySet == null, "entitySet cann't be set of constructor isn't scoped"); 1000Debug.Assert(relProperties != null, "expected non-null list of rel-properties"); 1075Debug.Assert(!type.EdmType.Abstract, "cannot create new instance of abstract type"); 1076Debug.Assert(!TypeSemantics.IsEntityType(type), "cannot use this Op for entity construction"); 1120Debug.Assert(null != discriminatorMap, "null discriminator map"); 1202Debug.Assert(Object.ReferenceEquals(field.DeclaringType, this.Type.EdmType),
System\Data\Query\PlanCompiler\NominalTypeEliminator.cs (3)
920System.Diagnostics.Debug.Assert(varDefOp != null, "varDefOp != null"); 921System.Diagnostics.Debug.Assert(node != null, "node != null"); 1597System.Diagnostics.Debug.Assert(outerVarInfo.Kind == VarInfoKind.StructuredTypeVarInfo, "StructuredVarInfo expected");
System\Data\Query\PlanCompiler\PlanCompiler.cs (1)
145System.Diagnostics.Debug.Fail(message);
System\Data\Query\PlanCompiler\TypeInfo.cs (1)
302Debug.Assert(result, "Should have thrown if the property was not found");
System\Data\Query\PlanCompiler\VarInfo.cs (3)
229System.Diagnostics.Debug.Assert(newVar != null, "newVar != null"); 314System.Diagnostics.Debug.Assert(v != null, "v != null"); 315System.Diagnostics.Debug.Assert(newVar != null, "newVar != null");
System\Data\Query\ResultAssembly\BridgeDataReader.cs (11)
80Debug.Assert(null != shaper, "null shaper?"); 81Debug.Assert(null != coordinatorFactory, "null coordinatorFactory?"); 82Debug.Assert(depth == 0 || nextResultShaperInfos == null, "Nested data readers should not have multiple result sets."); 112Debug.Assert(null != DefaultRecordState, "no default?"); 126Debug.Assert(storeDataReader != null, "null storeDataReaders?"); 127Debug.Assert(columnMap != null, "null columnMap?"); 128Debug.Assert(workspace != null, "null workspace?"); 137Debug.Assert(storeDataReader != null, "null storeDataReaders?"); 138Debug.Assert(columnMap != null, "null columnMap?"); 139Debug.Assert(workspace != null, "null workspace?"); 348Debug.Assert(DataRecord.Depth == 0, "Nested data readers should not have multiple result sets.");
System\Data\Query\ResultAssembly\BridgeDataRecord.cs (7)
92Debug.Assert(null != shaper, "null shaper?"); 146Debug.Assert(null == _currentNestedRecord, "didn't close the nested record?"); 147Debug.Assert(null == _currentNestedReader, "didn't close the nested reader?"); 153Debug.Assert(null != newSource, "hasData but null newSource?"); // this shouldn't happen... 201Debug.Assert(null != _source, "null _source?"); // we should have already called AssertReaderIsOpen. 226Debug.Assert(null != _source, "null _source?"); // we should have already called AssertReaderIsOpen. 477Debug.Fail("unexpected type of nested object result: " + result.GetType().ToString());
System\Data\Spatial\DbGeography.cs (2)
30Debug.Assert(spatialServices != null, "Spatial services are required"); 31Debug.Assert(spatialProviderValue != null, "Provider value is required");
System\Data\Spatial\DbGeometry.cs (2)
30Debug.Assert(spatialServices != null, "Spatial services are required"); 31Debug.Assert(spatialProviderValue != null, "Provider value is required");
System\Data\Spatial\DefaultSpatialServices.cs (2)
70Debug.Assert(geographyValue != null, "Validate geographyValue is non-null before calling CheckCompatible"); 84Debug.Assert(geometryValue != null, "Validate geometryValue is non-null before calling CheckCompatible");
System\Data\Spatial\SpatialHelpers.cs (3)
19Debug.Assert(Helper.IsSpatialType(columnType)); 35Debug.Assert(providerFactory != null, "GetProviderSpatialServices requires provider factory to have been initialized"); 39Debug.Assert(result != null, "DbProviderServices did not throw ProviderIncompatibleException for null IDbSpatialDataReader");
System\Data\SqlClient\SqlGen\DmlSqlGenerator.cs (7)
156Debug.Assert(!first, "if useGeneratedValuesVariable is true, it implies some columns do not have values"); 465Debug.Assert(null != commandText); 466Debug.Assert(null != commandTree); 511Debug.Assert(expression.ExpressionKind == DbExpressionKind.Equals, 531Debug.Assert(propertyExpression.ExpressionKind == DbExpressionKind.Property, 540Debug.Assert(value.ExpressionKind == DbExpressionKind.Constant, 585Debug.Assert(_commandTree.CommandTreeKind == DbCommandTreeKind.Update, "did you add a new option?");
System\Data\SqlClient\SqlGen\Sql8ExpressionRewriter.cs (5)
49Debug.Assert(originalTree != null, "OriginalTree is null"); 234Debug.Assert(leftFlattenedProperties.Count == rightFlattenedProperties.Count, "The left and the right input to INTERSECT or EXCEPT have a different number of properties"); 235Debug.Assert(leftFlattenedProperties.Count != 0, "The inputs to INTERSECT or EXCEPT have no properties"); 301Debug.Assert(properties.Count != 0, "No nested properties when FlattenProperties called?"); 314Debug.Assert(TypeSemantics.IsEntityType(properties[i].TypeUsage) || TypeSemantics.IsRowType(properties[i].TypeUsage),
System\Data\SqlClient\SqlGen\SqlBuilder.cs (1)
50Debug.Assert(s != null);
System\Data\SqlClient\SqlGen\SqlFunctionCallHandler.cs (19)
458Debug.Assert(functionExpression.Arguments.Count == 1, "FromText function should have text or text + srid arguments only"); 669Debug.Assert(!(isNiladicFunction && (0 < e.Arguments.Count)), "function attributed as NiladicFunction='true' in the provider manifest cannot have arguments"); 738Debug.Assert(handlers.ContainsKey(e.Function.Name), "Special handling should be called only for functions in the list of special functions"); 744Debug.Assert(spatialTypeKind == PrimitiveTypeKind.Geography || spatialTypeKind == PrimitiveTypeKind.Geometry, "Spatial function does not refer to a valid spatial primitive type kind?"); 769Debug.Assert(functionExpression.Function.Parameters.Count > 0 && Helper.IsSpatialType(functionExpression.Function.Parameters[0].TypeUsage), "Instance property function does not have instance parameter?"); 775Debug.Assert(functionExpression.Function.Parameters.Count > 0 && Helper.IsSpatialType(functionExpression.Function.Parameters[0].TypeUsage), "Instance method function does not have instance parameter?"); 799Debug.Assert(!isPropertyAccess || functionExpression.Arguments.Count == 1, "Property accessor instance functions should have only the single instance argument"); 840Debug.Assert(e.Arguments.Count > 0 && e.Arguments.Count <= 2, "There should be 1 or 2 arguments for operator"); 855Debug.Assert(_functionNameToOperatorDictionary.ContainsKey(e.Function.Name), "The function can not be mapped to an operator"); 903Debug.Assert(e.Arguments.Count > 0, "e.Arguments.Count > 0"); 989Debug.Assert(e.Arguments.Count == 1, "Canonical datepart functions should have exactly one argument"); 1108Debug.Assert(args.Count == (hasDatePart ? 3 : 0) + 3 + (hasTimeZonePart ? 1 : 0), "Invalid number of parameters for a date time creating function"); 1222Debug.Assert(isPrimitiveType, "Expecting primitive type as input parameter to TruncateTime"); 1235Debug.Assert(true, "Unexpected type to TruncateTime" + typeKind.ToString()); 1412Debug.Assert(e.Arguments.Count <= 2, "Round or truncate should have at most 2 arguments"); 1472Debug.Assert(e.Arguments.Count == 1, "Trim should have one argument"); 1555Debug.Assert(args.Count == 2, "Contains should have two arguments"); 1598Debug.Assert(args.Count == 2, "StartsWith should have two arguments"); 1642Debug.Assert(args.Count == 2, "EndsWith should have two arguments");
System\Data\SqlClient\SqlGen\SqlGenerator.cs (45)
436Debug.Assert(false, "Unknown command tree kind"); 444Debug.Assert(tree.EdmFunction != null, "DbFunctionCommandTree function cannot be null"); 496Debug.Assert(tree.Query != null, "DbQueryCommandTree Query cannot be null"); 525Debug.Assert(sqlStatement != null, "The outer most sql statment is null"); 546Debug.Assert(selectStatementStack.Count == 0); 547Debug.Assert(isParentAJoinStack.Count == 0); 592Debug.Assert(this.SqlVersion != SqlVersion.Sql8, "DbApplyExpression when translating for SQL Server 2000."); 610Debug.Assert(false); 655Debug.Assert(false); 671Debug.Assert(e.When.Count == e.Then.Count); 757Debug.Assert(false); // The constructor should have prevented this 776Debug.Assert(false); 971Debug.Assert(precision > 0, "Precision must be greater than zero"); 1218Debug.Assert(this.SqlVersion != SqlVersion.Sql8, "DbExceptExpression when translating for SQL Server 2000."); 1460Debug.Assert(result.Select.IsEmpty); 1515Debug.Assert(aggregate.Arguments.Count == 1); 1567Debug.Assert(this.SqlVersion != SqlVersion.Sql8, "DbIntersectExpression when translating for SQL Server 2000."); 1643Debug.Assert(false); 1692Debug.Assert(e.Limit is DbConstantExpression || e.Limit is DbParameterReferenceExpression, "DbLimitExpression.Limit is of invalid expression type"); 1693Debug.Assert(!((this.SqlVersion == SqlVersion.Sql8) && (e.Limit is DbParameterReferenceExpression)), "DbLimitExpression.Limit is DbParameterReferenceExpression for SQL Server 2000."); 1842Debug.Assert(Helper.IsPrimitiveType(type.EdmType), "Type must be primitive type"); 2321Debug.Assert(joinSymbol.NameToExtent.ContainsKey(e.Property.Name)); 2406Debug.Assert(e.ExpressionKind == DbExpressionKind.All); 2456Debug.Assert(this.SqlVersion != SqlVersion.Sql8, "DbSkipExpression when translating for SQL Server 2000."); 2458Debug.Assert(e.Count is DbConstantExpression || e.Count is DbParameterReferenceExpression, "DbSkipExpression.Count is of invalid expression type"); 2476Debug.Assert(input.Select.IsEmpty); 2913Debug.Assert(e.Arguments.Count <= 1); 2935Debug.Assert(collectionType != null); 2944Debug.Assert(isScalarElement); 3698Debug.Assert(sortClause.Collation != null); 3757Debug.Assert(oldStatement.FromExtents.Count == 1); 3816Debug.Assert(type.EdmType.DataSpace == DataSpace.CSpace, "Type must be in cSpace"); 3824Debug.Assert(Helper.IsPrimitiveType(storeTypeUsage.EdmType), "Type must be primitive type"); 3840Debug.Assert(hasFacet, "Binary type did not have MaxLength facet"); 3849Debug.Assert(hasFacet, "String type did not have MaxLength facet"); 3870Debug.Assert(hasFacet, "decimal must have precision facet"); 3871Debug.Assert(decimalPrecision > 0, "decimal precision must be greater than zero"); 3873Debug.Assert(hasFacet, "decimal must have scale facet"); 3874Debug.Assert(decimalPrecision >= decimalScale, "decimalPrecision must be greater or equal to decimalScale"); 4025Debug.Assert(false); 4039Debug.Assert(!String.IsNullOrEmpty(name)); 4080Debug.Assert(TypeSemantics.IsCollectionType(e.ResultType)); 4112Debug.Assert(TypeSemantics.IsCollectionType(e.ResultType)); 4228Debug.Assert(mappedType != null, "Could not get type usage for primitive type"); 4257Debug.Assert(aggregate.Arguments.Count == 1);
System\Data\SqlClient\SqlGen\SqlSelectClauseBuilder.cs (2)
54Debug.Assert(m_top == null, "SqlSelectStatement.Top has already been set"); 118Debug.Assert(false); // we have removed all possibilities of SELECT *.
System\Data\SqlClient\SqlGen\SymbolPair.cs (1)
53Debug.Assert(false);
System\Data\SqlClient\SqlProviderManifest.cs (6)
177Debug.Assert((this._version == SqlVersion.Sql8) || (this._version == SqlVersion.Sql9), "Found verion other than Sql 8, 9 or 10"); 480Debug.Assert(newPrimitiveTypeKind == PrimitiveTypeKind.String || newPrimitiveTypeKind == PrimitiveTypeKind.Binary, "at this point only string and binary types should be present"); 516System.Diagnostics.Debug.Assert(edmType.EdmType.BuiltInTypeKind == BuiltInTypeKind.PrimitiveType); 609Debug.Assert(tu.Facets[DbProviderManifest.MaxLengthFacetName].Description.IsConstant, "varbinary(max) is not constant!"); 651Debug.Assert(tu.Facets[DbProviderManifest.MaxLengthFacetName].Description.IsConstant, "NVarchar(max) is not constant!"); 680Debug.Assert(tu.Facets[DbProviderManifest.MaxLengthFacetName].Description.IsConstant, "varchar(max) is not constant!");
System\Data\SqlClient\SqlProviderServices.cs (10)
57Debug.Assert(providerManifest != null, "CreateCommandDefinition passed null provider manifest to CreateDbCommandDefinition?"); 58Debug.Assert(commandTree != null, "CreateCommandDefinition did not validate commandTree argument?"); 73Debug.Assert(storeMetadata.StoreProviderManifest != null, "StoreItemCollection has null StoreProviderManifest?"); 299Debug.Assert(sqlTypes != null); 529Debug.Fail("unknown PrimitiveTypeKind " + primitiveTypeKind); 653Debug.Assert(type.EdmType.BuiltInTypeKind == BuiltInTypeKind.PrimitiveType && 687Debug.Assert(type.EdmType.BuiltInTypeKind == BuiltInTypeKind.PrimitiveType && 787Debug.Assert(sqlConnection != null); 863Debug.Assert(!string.IsNullOrEmpty(attachDBFile)); 1044Debug.Assert(sqlConnection != null);
System\Data\SqlClient\SqlProviderUtilities.cs (2)
87Debug.Assert(logFileName != null, "must specify log file with data file"); 368Debug.Assert(new[] { "nvarchar(max)", "varchar(max)", "varbinary(max)" }.Contains(typeName),
System\Data\SqlClient\SqlSpatialDataReader.cs (1)
87Debug.Assert(spatialType != null, "Ensure spatialType is non-null before calling CreateBinaryReadDelegate");
System\Data\SqlClient\SqlSpatialServices.cs (2)
40Debug.Assert(getSqlTypes != null, "Validate SqlTypes assembly delegate before constructing SqlSpatialServiceS"); 127Debug.Assert(expectedSpatialType == this.SqlTypes.SqlGeographyType || expectedSpatialType == this.SqlTypes.SqlGeometryType);
System\Data\SqlClient\SqlSpatialServices.Generated.cs (111)
1156this.smi_SqlGeography_Parse = new Singleton<MethodInfo>(() => { MethodInfo result = FindSqlGeographyStaticMethod("Parse", SqlTypes.SqlStringType); Debug.Assert(result != null, "Could not retrieve MethodInfo for SqlGeography member Parse"); return result; }); 1157this.smi_SqlGeography_STGeomFromText = new Singleton<MethodInfo>(() => { MethodInfo result = FindSqlGeographyStaticMethod("STGeomFromText", SqlTypes.SqlCharsType, typeof(int)); Debug.Assert(result != null, "Could not retrieve MethodInfo for SqlGeography member STGeomFromText"); return result; }); 1158this.smi_SqlGeography_STPointFromText = new Singleton<MethodInfo>(() => { MethodInfo result = FindSqlGeographyStaticMethod("STPointFromText", SqlTypes.SqlCharsType, typeof(int)); Debug.Assert(result != null, "Could not retrieve MethodInfo for SqlGeography member STPointFromText"); return result; }); 1159this.smi_SqlGeography_STLineFromText = new Singleton<MethodInfo>(() => { MethodInfo result = FindSqlGeographyStaticMethod("STLineFromText", SqlTypes.SqlCharsType, typeof(int)); Debug.Assert(result != null, "Could not retrieve MethodInfo for SqlGeography member STLineFromText"); return result; }); 1160this.smi_SqlGeography_STPolyFromText = new Singleton<MethodInfo>(() => { MethodInfo result = FindSqlGeographyStaticMethod("STPolyFromText", SqlTypes.SqlCharsType, typeof(int)); Debug.Assert(result != null, "Could not retrieve MethodInfo for SqlGeography member STPolyFromText"); return result; }); 1161this.smi_SqlGeography_STMPointFromText = new Singleton<MethodInfo>(() => { MethodInfo result = FindSqlGeographyStaticMethod("STMPointFromText", SqlTypes.SqlCharsType, typeof(int)); Debug.Assert(result != null, "Could not retrieve MethodInfo for SqlGeography member STMPointFromText"); return result; }); 1162this.smi_SqlGeography_STMLineFromText = new Singleton<MethodInfo>(() => { MethodInfo result = FindSqlGeographyStaticMethod("STMLineFromText", SqlTypes.SqlCharsType, typeof(int)); Debug.Assert(result != null, "Could not retrieve MethodInfo for SqlGeography member STMLineFromText"); return result; }); 1163this.smi_SqlGeography_STMPolyFromText = new Singleton<MethodInfo>(() => { MethodInfo result = FindSqlGeographyStaticMethod("STMPolyFromText", SqlTypes.SqlCharsType, typeof(int)); Debug.Assert(result != null, "Could not retrieve MethodInfo for SqlGeography member STMPolyFromText"); return result; }); 1164this.smi_SqlGeography_STGeomCollFromText = new Singleton<MethodInfo>(() => { MethodInfo result = FindSqlGeographyStaticMethod("STGeomCollFromText", SqlTypes.SqlCharsType, typeof(int)); Debug.Assert(result != null, "Could not retrieve MethodInfo for SqlGeography member STGeomCollFromText"); return result; }); 1165this.smi_SqlGeography_STGeomFromWKB = new Singleton<MethodInfo>(() => { MethodInfo result = FindSqlGeographyStaticMethod("STGeomFromWKB", SqlTypes.SqlBytesType, typeof(int)); Debug.Assert(result != null, "Could not retrieve MethodInfo for SqlGeography member STGeomFromWKB"); return result; }); 1166this.smi_SqlGeography_STPointFromWKB = new Singleton<MethodInfo>(() => { MethodInfo result = FindSqlGeographyStaticMethod("STPointFromWKB", SqlTypes.SqlBytesType, typeof(int)); Debug.Assert(result != null, "Could not retrieve MethodInfo for SqlGeography member STPointFromWKB"); return result; }); 1167this.smi_SqlGeography_STLineFromWKB = new Singleton<MethodInfo>(() => { MethodInfo result = FindSqlGeographyStaticMethod("STLineFromWKB", SqlTypes.SqlBytesType, typeof(int)); Debug.Assert(result != null, "Could not retrieve MethodInfo for SqlGeography member STLineFromWKB"); return result; }); 1168this.smi_SqlGeography_STPolyFromWKB = new Singleton<MethodInfo>(() => { MethodInfo result = FindSqlGeographyStaticMethod("STPolyFromWKB", SqlTypes.SqlBytesType, typeof(int)); Debug.Assert(result != null, "Could not retrieve MethodInfo for SqlGeography member STPolyFromWKB"); return result; }); 1169this.smi_SqlGeography_STMPointFromWKB = new Singleton<MethodInfo>(() => { MethodInfo result = FindSqlGeographyStaticMethod("STMPointFromWKB", SqlTypes.SqlBytesType, typeof(int)); Debug.Assert(result != null, "Could not retrieve MethodInfo for SqlGeography member STMPointFromWKB"); return result; }); 1170this.smi_SqlGeography_STMLineFromWKB = new Singleton<MethodInfo>(() => { MethodInfo result = FindSqlGeographyStaticMethod("STMLineFromWKB", SqlTypes.SqlBytesType, typeof(int)); Debug.Assert(result != null, "Could not retrieve MethodInfo for SqlGeography member STMLineFromWKB"); return result; }); 1171this.smi_SqlGeography_STMPolyFromWKB = new Singleton<MethodInfo>(() => { MethodInfo result = FindSqlGeographyStaticMethod("STMPolyFromWKB", SqlTypes.SqlBytesType, typeof(int)); Debug.Assert(result != null, "Could not retrieve MethodInfo for SqlGeography member STMPolyFromWKB"); return result; }); 1172this.smi_SqlGeography_STGeomCollFromWKB = new Singleton<MethodInfo>(() => { MethodInfo result = FindSqlGeographyStaticMethod("STGeomCollFromWKB", SqlTypes.SqlBytesType, typeof(int)); Debug.Assert(result != null, "Could not retrieve MethodInfo for SqlGeography member STGeomCollFromWKB"); return result; }); 1173this.smi_SqlGeography_GeomFromGml = new Singleton<MethodInfo>(() => { MethodInfo result = FindSqlGeographyStaticMethod("GeomFromGml", SqlTypes.SqlXmlType, typeof(int)); Debug.Assert(result != null, "Could not retrieve MethodInfo for SqlGeography member GeomFromGml"); return result; }); 1174this.ipi_SqlGeography_STSrid = new Singleton<PropertyInfo>(() => { PropertyInfo result = FindSqlGeographyProperty("STSrid"); Debug.Assert(result != null, "Could not retrieve PropertyInfo for SqlGeography member STSrid"); return result; }); 1175this.imi_SqlGeography_STGeometryType = new Singleton<MethodInfo>(() => { MethodInfo result = FindSqlGeographyMethod("STGeometryType"); Debug.Assert(result != null, "Could not retrieve MethodInfo for SqlGeography member STGeometryType"); return result; }); 1176this.imi_SqlGeography_STDimension = new Singleton<MethodInfo>(() => { MethodInfo result = FindSqlGeographyMethod("STDimension"); Debug.Assert(result != null, "Could not retrieve MethodInfo for SqlGeography member STDimension"); return result; }); 1177this.imi_SqlGeography_STAsBinary = new Singleton<MethodInfo>(() => { MethodInfo result = FindSqlGeographyMethod("STAsBinary"); Debug.Assert(result != null, "Could not retrieve MethodInfo for SqlGeography member STAsBinary"); return result; }); 1178this.imi_SqlGeography_AsGml = new Singleton<MethodInfo>(() => { MethodInfo result = FindSqlGeographyMethod("AsGml"); Debug.Assert(result != null, "Could not retrieve MethodInfo for SqlGeography member AsGml"); return result; }); 1179this.imi_SqlGeography_STAsText = new Singleton<MethodInfo>(() => { MethodInfo result = FindSqlGeographyMethod("STAsText"); Debug.Assert(result != null, "Could not retrieve MethodInfo for SqlGeography member STAsText"); return result; }); 1180this.imi_SqlGeography_STIsEmpty = new Singleton<MethodInfo>(() => { MethodInfo result = FindSqlGeographyMethod("STIsEmpty"); Debug.Assert(result != null, "Could not retrieve MethodInfo for SqlGeography member STIsEmpty"); return result; }); 1181this.imi_SqlGeography_STEquals = new Singleton<MethodInfo>(() => { MethodInfo result = FindSqlGeographyMethod("STEquals", SqlTypes.SqlGeographyType); Debug.Assert(result != null, "Could not retrieve MethodInfo for SqlGeography member STEquals"); return result; }); 1182this.imi_SqlGeography_STDisjoint = new Singleton<MethodInfo>(() => { MethodInfo result = FindSqlGeographyMethod("STDisjoint", SqlTypes.SqlGeographyType); Debug.Assert(result != null, "Could not retrieve MethodInfo for SqlGeography member STDisjoint"); return result; }); 1183this.imi_SqlGeography_STIntersects = new Singleton<MethodInfo>(() => { MethodInfo result = FindSqlGeographyMethod("STIntersects", SqlTypes.SqlGeographyType); Debug.Assert(result != null, "Could not retrieve MethodInfo for SqlGeography member STIntersects"); return result; }); 1184this.imi_SqlGeography_STBuffer = new Singleton<MethodInfo>(() => { MethodInfo result = FindSqlGeographyMethod("STBuffer", typeof(double)); Debug.Assert(result != null, "Could not retrieve MethodInfo for SqlGeography member STBuffer"); return result; }); 1185this.imi_SqlGeography_STDistance = new Singleton<MethodInfo>(() => { MethodInfo result = FindSqlGeographyMethod("STDistance", SqlTypes.SqlGeographyType); Debug.Assert(result != null, "Could not retrieve MethodInfo for SqlGeography member STDistance"); return result; }); 1186this.imi_SqlGeography_STIntersection = new Singleton<MethodInfo>(() => { MethodInfo result = FindSqlGeographyMethod("STIntersection", SqlTypes.SqlGeographyType); Debug.Assert(result != null, "Could not retrieve MethodInfo for SqlGeography member STIntersection"); return result; }); 1187this.imi_SqlGeography_STUnion = new Singleton<MethodInfo>(() => { MethodInfo result = FindSqlGeographyMethod("STUnion", SqlTypes.SqlGeographyType); Debug.Assert(result != null, "Could not retrieve MethodInfo for SqlGeography member STUnion"); return result; }); 1188this.imi_SqlGeography_STDifference = new Singleton<MethodInfo>(() => { MethodInfo result = FindSqlGeographyMethod("STDifference", SqlTypes.SqlGeographyType); Debug.Assert(result != null, "Could not retrieve MethodInfo for SqlGeography member STDifference"); return result; }); 1189this.imi_SqlGeography_STSymDifference = new Singleton<MethodInfo>(() => { MethodInfo result = FindSqlGeographyMethod("STSymDifference", SqlTypes.SqlGeographyType); Debug.Assert(result != null, "Could not retrieve MethodInfo for SqlGeography member STSymDifference"); return result; }); 1190this.imi_SqlGeography_STNumGeometries = new Singleton<MethodInfo>(() => { MethodInfo result = FindSqlGeographyMethod("STNumGeometries"); Debug.Assert(result != null, "Could not retrieve MethodInfo for SqlGeography member STNumGeometries"); return result; }); 1191this.imi_SqlGeography_STGeometryN = new Singleton<MethodInfo>(() => { MethodInfo result = FindSqlGeographyMethod("STGeometryN", typeof(int)); Debug.Assert(result != null, "Could not retrieve MethodInfo for SqlGeography member STGeometryN"); return result; }); 1192this.ipi_SqlGeography_Lat = new Singleton<PropertyInfo>(() => { PropertyInfo result = FindSqlGeographyProperty("Lat"); Debug.Assert(result != null, "Could not retrieve PropertyInfo for SqlGeography member Lat"); return result; }); 1193this.ipi_SqlGeography_Long = new Singleton<PropertyInfo>(() => { PropertyInfo result = FindSqlGeographyProperty("Long"); Debug.Assert(result != null, "Could not retrieve PropertyInfo for SqlGeography member Long"); return result; }); 1194this.ipi_SqlGeography_Z = new Singleton<PropertyInfo>(() => { PropertyInfo result = FindSqlGeographyProperty("Z"); Debug.Assert(result != null, "Could not retrieve PropertyInfo for SqlGeography member Z"); return result; }); 1195this.ipi_SqlGeography_M = new Singleton<PropertyInfo>(() => { PropertyInfo result = FindSqlGeographyProperty("M"); Debug.Assert(result != null, "Could not retrieve PropertyInfo for SqlGeography member M"); return result; }); 1196this.imi_SqlGeography_STLength = new Singleton<MethodInfo>(() => { MethodInfo result = FindSqlGeographyMethod("STLength"); Debug.Assert(result != null, "Could not retrieve MethodInfo for SqlGeography member STLength"); return result; }); 1197this.imi_SqlGeography_STStartPoint = new Singleton<MethodInfo>(() => { MethodInfo result = FindSqlGeographyMethod("STStartPoint"); Debug.Assert(result != null, "Could not retrieve MethodInfo for SqlGeography member STStartPoint"); return result; }); 1198this.imi_SqlGeography_STEndPoint = new Singleton<MethodInfo>(() => { MethodInfo result = FindSqlGeographyMethod("STEndPoint"); Debug.Assert(result != null, "Could not retrieve MethodInfo for SqlGeography member STEndPoint"); return result; }); 1199this.imi_SqlGeography_STIsClosed = new Singleton<MethodInfo>(() => { MethodInfo result = FindSqlGeographyMethod("STIsClosed"); Debug.Assert(result != null, "Could not retrieve MethodInfo for SqlGeography member STIsClosed"); return result; }); 1200this.imi_SqlGeography_STNumPoints = new Singleton<MethodInfo>(() => { MethodInfo result = FindSqlGeographyMethod("STNumPoints"); Debug.Assert(result != null, "Could not retrieve MethodInfo for SqlGeography member STNumPoints"); return result; }); 1201this.imi_SqlGeography_STPointN = new Singleton<MethodInfo>(() => { MethodInfo result = FindSqlGeographyMethod("STPointN", typeof(int)); Debug.Assert(result != null, "Could not retrieve MethodInfo for SqlGeography member STPointN"); return result; }); 1202this.imi_SqlGeography_STArea = new Singleton<MethodInfo>(() => { MethodInfo result = FindSqlGeographyMethod("STArea"); Debug.Assert(result != null, "Could not retrieve MethodInfo for SqlGeography member STArea"); return result; }); 1203this.smi_SqlGeometry_Parse = new Singleton<MethodInfo>(() => { MethodInfo result = FindSqlGeometryStaticMethod("Parse", SqlTypes.SqlStringType); Debug.Assert(result != null, "Could not retrieve MethodInfo for SqlGeometry member Parse"); return result; }); 1204this.smi_SqlGeometry_STGeomFromText = new Singleton<MethodInfo>(() => { MethodInfo result = FindSqlGeometryStaticMethod("STGeomFromText", SqlTypes.SqlCharsType, typeof(int)); Debug.Assert(result != null, "Could not retrieve MethodInfo for SqlGeometry member STGeomFromText"); return result; }); 1205this.smi_SqlGeometry_STPointFromText = new Singleton<MethodInfo>(() => { MethodInfo result = FindSqlGeometryStaticMethod("STPointFromText", SqlTypes.SqlCharsType, typeof(int)); Debug.Assert(result != null, "Could not retrieve MethodInfo for SqlGeometry member STPointFromText"); return result; }); 1206this.smi_SqlGeometry_STLineFromText = new Singleton<MethodInfo>(() => { MethodInfo result = FindSqlGeometryStaticMethod("STLineFromText", SqlTypes.SqlCharsType, typeof(int)); Debug.Assert(result != null, "Could not retrieve MethodInfo for SqlGeometry member STLineFromText"); return result; }); 1207this.smi_SqlGeometry_STPolyFromText = new Singleton<MethodInfo>(() => { MethodInfo result = FindSqlGeometryStaticMethod("STPolyFromText", SqlTypes.SqlCharsType, typeof(int)); Debug.Assert(result != null, "Could not retrieve MethodInfo for SqlGeometry member STPolyFromText"); return result; }); 1208this.smi_SqlGeometry_STMPointFromText = new Singleton<MethodInfo>(() => { MethodInfo result = FindSqlGeometryStaticMethod("STMPointFromText", SqlTypes.SqlCharsType, typeof(int)); Debug.Assert(result != null, "Could not retrieve MethodInfo for SqlGeometry member STMPointFromText"); return result; }); 1209this.smi_SqlGeometry_STMLineFromText = new Singleton<MethodInfo>(() => { MethodInfo result = FindSqlGeometryStaticMethod("STMLineFromText", SqlTypes.SqlCharsType, typeof(int)); Debug.Assert(result != null, "Could not retrieve MethodInfo for SqlGeometry member STMLineFromText"); return result; }); 1210this.smi_SqlGeometry_STMPolyFromText = new Singleton<MethodInfo>(() => { MethodInfo result = FindSqlGeometryStaticMethod("STMPolyFromText", SqlTypes.SqlCharsType, typeof(int)); Debug.Assert(result != null, "Could not retrieve MethodInfo for SqlGeometry member STMPolyFromText"); return result; }); 1211this.smi_SqlGeometry_STGeomCollFromText = new Singleton<MethodInfo>(() => { MethodInfo result = FindSqlGeometryStaticMethod("STGeomCollFromText", SqlTypes.SqlCharsType, typeof(int)); Debug.Assert(result != null, "Could not retrieve MethodInfo for SqlGeometry member STGeomCollFromText"); return result; }); 1212this.smi_SqlGeometry_STGeomFromWKB = new Singleton<MethodInfo>(() => { MethodInfo result = FindSqlGeometryStaticMethod("STGeomFromWKB", SqlTypes.SqlBytesType, typeof(int)); Debug.Assert(result != null, "Could not retrieve MethodInfo for SqlGeometry member STGeomFromWKB"); return result; }); 1213this.smi_SqlGeometry_STPointFromWKB = new Singleton<MethodInfo>(() => { MethodInfo result = FindSqlGeometryStaticMethod("STPointFromWKB", SqlTypes.SqlBytesType, typeof(int)); Debug.Assert(result != null, "Could not retrieve MethodInfo for SqlGeometry member STPointFromWKB"); return result; }); 1214this.smi_SqlGeometry_STLineFromWKB = new Singleton<MethodInfo>(() => { MethodInfo result = FindSqlGeometryStaticMethod("STLineFromWKB", SqlTypes.SqlBytesType, typeof(int)); Debug.Assert(result != null, "Could not retrieve MethodInfo for SqlGeometry member STLineFromWKB"); return result; }); 1215this.smi_SqlGeometry_STPolyFromWKB = new Singleton<MethodInfo>(() => { MethodInfo result = FindSqlGeometryStaticMethod("STPolyFromWKB", SqlTypes.SqlBytesType, typeof(int)); Debug.Assert(result != null, "Could not retrieve MethodInfo for SqlGeometry member STPolyFromWKB"); return result; }); 1216this.smi_SqlGeometry_STMPointFromWKB = new Singleton<MethodInfo>(() => { MethodInfo result = FindSqlGeometryStaticMethod("STMPointFromWKB", SqlTypes.SqlBytesType, typeof(int)); Debug.Assert(result != null, "Could not retrieve MethodInfo for SqlGeometry member STMPointFromWKB"); return result; }); 1217this.smi_SqlGeometry_STMLineFromWKB = new Singleton<MethodInfo>(() => { MethodInfo result = FindSqlGeometryStaticMethod("STMLineFromWKB", SqlTypes.SqlBytesType, typeof(int)); Debug.Assert(result != null, "Could not retrieve MethodInfo for SqlGeometry member STMLineFromWKB"); return result; }); 1218this.smi_SqlGeometry_STMPolyFromWKB = new Singleton<MethodInfo>(() => { MethodInfo result = FindSqlGeometryStaticMethod("STMPolyFromWKB", SqlTypes.SqlBytesType, typeof(int)); Debug.Assert(result != null, "Could not retrieve MethodInfo for SqlGeometry member STMPolyFromWKB"); return result; }); 1219this.smi_SqlGeometry_STGeomCollFromWKB = new Singleton<MethodInfo>(() => { MethodInfo result = FindSqlGeometryStaticMethod("STGeomCollFromWKB", SqlTypes.SqlBytesType, typeof(int)); Debug.Assert(result != null, "Could not retrieve MethodInfo for SqlGeometry member STGeomCollFromWKB"); return result; }); 1220this.smi_SqlGeometry_GeomFromGml = new Singleton<MethodInfo>(() => { MethodInfo result = FindSqlGeometryStaticMethod("GeomFromGml", SqlTypes.SqlXmlType, typeof(int)); Debug.Assert(result != null, "Could not retrieve MethodInfo for SqlGeometry member GeomFromGml"); return result; }); 1221this.ipi_SqlGeometry_STSrid = new Singleton<PropertyInfo>(() => { PropertyInfo result = FindSqlGeometryProperty("STSrid"); Debug.Assert(result != null, "Could not retrieve PropertyInfo for SqlGeometry member STSrid"); return result; }); 1222this.imi_SqlGeometry_STGeometryType = new Singleton<MethodInfo>(() => { MethodInfo result = FindSqlGeometryMethod("STGeometryType"); Debug.Assert(result != null, "Could not retrieve MethodInfo for SqlGeometry member STGeometryType"); return result; }); 1223this.imi_SqlGeometry_STDimension = new Singleton<MethodInfo>(() => { MethodInfo result = FindSqlGeometryMethod("STDimension"); Debug.Assert(result != null, "Could not retrieve MethodInfo for SqlGeometry member STDimension"); return result; }); 1224this.imi_SqlGeometry_STEnvelope = new Singleton<MethodInfo>(() => { MethodInfo result = FindSqlGeometryMethod("STEnvelope"); Debug.Assert(result != null, "Could not retrieve MethodInfo for SqlGeometry member STEnvelope"); return result; }); 1225this.imi_SqlGeometry_STAsBinary = new Singleton<MethodInfo>(() => { MethodInfo result = FindSqlGeometryMethod("STAsBinary"); Debug.Assert(result != null, "Could not retrieve MethodInfo for SqlGeometry member STAsBinary"); return result; }); 1226this.imi_SqlGeometry_AsGml = new Singleton<MethodInfo>(() => { MethodInfo result = FindSqlGeometryMethod("AsGml"); Debug.Assert(result != null, "Could not retrieve MethodInfo for SqlGeometry member AsGml"); return result; }); 1227this.imi_SqlGeometry_STAsText = new Singleton<MethodInfo>(() => { MethodInfo result = FindSqlGeometryMethod("STAsText"); Debug.Assert(result != null, "Could not retrieve MethodInfo for SqlGeometry member STAsText"); return result; }); 1228this.imi_SqlGeometry_STIsEmpty = new Singleton<MethodInfo>(() => { MethodInfo result = FindSqlGeometryMethod("STIsEmpty"); Debug.Assert(result != null, "Could not retrieve MethodInfo for SqlGeometry member STIsEmpty"); return result; }); 1229this.imi_SqlGeometry_STIsSimple = new Singleton<MethodInfo>(() => { MethodInfo result = FindSqlGeometryMethod("STIsSimple"); Debug.Assert(result != null, "Could not retrieve MethodInfo for SqlGeometry member STIsSimple"); return result; }); 1230this.imi_SqlGeometry_STBoundary = new Singleton<MethodInfo>(() => { MethodInfo result = FindSqlGeometryMethod("STBoundary"); Debug.Assert(result != null, "Could not retrieve MethodInfo for SqlGeometry member STBoundary"); return result; }); 1231this.imi_SqlGeometry_STIsValid = new Singleton<MethodInfo>(() => { MethodInfo result = FindSqlGeometryMethod("STIsValid"); Debug.Assert(result != null, "Could not retrieve MethodInfo for SqlGeometry member STIsValid"); return result; }); 1232this.imi_SqlGeometry_STEquals = new Singleton<MethodInfo>(() => { MethodInfo result = FindSqlGeometryMethod("STEquals", SqlTypes.SqlGeometryType); Debug.Assert(result != null, "Could not retrieve MethodInfo for SqlGeometry member STEquals"); return result; }); 1233this.imi_SqlGeometry_STDisjoint = new Singleton<MethodInfo>(() => { MethodInfo result = FindSqlGeometryMethod("STDisjoint", SqlTypes.SqlGeometryType); Debug.Assert(result != null, "Could not retrieve MethodInfo for SqlGeometry member STDisjoint"); return result; }); 1234this.imi_SqlGeometry_STIntersects = new Singleton<MethodInfo>(() => { MethodInfo result = FindSqlGeometryMethod("STIntersects", SqlTypes.SqlGeometryType); Debug.Assert(result != null, "Could not retrieve MethodInfo for SqlGeometry member STIntersects"); return result; }); 1235this.imi_SqlGeometry_STTouches = new Singleton<MethodInfo>(() => { MethodInfo result = FindSqlGeometryMethod("STTouches", SqlTypes.SqlGeometryType); Debug.Assert(result != null, "Could not retrieve MethodInfo for SqlGeometry member STTouches"); return result; }); 1236this.imi_SqlGeometry_STCrosses = new Singleton<MethodInfo>(() => { MethodInfo result = FindSqlGeometryMethod("STCrosses", SqlTypes.SqlGeometryType); Debug.Assert(result != null, "Could not retrieve MethodInfo for SqlGeometry member STCrosses"); return result; }); 1237this.imi_SqlGeometry_STWithin = new Singleton<MethodInfo>(() => { MethodInfo result = FindSqlGeometryMethod("STWithin", SqlTypes.SqlGeometryType); Debug.Assert(result != null, "Could not retrieve MethodInfo for SqlGeometry member STWithin"); return result; }); 1238this.imi_SqlGeometry_STContains = new Singleton<MethodInfo>(() => { MethodInfo result = FindSqlGeometryMethod("STContains", SqlTypes.SqlGeometryType); Debug.Assert(result != null, "Could not retrieve MethodInfo for SqlGeometry member STContains"); return result; }); 1239this.imi_SqlGeometry_STOverlaps = new Singleton<MethodInfo>(() => { MethodInfo result = FindSqlGeometryMethod("STOverlaps", SqlTypes.SqlGeometryType); Debug.Assert(result != null, "Could not retrieve MethodInfo for SqlGeometry member STOverlaps"); return result; }); 1240this.imi_SqlGeometry_STRelate = new Singleton<MethodInfo>(() => { MethodInfo result = FindSqlGeometryMethod("STRelate", SqlTypes.SqlGeometryType, typeof(string)); Debug.Assert(result != null, "Could not retrieve MethodInfo for SqlGeometry member STRelate"); return result; }); 1241this.imi_SqlGeometry_STBuffer = new Singleton<MethodInfo>(() => { MethodInfo result = FindSqlGeometryMethod("STBuffer", typeof(double)); Debug.Assert(result != null, "Could not retrieve MethodInfo for SqlGeometry member STBuffer"); return result; }); 1242this.imi_SqlGeometry_STDistance = new Singleton<MethodInfo>(() => { MethodInfo result = FindSqlGeometryMethod("STDistance", SqlTypes.SqlGeometryType); Debug.Assert(result != null, "Could not retrieve MethodInfo for SqlGeometry member STDistance"); return result; }); 1243this.imi_SqlGeometry_STConvexHull = new Singleton<MethodInfo>(() => { MethodInfo result = FindSqlGeometryMethod("STConvexHull"); Debug.Assert(result != null, "Could not retrieve MethodInfo for SqlGeometry member STConvexHull"); return result; }); 1244this.imi_SqlGeometry_STIntersection = new Singleton<MethodInfo>(() => { MethodInfo result = FindSqlGeometryMethod("STIntersection", SqlTypes.SqlGeometryType); Debug.Assert(result != null, "Could not retrieve MethodInfo for SqlGeometry member STIntersection"); return result; }); 1245this.imi_SqlGeometry_STUnion = new Singleton<MethodInfo>(() => { MethodInfo result = FindSqlGeometryMethod("STUnion", SqlTypes.SqlGeometryType); Debug.Assert(result != null, "Could not retrieve MethodInfo for SqlGeometry member STUnion"); return result; }); 1246this.imi_SqlGeometry_STDifference = new Singleton<MethodInfo>(() => { MethodInfo result = FindSqlGeometryMethod("STDifference", SqlTypes.SqlGeometryType); Debug.Assert(result != null, "Could not retrieve MethodInfo for SqlGeometry member STDifference"); return result; }); 1247this.imi_SqlGeometry_STSymDifference = new Singleton<MethodInfo>(() => { MethodInfo result = FindSqlGeometryMethod("STSymDifference", SqlTypes.SqlGeometryType); Debug.Assert(result != null, "Could not retrieve MethodInfo for SqlGeometry member STSymDifference"); return result; }); 1248this.imi_SqlGeometry_STNumGeometries = new Singleton<MethodInfo>(() => { MethodInfo result = FindSqlGeometryMethod("STNumGeometries"); Debug.Assert(result != null, "Could not retrieve MethodInfo for SqlGeometry member STNumGeometries"); return result; }); 1249this.imi_SqlGeometry_STGeometryN = new Singleton<MethodInfo>(() => { MethodInfo result = FindSqlGeometryMethod("STGeometryN", typeof(int)); Debug.Assert(result != null, "Could not retrieve MethodInfo for SqlGeometry member STGeometryN"); return result; }); 1250this.ipi_SqlGeometry_STX = new Singleton<PropertyInfo>(() => { PropertyInfo result = FindSqlGeometryProperty("STX"); Debug.Assert(result != null, "Could not retrieve PropertyInfo for SqlGeometry member STX"); return result; }); 1251this.ipi_SqlGeometry_STY = new Singleton<PropertyInfo>(() => { PropertyInfo result = FindSqlGeometryProperty("STY"); Debug.Assert(result != null, "Could not retrieve PropertyInfo for SqlGeometry member STY"); return result; }); 1252this.ipi_SqlGeometry_Z = new Singleton<PropertyInfo>(() => { PropertyInfo result = FindSqlGeometryProperty("Z"); Debug.Assert(result != null, "Could not retrieve PropertyInfo for SqlGeometry member Z"); return result; }); 1253this.ipi_SqlGeometry_M = new Singleton<PropertyInfo>(() => { PropertyInfo result = FindSqlGeometryProperty("M"); Debug.Assert(result != null, "Could not retrieve PropertyInfo for SqlGeometry member M"); return result; }); 1254this.imi_SqlGeometry_STLength = new Singleton<MethodInfo>(() => { MethodInfo result = FindSqlGeometryMethod("STLength"); Debug.Assert(result != null, "Could not retrieve MethodInfo for SqlGeometry member STLength"); return result; }); 1255this.imi_SqlGeometry_STStartPoint = new Singleton<MethodInfo>(() => { MethodInfo result = FindSqlGeometryMethod("STStartPoint"); Debug.Assert(result != null, "Could not retrieve MethodInfo for SqlGeometry member STStartPoint"); return result; }); 1256this.imi_SqlGeometry_STEndPoint = new Singleton<MethodInfo>(() => { MethodInfo result = FindSqlGeometryMethod("STEndPoint"); Debug.Assert(result != null, "Could not retrieve MethodInfo for SqlGeometry member STEndPoint"); return result; }); 1257this.imi_SqlGeometry_STIsClosed = new Singleton<MethodInfo>(() => { MethodInfo result = FindSqlGeometryMethod("STIsClosed"); Debug.Assert(result != null, "Could not retrieve MethodInfo for SqlGeometry member STIsClosed"); return result; }); 1258this.imi_SqlGeometry_STIsRing = new Singleton<MethodInfo>(() => { MethodInfo result = FindSqlGeometryMethod("STIsRing"); Debug.Assert(result != null, "Could not retrieve MethodInfo for SqlGeometry member STIsRing"); return result; }); 1259this.imi_SqlGeometry_STNumPoints = new Singleton<MethodInfo>(() => { MethodInfo result = FindSqlGeometryMethod("STNumPoints"); Debug.Assert(result != null, "Could not retrieve MethodInfo for SqlGeometry member STNumPoints"); return result; }); 1260this.imi_SqlGeometry_STPointN = new Singleton<MethodInfo>(() => { MethodInfo result = FindSqlGeometryMethod("STPointN", typeof(int)); Debug.Assert(result != null, "Could not retrieve MethodInfo for SqlGeometry member STPointN"); return result; }); 1261this.imi_SqlGeometry_STArea = new Singleton<MethodInfo>(() => { MethodInfo result = FindSqlGeometryMethod("STArea"); Debug.Assert(result != null, "Could not retrieve MethodInfo for SqlGeometry member STArea"); return result; }); 1262this.imi_SqlGeometry_STCentroid = new Singleton<MethodInfo>(() => { MethodInfo result = FindSqlGeometryMethod("STCentroid"); Debug.Assert(result != null, "Could not retrieve MethodInfo for SqlGeometry member STCentroid"); return result; }); 1263this.imi_SqlGeometry_STPointOnSurface = new Singleton<MethodInfo>(() => { MethodInfo result = FindSqlGeometryMethod("STPointOnSurface"); Debug.Assert(result != null, "Could not retrieve MethodInfo for SqlGeometry member STPointOnSurface"); return result; }); 1264this.imi_SqlGeometry_STExteriorRing = new Singleton<MethodInfo>(() => { MethodInfo result = FindSqlGeometryMethod("STExteriorRing"); Debug.Assert(result != null, "Could not retrieve MethodInfo for SqlGeometry member STExteriorRing"); return result; }); 1265this.imi_SqlGeometry_STNumInteriorRing = new Singleton<MethodInfo>(() => { MethodInfo result = FindSqlGeometryMethod("STNumInteriorRing"); Debug.Assert(result != null, "Could not retrieve MethodInfo for SqlGeometry member STNumInteriorRing"); return result; }); 1266this.imi_SqlGeometry_STInteriorRingN = new Singleton<MethodInfo>(() => { MethodInfo result = FindSqlGeometryMethod("STInteriorRingN", typeof(int)); Debug.Assert(result != null, "Could not retrieve MethodInfo for SqlGeometry member STInteriorRingN"); return result; });
System\Data\SqlClient\SqlTypesAssembly.cs (20)
80Debug.Assert(prop != null, "Type '" + exp.Type.FullName + "' does not declare a public instance property with the name '" + propertyName + "'"); 159Debug.Assert(sqlGeog != null, "SqlGeography type was not properly retrieved?"); 160Debug.Assert(sqlGeom != null, "SqlGeometry type was not properly retrieved?"); 427Debug.Assert(wellKnownBinary != null, "Validate WKB before calling SqlTypesGeographyFromBinary"); 433Debug.Assert(wellKnownText != null, "Validate WKT before calling SqlTypesGeographyFromText"); 446Debug.Assert(wellKnownBinary != null, "Validate WKB before calling SqlTypesGeometryFromBinary"); 452Debug.Assert(wellKnownText != null, "Validate WKT before calling SqlTypesGeometryFromText"); 462Debug.Assert(spatialValue != null, "Ensure spatial value is non-null before calling GetSqlTypesSpatialValue"); 519Debug.Assert(spatialType != null, "Ensure spatialType is non-null before calling CreateStaticConstructorDelegate"); 523Debug.Assert(staticCtorMethod != null, "Could not find method '" + methodName + "' on type '" + spatialType.FullName + "'"); 524Debug.Assert(staticCtorMethod.GetParameters().Length == 2 && staticCtorMethod.GetParameters()[1].ParameterType == typeof(int), "Static constructor method on '" + spatialType.FullName + "' does not match static constructor pattern?"); 552Debug.Assert(toConvert.Type == typeof(System.Xml.XmlReader), "Argument to static constructor method was not byte[], string or XmlReader?"); 565Debug.Assert(sqlBytesType.Name == "SqlBytes", "byte[] argument used with non-SqlBytes static constructor method?"); 567Debug.Assert(byteArrayCtor != null, "SqlXml(System.IO.Stream) constructor not found?"); 575Debug.Assert(sqlCharsType.Name == "SqlChars", "String argument used with non-SqlChars static constructor method?"); 578Debug.Assert(sqlCharsFromSqlStringCtor != null, "SqlXml(System.IO.Stream) constructor not found?"); 587Debug.Assert(sqlStringType.Name == "SqlString", "String argument used with non-SqlString static constructor method?"); 589Debug.Assert(sqlStringFromStringCtor != null); 597Debug.Assert(sqlXmlType.Name == "SqlXml", "Stream argument used with non-SqlXml static constructor method?"); 599Debug.Assert(readerCtor != null, "SqlXml(System.Xml.XmlReader) constructor not found?");
System\Data\SqlClient\SqlVersion.cs (2)
53System.Diagnostics.Debug.Assert(connection.State == ConnectionState.Open, "Expected an open connection"); 65System.Diagnostics.Debug.Assert(majorVersion == 8, "not version 8");
System.Data.Entity.Design (227)
System\Data\Entity\Design\AspNet\BuildProviderUtils.cs (2)
59Debug.Assert(name.StartsWith("~/", StringComparison.OrdinalIgnoreCase), "Expected app-relative path to start with ~/"); 67Debug.Assert(name.StartsWith(".", StringComparison.OrdinalIgnoreCase) == false, "resource name unexpectedly starts with .");
System\Data\Entity\Design\AspNet\EntityModelBuildProvider.cs (2)
107Debug.Assert(targetFrameworkVersion != null, "targetFrameworkVersion should not be null."); 108Debug.Assert(targetFrameworkVersion >= new Version(3, 5), "This assembly doesn't exist pre-3.5.");
System\Data\Entity\Design\Common\MetadataItemSerializer.cs (13)
55Debug.Assert(writer != null, "writer parameter is null"); 56Debug.Assert(collection != null, "collection parameter is null"); 57Debug.Assert(errorsLookup != null, "errorsLookup parameter is null"); 58Debug.Assert(!string.IsNullOrEmpty(namespaceToWrite), "namespaceToWrite parameter is null or empty"); 165Debug.Assert(_schemaVersion >= EntityFrameworkVersions.Version3, "_schemaVersion >= EntityFrameworkVersions.Version3"); 190Debug.Assert(_schemaVersion >= EntityFrameworkVersions.Version3, "_schemaVersion >= EntityFrameworkVersions.Version3"); 201Debug.Assert(!_isModel, "Serialization of CommandTextAttribute is not supported for CSDL."); 221Debug.Assert(_schemaVersion >= EntityFrameworkVersions.Version3 && !_isModel, "_schemaVersion >= EntityFrameworkVersions.Version3 && !_isModel"); 223Debug.Assert(elementType.BuiltInTypeKind == BuiltInTypeKind.RowType, "TVF return type is expected to be Collection(RowType)"); 234Debug.Assert(function.ReturnParameter == null || returnParameterHandled, "ReturnParameter was not handled."); 349Debug.Fail("Did you add a new RelationshipMultiplicity?"); 401Debug.Assert(errors.Count > 0, "how did we get an empty errors collection?"); 581Debug.Assert(mi != null, "Method GetAssociatedFacetDescriptions is missing");
System\Data\Entity\Design\Common\MetadataUtil.cs (6)
199Debug.Assert(args.Length > 0, "Formatting utilities must be called with at least one argument"); 224Debug.Fail("the name is not in the form we expect"); 245Debug.Assert(e != null, "Unexpected null exception!"); 263Debug.Assert(errors != null); 276Debug.Assert(count != 0, "Empty Error List"); 282Debug.Assert(xmlReaders != null);
System\Data\Entity\Design\Common\OneToOneMappingSerializer.cs (20)
54Debug.Assert(_modelAssociationSet == null, "why is this getting set multiple times, it should only be set after the new set is created"); 61Debug.Assert(entitySet != null, "entitySet parameter is null"); 77Debug.Assert(index >= 0 && index < AssociationSets.Count, "out of bounds dude!!"); 78Debug.Assert(AssociationSets.Count == 2, "This code depends on only having exactly two AssociationSets"); 138Debug.Assert(set.ElementType.ReferentialConstraints.Count == 1, "no referenctial constraint for association[0]"); 141Debug.Assert(set.AssociationSetEnds.Count == 2, "Associations are assumed to have two ends"); 237Debug.Assert(_storeAssociationSets.Count == 2, "don't call this method if you don't have two associations"); 238Debug.Assert(_storeAssociationSets[0].ElementType.ReferentialConstraints.Count == 1, "no referenctial constraint for association[0]"); 239Debug.Assert(_storeAssociationSets[1].ElementType.ReferentialConstraints.Count == 1, "no referenctial constraint for association[1]"); 308Debug.Assert(storeFunction.IsComposableAttribute, "storeFunction.IsComposableAttribute"); 309Debug.Assert(storeFunction.ReturnParameters.Count == 1, "storeFunction.ReturnParameters.Count == 1"); 310Debug.Assert(functionImport.IsComposableAttribute, "functionImport.IsComposableAttribute"); 311Debug.Assert(functionImport.ReturnParameters.Count == 1, "functionImport.ReturnParameters.Count == 1"); 321Debug.Assert(functionImport.ReturnParameter.TypeUsage.EdmType.BuiltInTypeKind == BuiltInTypeKind.CollectionType, "functionImport is expected to return Collection(ComplexType)"); 323Debug.Assert(modelCollectionType.TypeUsage.EdmType.BuiltInTypeKind == BuiltInTypeKind.ComplexType, "functionImport is expected to return Collection(ComplexType)"); 340Debug.Fail("Only TVF store functions are supported."); 424Debug.Assert(constraint == null, "we should only get one"); 427Debug.Assert(constraint != null, "we should get at least one constraint"); 497Debug.Assert(store.TypeUsage.EdmType.BuiltInTypeKind == BuiltInTypeKind.PrimitiveType, "only expect scalar type properties"); 498Debug.Assert(model.TypeUsage.EdmType.BuiltInTypeKind == BuiltInTypeKind.PrimitiveType, "only expect scalar type properties");
System\Data\Entity\Design\Common\UniqueIdentifierService.cs (5)
34Debug.Assert(transform != null, "use the other constructor if you don't want any transform"); 52Debug.Assert(!_knownIdentifiers.ContainsKey(identifier), "don't register identifiers that already exist"); 67Debug.Assert(!string.IsNullOrEmpty(identifier), "identifier is null or empty"); 79Debug.Assert(!_knownIdentifiers.ContainsKey(adjustedIdentifier), "we just made it unique"); 84Debug.Assert(!_identifierToAdjustedIdentifier.ContainsKey(value), "should never register one value twice");
System\Data\Entity\Design\EntityCodeGenerator.cs (6)
606Debug.Assert(_transformText != null, "Unable to find method, did the signature or name change?"); 609Debug.Assert(_sourceCsdlPath != null, "Unable to find property, did the signature or name change?"); 612Debug.Assert(_referenceCsdlPaths != null, "Unable to find property, did the signature or name change?"); 615Debug.Assert(_errors != null, "Unable to find property, did the signature or name change?"); 618Debug.Assert(_edmToObjectNamespaceMap != null, "Unable to find property, did the signature or name change?"); 687Debug.Assert(language == LanguageOption.GenerateVBCode, "Did you add a new option?");
System\Data\Entity\Design\EntityFrameworkVersions.cs (14)
58Debug.Assert(!string.IsNullOrEmpty(resourceName), "Did you forget to map something new?"); 66Debug.Assert(IsValidVersion(entityFrameworkVersion), "Did you forget to check for valid versions before calling this private method?"); 75Debug.Assert(IsValidVersion(entityFrameworkVersion), "Did you forget to check for valid versions before calling this private method?"); 83Debug.Assert(IsValidVersion(entityFrameworkVersion), "Did you add a new version or forget to check the version"); 101Debug.Assert(entityFrameworkVersion == EntityFrameworkVersions.Version3, "did you add a new version?"); 108Debug.Assert(ValidVersions.Contains(entityFrameworkVersion), "Did you forget to check for valid versions before calling this private method?"); 116Debug.Assert(IsValidVersion(entityFrameworkVersion), "Did you add a new version or forget to check the version"); 117Debug.Assert(dataSpace == DataSpace.CSpace || 133Debug.Assert(ValidVersions.Contains(entityFrameworkVersion), "Did you forget to check for valid versions before calling this private method?"); 144Debug.Assert(entityFrameworkVersion == EntityFrameworkVersions.Version3, "did you add a new version?"); 151Debug.Assert(ValidVersions.Contains(entityFrameworkVersion), "Did you forget to check for valid versions before calling this private method?"); 162Debug.Assert(entityFrameworkVersion == EntityFrameworkVersions.Version3, "did you add a new version?"); 169Debug.Assert(ValidVersions.Contains(entityFrameworkVersion), "Did you forget to check for valid versions before calling this private method?"); 180Debug.Assert(entityFrameworkVersion == EntityFrameworkVersions.Version3, "did you add a new version?");
System\Data\Entity\Design\EntityFrameworkVersionsUtil.cs (1)
36Debug.Assert(runtimeVersion == 3.0, "Did you add a new version?");
System\Data\Entity\Design\EntityModelSchemaGenerator.cs (28)
174Debug.Assert(this._pluralizationServiceHandler != null, "all constructor should call initialize() to set the handler"); 289Debug.Assert(message != null, "message parameter is null"); 396Debug.Assert(EntityFrameworkVersions.Latest == EntityFrameworkVersions.Version3, "Did you add a new framework version"); 465Debug.Assert(writer != null, "writer != null"); 466Debug.Assert(_edmItemCollection != null, "_edmItemCollection != null"); 467Debug.Assert(_namespaceName != null, "_namespaceName != null"); 468Debug.Assert(_targetEntityFrameworkVersion != null, "_targetEntityFrameworkVersion != null"); 483Debug.Assert(writer != null, "writer != null"); 484Debug.Assert(_mappingLookups != null, "_mappingLookups != null"); 485Debug.Assert(_storeEntityContainer != null, "_storeEntityContainer != null"); 486Debug.Assert(_modelEntityContainer != null, "_modelEntityContainer != null"); 487Debug.Assert(_targetEntityFrameworkVersion != null, "_targetEntityFrameworkVersion != null"); 560Debug.Assert(storeParameter.Mode == ParameterMode.In, "Function import mapping is supported only for 'In' parameters."); 569Debug.Assert(MetadataUtil.IsStoreType(tvfReturnType), "this is not a store type"); 762Debug.Assert(MetadataUtil.IsStoreType(storeEntityType), "this is not a store type"); 763Debug.Assert(storeEntityType.BaseType == null, "we are assuming simple generation from a database where no types will have a base type"); 974Debug.Assert(session != null, "session parameter is null"); 975Debug.Assert(storeAssociation != null, "storeAssociation parameter is null"); 976Debug.Assert(storeAssociation.ReferentialConstraints.Count <= 1, "We don't have a reason to have more than one constraint yet"); 985Debug.Assert(storeConstraint.FromProperties.Count == storeConstraint.ToProperties.Count, "FromProperties and ToProperties have different counts"); 986Debug.Assert(storeConstraint.FromProperties.Count != 0, "No properties in the constraint, why does the constraint exist?"); 987Debug.Assert(storeConstraint.ToProperties[0].DeclaringType.BuiltInTypeKind == BuiltInTypeKind.EntityType, "The property is not from an EntityType"); 1028Debug.Assert(storeConstraint.FromProperties.Count == storeConstraint.ToProperties.Count, "FromProperties and ToProperties have different counts"); 1029Debug.Assert(storeConstraint.FromProperties.Count != 0, "No properties in the constraint, why does the constraint exist?"); 1030Debug.Assert(storeConstraint.ToProperties[0].DeclaringType.BuiltInTypeKind == BuiltInTypeKind.EntityType, "The property is not from an EntityType"); 1043Debug.Assert(association.Members.Count == 2, "this code assumes two ends"); 1086Debug.Assert(storeEndMember.TypeUsage.EdmType.BuiltInTypeKind == BuiltInTypeKind.RefType, "The type is not a ref type"); 1087Debug.Assert(((RefType)storeEndMember.TypeUsage.EdmType).ElementType.BuiltInTypeKind == BuiltInTypeKind.EntityType, "the ref is not holding on to an EntityType");
System\Data\Entity\Design\EntityStoreSchemaGenerator.cs (23)
159Debug.Assert(_namespaceName != null, "_namespaceName should not be null at this point, did you add a new ctor?"); 167Debug.Assert(entityContainerName != null, "We should always have a container name"); 172Debug.Assert(type.KeyMembers.Count > 0, "Why do we have Entities without keys in our valid Entities collection"); 334Debug.Assert(EntityFrameworkVersions.IsValidVersion(targetEntityFrameworkVersion), "EntityFrameworkVersions.IsValidVersion(targetEntityFrameworkVersion)"); 419Debug.Assert(containers.Count != 0, "no s space containers found"); 420Debug.Assert(containers[0].BaseEntitySets.Count != 0, "no entity sets in the sspace container"); 508Debug.Assert(dbObjectType == DbObjectType.View, "did you change to a call that could have different types?"); 543Debug.Assert(parameters.Count != 0, "don't call the method with no data"); 552Debug.Assert(!row.IsTvf, "TVF can't have ReturnType (used only for scalars)."); 757Debug.Assert(columns.Count != 0, "should have at least one column"); 952Debug.Fail("Why didn't we find the column?"); 975Debug.Fail("Why didn't we find the column?"); 1152Debug.Assert(columns.Count != 0, "Trying to create an EntityType with 0 properties"); 1153Debug.Assert(primaryKeys != null, "primaryKeys != null"); 1187Debug.Assert(primaryKeys == null || primaryKeys.Count > 0,"There must be at least one key columns at this point in time"); 1241Debug.Assert(status == EntityCreationStatus.Invalid, "Did we change some code above to make it possible to be something different?"); 1264Debug.Assert(status == EntityCreationStatus.Invalid, "did you add a new value?"); 1279Debug.Assert(columns.Count != 0, "Trying to create a RowType with 0 properties"); 1280Debug.Assert(primaryKeys != null, "primaryKeys != null"); 1308Debug.Assert(columns.Count != 0, "columns.Count != 0"); 1309Debug.Assert(errors != null, "errors != null"); 1604Debug.Assert(member.BuiltInTypeKind == BuiltInTypeKind.EdmProperty, "Every member must be a edmproperty"); 1619Debug.Assert(!String.IsNullOrEmpty(entitySet.DefiningQuery), "DefiningQuery must not be null or empty");
System\Data\Entity\Design\EntityStoreSchemaGenerator\EntityStoreSchemaGenerator.DbObjectKey.cs (1)
61Debug.Assert(_catalog != null || _schema != null || _name != null, "This is going to look like an empty one, just ue the default constructor");
System\Data\Entity\Design\EntityStoreSchemaGenerator\EntityStoreSchemaGenerator.LoadMethodSessionState.cs (1)
120Debug.Assert(value, "How did we possibly get an EntityType without a TableKey");
System\Data\Entity\Design\EntityViewGeneration\EntityViewGenerator.cs (1)
260Debug.Assert(schemaErrors != null, "schemaErrors is null");
System\Data\Entity\Design\SSDLGenerator\EntityStoreSchemaGeneratorDatabaseSchemaLoader.cs (4)
32Debug.Assert(providerInvariantName != null, "providerInvariantName parameter is null"); 33Debug.Assert(connectionString != null, "connectionString parameter is null"); 122Debug.Assert(_storeSchemaModelVersion >= EntityFrameworkVersions.Version3, "_storeSchemaModelVersion >= EntityFrameworkVersions.Version3"); 226Debug.Assert(entry.Effect == EntityStoreSchemaFilterEffect.Exclude, "did you add new value?");
System\Data\Entity\Design\SSDLGenerator\FunctionDetailsReader.cs (15)
32Debug.Assert(connection != null, "the parameter connection is null"); 33Debug.Assert(connection.State == ConnectionState.Open, "the connection is not Open"); 61Debug.Assert(_reader != null, "don't Read() when it is created from a memento"); 84Debug.Assert(_reader != null, "don't Dispose() when it is created from a memento"); 148Debug.Assert(_currentRow != null, "don't call this method when you not reading"); 184Debug.Assert(memento != null, "the parameter memento is null"); 185Debug.Assert(memento.Values != null, "the values in the memento are null"); 186Debug.Assert(memento is MementoV1, "the memento is for a different version"); 187Debug.Assert(_reader == null, "don't attach to a real reader"); 193Debug.Assert(_currentRow != null, "don't call this method when you not reading"); 350Debug.Assert(memento != null, "the parameter memento is null"); 351Debug.Assert(memento.Values != null, "the values in the memento are null"); 352Debug.Assert(memento is MementoV3, "the memento is for a different version"); 353Debug.Assert(_reader == null, "don't attach to a real reader"); 359Debug.Assert(_currentRow != null, "don't call this method when you not reading");
System\Data\EntityModel\Emitters\AssociationTypeEmitter.cs (1)
33Debug.Assert(Item.AssociationEndMembers.Count == 2, "must have exactly two ends");
System\Data\EntityModel\Emitters\AttributeEmitter.cs (16)
50Debug.Assert(emitter != null, "emitter should not be null"); 51Debug.Assert(typeDecl != null, "typeDecl should not be null"); 70Debug.Assert(edmType.BaseType == baseType, "The types must be directly derived from basetype"); 80Debug.Assert(generator.Language == LanguageOption.GenerateVBCode, "Did you add a new language?"); 95Debug.Assert(emitter != null, "emitter should not be null"); 96Debug.Assert(typeDecl != null, "typeDecl should not be null"); 108Debug.Assert(emitter != null, "emitter should not be null"); 109Debug.Assert(typeDecl != null, "typeDecl should not be null"); 122Debug.Assert(type != null, "type is not an EdmType"); 134Debug.Assert(attributeName != null, "attributeName should not be null"); 135Debug.Assert(type != null, "type should not be null"); 136Debug.Assert(member != null, "typeDecl should not be null"); 220Debug.Assert(emitter.Item.Nullable == false, "An EntityKeyProperty cannot be nullable."); 234Debug.Assert(MetadataUtil.IsComplexType(emitter.Item.TypeUsage.EdmType) || 294Debug.Assert(emitter != null, "emitter should not be null"); 295Debug.Assert(typeDecl != null, "typeDecl should not be null");
System\Data\EntityModel\Emitters\ClientApiGenerator.cs (8)
53Debug.Assert(sourceSchema != null, "sourceSchema is null"); 54Debug.Assert(edmItemCollection != null, "edmItemCollection is null"); 55Debug.Assert(generator != null, "generator is null"); 56Debug.Assert(errors != null, "errors is null"); 79Debug.Assert(target != null, "target parameter is null"); 223Debug.Assert(item != null); 255Debug.Assert(item != null); 494Debug.Assert(csdlNamespaceName != null, "csdlNamespaceName is null");
System\Data\EntityModel\Emitters\CommentEmitter.cs (15)
46Debug.Assert(item != null, "item parameter is null"); 47Debug.Assert(commentCollection != null, "commentCollection parameter is null"); 115Debug.Assert(commentCollection != null, "commentCollection parameter is null"); 131Debug.Assert(commentLines != null, "commentLines parameter is null"); 132Debug.Assert(commentCollection != null, "commentCollection parameter is null"); 149Debug.Assert(parameter != null, "parameter parameter is null"); 150Debug.Assert(comment != null, "comment parameter is null"); 169Debug.Assert(!string.IsNullOrEmpty(text)); 205Debug.Assert(start <= last); 295Debug.Assert(commentCollection != null); 310Debug.Assert(summaryComments != null); 311Debug.Assert(commentCollection != null); 324Debug.Assert(tag != null); 325Debug.Assert(summaryComments != null); 326Debug.Assert(commentCollection != null);
System\Data\EntityModel\Emitters\EntityContainerEmitter.cs (7)
282Debug.Assert(set != null, "Field is Null"); 308Debug.Assert(set != null, "Property is Null"); 425Debug.Assert(set != null, "Property is Null"); 495Debug.Assert(null != functionImport); 542Debug.Fail("parameter must be registered in identifier service"); 570Debug.Fail("parameter must be registered in identifier service"); 645Debug.Assert(null != parameter && MetadataUtil.IsPrimitiveType(parameter.TypeUsage.EdmType),
System\Data\EntityModel\Emitters\FixUpCollection.cs (1)
113Debug.Assert(false,"Unexpected language value: "+Language.ToString());
System\Data\EntityModel\Emitters\MetadataItemEmitter.cs (8)
25Debug.Assert(item != null, "item is null"); 91Debug.Assert(accessibility == MemberAttributes.Private || 105Debug.Assert(accessibility == MemberAttributes.Private, "did a new type get added?"); 136Debug.Assert(accessibility != null, "why does accessibility == null?"); 148Debug.Assert(accessibility == CodeGenerationValueAccessibilityPublic, "found an accessibility other than " + CodeGenerationValueAccessibilityPublic); 170Debug.Assert(attribute == MemberAttributes.Public, "found MemberAttribute other than " + CodeGenerationValueAccessibilityPublic); 182Debug.Assert(accessibility != null, "why does accessibility == null?"); 189Debug.Assert(accessibility == CodeGenerationValueAccessibilityPublic, "found an accessibility other than " + CodeGenerationValueAccessibilityPublic);
System\Data\EntityModel\Emitters\NamespaceEmitter.cs (1)
94Debug.Assert(!(element is EdmFunction), "Are you trying to emit functions now? If so add an emitter for it.");
System\Data\EntityModel\Emitters\NavigationPropertyEmitter.cs (1)
330Debug.Assert(endMember.TypeUsage.EdmType.BuiltInTypeKind == BuiltInTypeKind.RefType, "not a reference type");
System\Data\EntityModel\Emitters\PropertyEmitter.cs (10)
351Debug.Assert(MetadataUtil.IsPrimitiveType(((CollectionType)Item.TypeUsage.EdmType).TypeUsage.EdmType), 390Debug.Assert(GetAccessibilityRank(accessibility) >= 0, "bad accessibility"); 453Debug.Assert(statements != null, "statments can't be null"); 454Debug.Assert(((MetadataUtil.IsPrimitiveType(Item.TypeUsage.EdmType)) || (MetadataUtil.IsCollectionType(Item.TypeUsage.EdmType))) 588Debug.Assert(MetadataUtil.IsComplexType(typeUsage.EdmType)); 595Debug.Fail("Unexpected Property.Type type: " + propertyType.GetType()); 603Debug.Assert(types.NonNullable != null && types.Nullable != null, "did you forget to set the types variable?"); 738Debug.Fail("Unsupported property type:" + type.ToString()); 849Debug.Assert(collectionKind == CollectionKind.None, "Was another CollectionKind value added"); 912Debug.Assert(GetAccessibilityRank(scope) >= 0, "scope should only be an accessibility attribute");
System\Data\EntityModel\Emitters\PropertyEmitterBase.cs (1)
26Debug.Assert(item != null, "item is null");
System\Data\EntityModel\Emitters\Utils.cs (2)
124Debug.Assert(member is Type, "Did you add a new type of member?"); 317Debug.Assert(!string.IsNullOrEmpty(name), "name parameter is null or empty");
System\Data\EntityModel\EntityClassGenerator.cs (12)
137Debug.Assert(loader != null, "when is the loader ever null?"); 229Debug.Assert(loader != null, "when is the loader ever null?"); 303Debug.Assert(readerSourceMap.ContainsKey(sourceLoader), "the source loader didn't produce any of the xml readers..."); 308Debug.Assert(readers.Contains(sourceReader), "the source reader is not in the list of readers"); 310Debug.Assert(index >= 0, "couldn't find the source reader in the list of readers"); 312Debug.Assert(readers.Count == schemas.Count, "We have a different number of readers than schemas"); 314Debug.Assert(sourceSchema != null, "sourceSchema is null"); 334Debug.Assert(exception != null); 335Debug.Assert(sourceLocation != null); 342Debug.Assert(exception != null); 343Debug.Assert(sourceLocation != null); 350Debug.Assert(exception != null);
System\Data\EntityModel\LazyTextWriterCreator.cs (2)
35Debug.Assert(writer != null, "writer parameter is null"); 44Debug.Assert(targetFilePath != null, "targetFilePath parameter is null");
System.Data.Linq (151)
ChangeConflicts.cs (1)
280Debug.Assert(this.IsDeleted);
ChangeDirector.cs (5)
251System.Diagnostics.Debug.Assert(membersToSync.Count > 0); 284System.Diagnostics.Debug.Assert(item != null); 285System.Diagnostics.Debug.Assert(item.IsNew || item.IsPossiblyModified, "AutoSyncMembers should only be called for new and modified objects."); 290System.Diagnostics.Debug.Assert(syncResults.Length == membersToSync.Count); 400System.Diagnostics.Debug.Assert(table != null);
ChangeProcessor.cs (7)
122Debug.Assert(syncDependentItem.IsNew || syncDependentItem.IsPossiblyModified, "SynchDependent data should only be rolled back for new and modified objects."); 163Debug.Assert(to.IsDeleted, "Foreign key reference cleanup should only happen on Deleted objects."); 170Debug.Assert(assoc.OtherMember.IsAssociation, "OtherMember of the association is expected to also be an association."); 214Debug.Assert(assoc.IsForeignKey, "Foreign key clearing should only happen on foreign key side of the association."); 215Debug.Assert(assoc.ThisMember.IsAssociation, "Expected ThisMember of an association to always be an association."); 417Debug.Assert(cachedTracked != null); 438Debug.Assert(cachedTracked != null);
ChangeTracker.cs (14)
336System.Diagnostics.Debug.Assert(this.IsNew || this.IsRemoved || this.IsUnmodified); 342System.Diagnostics.Debug.Assert(this.IsPossiblyModified || this.IsDeleted); 348System.Diagnostics.Debug.Assert(this.IsPossiblyModified); 349System.Diagnostics.Debug.Assert(this.type.VersionMember != null || !this.type.HasUpdateCheck); 356System.Diagnostics.Debug.Assert(this.IsNew || this.IsPossiblyModified); 357System.Diagnostics.Debug.Assert(originalState != null); 358System.Diagnostics.Debug.Assert(originalState.GetType() == this.type.Type); 366System.Diagnostics.Debug.Assert(this.IsDeleted || this.IsPossiblyModified); 372System.Diagnostics.Debug.Assert(this.IsDead || this.IsDeleted); 378System.Diagnostics.Debug.Assert(this.IsRemoved || this.IsNew); 384System.Diagnostics.Debug.Assert(this.IsNew || this.IsPossiblyModified); 484System.Diagnostics.Debug.Assert(!mm.IsAssociation); 522System.Diagnostics.Debug.Assert(instance != null); 524System.Diagnostics.Debug.Assert(instance.GetType() == this.type.Type);
DataContext.cs (2)
392System.Diagnostics.Debug.Assert(metaTable != null); 1112System.Diagnostics.Debug.Assert(metaTable != null);
IdentityManager.cs (1)
173System.Diagnostics.Debug.Assert(this.offset < values.Length, "offset is outside the bounds of the values array");
Mapping\AttributedMetaModel.cs (1)
878System.Diagnostics.Debug.Assert(functionAttrib != null);
Mapping\MappedMetaModel.cs (1)
1269System.Diagnostics.Debug.Assert(this.otherType.IsEntity);
Mapping\MappingSource.cs (11)
251System.Diagnostics.Debug.Assert(reader.NodeType == XmlNodeType.Element); 295System.Diagnostics.Debug.Assert(false, "DatabaseMapping has no content"); 325System.Diagnostics.Debug.Assert(reader.NodeType == XmlNodeType.Element); 376System.Diagnostics.Debug.Assert(reader.NodeType == XmlNodeType.Element); 394System.Diagnostics.Debug.Assert(reader.NodeType == XmlNodeType.Element); 418System.Diagnostics.Debug.Assert(reader.NodeType == XmlNodeType.Element); 461System.Diagnostics.Debug.Assert(false, "Table has no content"); 469System.Diagnostics.Debug.Assert(reader.NodeType == XmlNodeType.Element); 478System.Diagnostics.Debug.Assert(reader.NodeType == XmlNodeType.Element); 533System.Diagnostics.Debug.Assert(reader.NodeType == XmlNodeType.Element); 567System.Diagnostics.Debug.Assert(reader.NodeType == XmlNodeType.Element);
SqlClient\Common\SqlFactory.cs (4)
242Debug.Assert(IsSqlHighPrecisionDateTimeType(timeSpan)); 364System.Diagnostics.Debug.Assert(!targetSqlType.IsRuntimeOnlyType, "Attempted coversion to a runtime type: from = " + expression.SqlType.ToQueryString() + "; to = " + targetSqlType.ToQueryString() + "; source = " + sourceExpression.ToString()); 466System.Diagnostics.Debug.Assert(value != null); 477System.Diagnostics.Debug.Assert(false);
SqlClient\Common\SqlNode.cs (3)
844System.Diagnostics.Debug.Assert(expr != null); 1489System.Diagnostics.Debug.Assert(sqlType.CanBeColumn); 1494System.Diagnostics.Debug.Assert(expr != null);
SqlClient\Common\SqlVisitor.cs (1)
251System.Diagnostics.Debug.Assert(false);
SqlClient\Query\QueryConverter.cs (5)
1516System.Diagnostics.Debug.Assert(select.Selection.NodeType == SqlNodeType.AliasRef); 1995System.Diagnostics.Debug.Assert(function != null); 2419System.Diagnostics.Debug.Assert(cons != null); 2445System.Diagnostics.Debug.Assert(resultSelector.Parameters.Count == 1); 2715System.Diagnostics.Debug.Assert(this.IdentityMembers == null, "We already have a set of keys -- why are we adding more?");
SqlClient\Query\SqlBinder.cs (8)
520System.Diagnostics.Debug.Assert(false, "Don't know how to apply 'as' to " + target.NodeType); 784System.Diagnostics.Debug.Assert(mm != null); 799System.Diagnostics.Debug.Assert(mm != null); 831System.Diagnostics.Debug.Assert(mm != null); 995System.Diagnostics.Debug.Assert(type != null); 996System.Diagnostics.Debug.Assert(mi != null); 1088System.Diagnostics.Debug.Assert(result is SqlColumnRef); 1555System.Diagnostics.Debug.Assert(false);
SqlClient\Query\SqlFormatter.cs (1)
560System.Diagnostics.Debug.Assert(spc.Arguments.Count >= pc);
SqlClient\Query\SqlMethodCallConverter.cs (7)
944Debug.Assert(GetMethodSupport(mc) == MethodSupport.Method); 978Debug.Assert(GetMethodSupport(mc) == MethodSupport.Method); 1309Debug.Assert(TypeSystem.GetNonNullableType(bo.Left.ClrType) == typeof(DateTimeOffset)); 2209Debug.Assert(baseClrTypeOfExpr == typeof(DateTimeOffset), "'DateTime' property supported only for instances of DateTimeOffset."); 2469Debug.Assert(mc.Arguments.Count == 3); 2470Debug.Assert(mc.Arguments[0].ClrType == typeof(string)); 2471Debug.Assert(mc.Arguments[1].ClrType == typeof(string));
SqlClient\Query\SqlNamer.cs (1)
48System.Diagnostics.Debug.Assert(ss != null && ss.Select != null && ss.Select.Row != null && ss.Select.Row.Columns.Count == 1);
SqlClient\Query\SqlOuterApplyReducer.cs (4)
317System.Diagnostics.Debug.Assert(source != null); 318System.Diagnostics.Debug.Assert(aliasesForLifting != null); 325System.Diagnostics.Debug.Assert(source != null); 326System.Diagnostics.Debug.Assert(aliasesForLifting != null);
SqlClient\Query\SqlParameterizer.cs (1)
192System.Diagnostics.Debug.Assert(false);
SqlClient\Query\Translator.cs (11)
28System.Diagnostics.Debug.Assert(rowType != null && rowType.Table != null); 131System.Diagnostics.Debug.Assert(thisType.IsEntity); 277System.Diagnostics.Debug.Assert(link.Expansion != null); 278System.Diagnostics.Debug.Assert(link.KeyExpressions == keyExpressions); 286System.Diagnostics.Debug.Assert( 357System.Diagnostics.Debug.Assert(exprs1.Count > 0); 358System.Diagnostics.Debug.Assert(exprs2.Count > 0); 359System.Diagnostics.Debug.Assert(exprs1.Count == exprs2.Count); 447System.Diagnostics.Debug.Assert(expr.NodeType == SqlNodeType.IsNull || expr.NodeType == SqlNodeType.IsNotNull); 455System.Diagnostics.Debug.Assert(exprs.Count > 0); 513System.Diagnostics.Debug.Assert(members.Count > 0);
SqlClient\Reader\ObjectReaderCompiler.cs (52)
169System.Diagnostics.Debug.Assert( 820System.Diagnostics.Debug.Assert(miInvoke != null); 826System.Diagnostics.Debug.Assert(TypeSystem.IsNullableType(u.Operand.ClrType)); 836System.Diagnostics.Debug.Assert(opt.HasValue.ClrType == typeof(int?)); 842System.Diagnostics.Debug.Assert(TypeSystem.IsNullableType(actualType)); 991System.Diagnostics.Debug.Assert(miInsertLookup != null); 1043System.Diagnostics.Debug.Assert(miRaiseEvent != null); 1068System.Diagnostics.Debug.Assert(piCanDeferLoad != null); 1158System.Diagnostics.Debug.Assert(memberType.IsGenericType && memberType.GetGenericTypeDefinition() == typeof(EntitySet<>)); 1172System.Diagnostics.Debug.Assert(argType.IsAssignableFrom(eType)); 1195System.Diagnostics.Debug.Assert(ci != null); 1207System.Diagnostics.Debug.Assert(miSetSource != null); 1220System.Diagnostics.Debug.Assert(memberType.IsGenericType && memberType.GetGenericTypeDefinition() == typeof(EntitySet<>)); 1234System.Diagnostics.Debug.Assert(argType.IsAssignableFrom(eType)); 1257System.Diagnostics.Debug.Assert(ci != null); 1269System.Diagnostics.Debug.Assert(miAssign != null); 1278System.Diagnostics.Debug.Assert( 1313System.Diagnostics.Debug.Assert(ci != null); 1353System.Diagnostics.Debug.Assert(miCreateGroup != null); 1381System.Diagnostics.Debug.Assert(mi != null); 1400System.Diagnostics.Debug.Assert(mi != null); 1453System.Diagnostics.Debug.Assert(miExecute != null); 1479System.Diagnostics.Debug.Assert(ci != null); 1511System.Diagnostics.Debug.Assert(miRead != null); 1523System.Diagnostics.Debug.Assert(miAdd != null); 1601System.Diagnostics.Debug.Assert(miCast != null); 1608System.Diagnostics.Debug.Assert(miConvert != null); 1616System.Diagnostics.Debug.Assert(miFirst != null); 1646System.Diagnostics.Debug.Assert(ci != null); 1652System.Diagnostics.Debug.Assert(miFirst != null); 1655System.Diagnostics.Debug.Assert(ci != null); 1668System.Diagnostics.Debug.Assert(miAsQueryable != null); 1686System.Diagnostics.Debug.Assert(miAsQueryable != null); 1702System.Diagnostics.Debug.Assert(miCreateOrderedEnumerable != null); 1718System.Diagnostics.Debug.Assert(ci != null); 1726System.Diagnostics.Debug.Assert(miAssign != null); 1739System.Diagnostics.Debug.Assert(ci != null); 1749System.Diagnostics.Debug.Assert(miToArray != null); 1782System.Diagnostics.Debug.Assert(miGetTypeFromHandle != null); 1785System.Diagnostics.Debug.Assert(miChangeType != null); 1954System.Diagnostics.Debug.Assert(vMatch != null); 1960System.Diagnostics.Debug.Assert(i == n - 1); 1976System.Diagnostics.Debug.Assert(dt.ClrType == typeof(Type)); 1986System.Diagnostics.Debug.Assert(targetType != null && locDiscriminator != null); 2065System.Diagnostics.Debug.Assert(miEquals != null); 2094System.Diagnostics.Debug.Assert(mi != null); 2137System.Diagnostics.Debug.Assert(readerMethod != null); 2198System.Diagnostics.Debug.Assert(meth != null); 2276System.Diagnostics.Debug.Assert(address == false); 2286System.Diagnostics.Debug.Assert(false); 2291System.Diagnostics.Debug.Assert(tc == TypeCode.Int32); 2796System.Diagnostics.Debug.Assert(false);
SqlClient\SqlProvider.cs (9)
136System.Diagnostics.Debug.Assert(false); 710System.Diagnostics.Debug.Assert(this.conManager.Connection.State == ConnectionState.Closed); 839System.Diagnostics.Debug.Assert(qis.Length == 1); 1439System.Diagnostics.Debug.Assert(resultType != null); 1440System.Diagnostics.Debug.Assert(node != null); 1818Debug.Assert(!useReturnValue); 1894System.Diagnostics.Debug.Assert(enumerator != null); 1922System.Diagnostics.Debug.Assert(enumerable != null); 1923System.Diagnostics.Debug.Assert(executeResult != null);
SqlClient\SqlTypeSystemProvider.cs (1)
225System.Diagnostics.Debug.Assert(scale <= precision);
System.Data.Services (1410)
parent\Client\System\Data\Services\Client\ALinq\ParameterReplacerVisitor.cs (3)
44Debug.Assert(expression != null, "expression != null"); 45Debug.Assert(oldParameter != null, "oldParameter != null"); 46Debug.Assert(newExpression != null, "newExpression != null");
parent\Client\System\Data\Services\Client\BatchStream.cs (49)
113Debug.Assert(null != stream, "null stream"); 258Debug.Assert(0 <= this.byteLength, "negative byteLength"); 259Debug.Assert(0 <= this.batchLength, "negative batchLength"); 396Debug.Assert(0 <= this.byteLength, "negative byteLength"); 397Debug.Assert(0 <= this.batchLength, "negative batchLength"); 405Debug.Assert(null == this.batchBoundary, "non-null batch boundary"); 406Debug.Assert(null == this.changesetBoundary, "non-null changesetBoundary boundary"); 419Debug.Assert(null != this.batchBoundary, "null batch boundary"); 420Debug.Assert(null == this.changesetBoundary, "non-null changeset boundary"); 426Debug.Assert(null != this.batchBoundary, "null batch boundary"); 427Debug.Assert(null != this.contentHeaders, "null contentHeaders"); 428Debug.Assert(null != this.changesetBoundary, "null changeset boundary"); 436Debug.Assert(null != this.changesetBoundary, "null changeset boundary"); 447Debug.Assert(null != this.changesetBoundary, "null changeset boundary"); 452Debug.Assert(false, "unknown state"); 456Debug.Assert(null == this.contentHeaders, "non-null content headers"); 457Debug.Assert(null == this.contentStream, "non-null content stream"); 459Debug.Assert(null == this.contentUri, "non-null content uri"); 465Debug.Assert( 489Debug.Assert(this.batchState == BatchStreamState.EndChangeSet, "bad changeset boundary state"); 517Debug.Assert(this.batchState == BatchStreamState.EndChangeSet, "bad changeset boundary state"); 646Debug.Assert( 671Debug.Assert( 865Debug.Assert(0 <= this.byteLength, "negative byteLength"); 866Debug.Assert(0 <= this.batchLength, "negative batchLength"); 951Debug.Assert(0 < this.byteLength, "out of bytes"); 952Debug.Assert(this.bytePosition + this.byteLength <= this.byteBuffer.Length, "byte tracking out of range"); 997Debug.Assert(0 <= this.byteLength, "negative byteLength"); 998Debug.Assert(0 <= this.batchLength, "negative batchLength"); 1011Debug.Assert(0 <= this.byteLength, "negative byteLength"); 1012Debug.Assert(0 <= this.batchLength, "negative batchLength"); 1097Debug.Assert(null != buffer, "null != buffer"); 1098Debug.Assert(0 <= offset, "0 <= offset"); 1099Debug.Assert(0 <= count, "0 <= count"); 1100Debug.Assert(offset + count <= buffer.Length, "offset + count <= buffer.Length"); 1131Debug.Assert(this.bytePosition <= size, "negative size"); 1146Debug.Assert(this.bytePosition <= size, "negative size"); 1159Debug.Assert(0 <= size, "negative size"); 1168Debug.Assert(null != boundary1, "batch boundary shouldn't be null"); 1268Debug.Assert(null != buffer, "null != buffer"); 1269Debug.Assert(0 <= offset, "0 <= offset"); 1270Debug.Assert(0 <= count, "0 <= count"); 1271Debug.Assert(offset + count <= buffer.Length, "offset + count <= buffer.Length"); 1301Debug.Assert(0 <= this.byteLength, "negative byteLength"); 1302Debug.Assert(0 <= this.batchLength, "negative batchLength"); 1400Debug.Assert( 1494Debug.Assert(null != stream, "null != stream"); 1495Debug.Assert(0 < contentLength, "0 < contentLength"); 1570Debug.Assert(0 <= this.length, "Read beyond expected length");
parent\Client\System\Data\Services\Client\Common.cs (1)
63Debug.Assert(!type.FullName.StartsWith("System.Tuple", StringComparison.Ordinal), "System.Tuple is not blocked by unsupported type check");
parent\Client\System\Data\Services\Client\ReferenceEqualityComparer.cs (1)
132Debug.Assert(!typeof(T).IsValueType, "!typeof(T).IsValueType -- can't use reference equality in a meaningful way with value types");
parent\Client\System\Data\Services\Client\XmlUtil.cs (8)
34Debug.Assert(uri != null, "uri != null"); 93Debug.Assert(current != null, "current != null"); 94Debug.Assert(uri != null, "uri != null"); 158Debug.Assert(null != stream, "null stream"); 185Debug.Assert(null != encoding, "null != encoding"); 196Debug.Assert(!settings.CloseOutput, "!settings.CloseOutput -- otherwise default changed?"); 210Debug.Assert(null != stream, "null != stream"); 211Debug.Assert(null != encoding, "null != encoding");
System\Data\Services\BatchServiceHost.cs (7)
84Debug.Assert(absoluteServiceUri != null && absoluteServiceUri.IsAbsoluteUri, "absoluteServiceUri != null && absoluteServiceUri.IsAbsoluteUri"); 85Debug.Assert(batchStream != null, "batchStream != null"); 107Debug.Assert(!string.IsNullOrEmpty(boundary), "!string.IsNullOrEmpty(boundary)"); 108Debug.Assert(writer != null, "writer != null"); 332Debug.Assert(WebUtil.IsCatchableExceptionType(args.Exception), "WebUtil.IsCatchableExceptionType(args.Exception)"); 351Debug.Assert( 370Debug.Assert(BatchStreamState.Put == state, "BatchStreamState.Put == state");
System\Data\Services\Caching\MetadataCache.cs (8)
43Debug.Assert(serviceType != null, "serviceType != null"); 44Debug.Assert(dataContextInstance != null, "dataContextInstance != null"); 45Debug.Assert(item != null, "item != null"); 66Debug.Assert(result != null, "result != null -- a null item is never returned."); 67Debug.Assert( 84Debug.Assert(serviceType != null, "serviceType != null"); 85Debug.Assert(dataContextInstance != null, "dataContextInstance != null"); 119Debug.Assert(serviceType != null, "serviceType != null");
System\Data\Services\Caching\MetadataCacheItem.cs (3)
82Debug.Assert(type != null, "type != null"); 113Debug.Assert(value != null, "value != null"); 114Debug.Assert(this.configuration == null, "this.configuration == null -- otherwise it's being set more than once");
System\Data\Services\DataService.cs (107)
117Debug.Assert(this.provider != null, "this.provider != null"); 154Debug.Assert(this.provider != null, "this.provider != null"); 165Debug.Assert(this.provider != null, "this.provider != null"); 188Debug.Assert(queryable != null, "queryable != null"); 189Debug.Assert(expandPaths != null, "expandPaths != null"); 190Debug.Assert(this.configuration != null, "this.configuration != null"); 221Debug.Assert(args != null, "args != null"); 280Debug.Assert(description.SegmentInfos[segmentIndex].RequestEnumerable != null, "requestDescription.SegmentInfos[segmentIndex].RequestEnumerable != null"); 371Debug.Assert(writer != null, "writer != null"); 469Debug.Assert(args.Exception != null, "args.Exception != null -- .ctor should have checked"); 516Debug.Assert(host != null, "host != null"); 544Debug.Assert(version != null, "version != null"); 545Debug.Assert(writer != null, "writer != null"); 546Debug.Assert(service != null, "service != null"); 568Debug.Assert(dataServiceType != null, "dataServiceType != null"); 569Debug.Assert(provider != null, "provider != null"); 612Debug.Assert(host != null, "host != null"); 664Debug.Assert(description.TargetKind == RequestTargetKind.Metadata, "This method can only be called from the $metadata path because it enumerates through all resource types."); 698Debug.Assert(description != null, "description != null"); 699Debug.Assert(dataService.OperationContext.Host != null, "dataService.OperationContext.Host != null"); 778Debug.Assert(description.ResponseVersion == RequestDescription.DataServiceDefaultResponseVersion, "description.ResponseVersion == RequestDescription.DataServiceDefaultResponseVersion"); 790Debug.Assert(description.RequireMinimumVersion == new Version(1, 0), "description.RequireMinimumVersion == new Version(1, 0)"); 791Debug.Assert(description.ResponseVersion == RequestDescription.DataServiceDefaultResponseVersion, "description.ResponseVersion == RequestDescription.DataServiceDefaultResponseVersion"); 808Debug.Assert(description.ResponseVersion == newDescription.ResponseVersion, "description.ResponseVersion == newDescription.ResponseVersion"); 832Debug.Assert(dataService.Provider != null, "dataService.Provider != null"); 833Debug.Assert(dataService.OperationContext.Host != null, "dataService.OperationContext.Host != null"); 881Debug.Assert(description.RequestEnumerable != null, "description.RequestEnumerable != null"); 895Debug.Assert( 920Debug.Assert(responseFormat != ContentFormat.Unknown, "responseFormat != ContentFormat.Unknown"); 1010Debug.Assert(mediaLinkEntry != null, "mediaLinkEntry != null"); 1011Debug.Assert(service != null, "service != null"); 1029Debug.Assert( 1046Debug.Assert( 1052Debug.Assert(requestStream != null, "requestStream != null"); 1056Debug.Assert(targetResourceType != null, "targetResourceType != null"); 1060Debug.Assert(targetResourceSet != null, "targetResourceSet != null"); 1062Debug.Assert(targetResourceType != null, "targetResourceType != null"); 1069Debug.Assert(description.LastSegmentInfo.TargetContainer != null, "description.LastSegmentInfo.TargetContainer != null"); 1075Debug.Assert(description.Property.Kind == ResourcePropertyKind.ResourceSetReference, "Expecting POST resource set property"); 1084Debug.Assert(entity != null, "entity != null"); 1099Debug.Assert(description.TargetSource != RequestTargetSource.ServiceOperation, "description.TargetSource != RequestTargetSource.ServiceOperation"); 1128Debug.Assert(requestStream != null, "requestStream != null"); 1138Debug.Assert(description != null, "description != null"); 1139Debug.Assert(description.TargetSource != RequestTargetSource.ServiceOperation, "description.TargetSource != RequestTargetSource.ServiceOperation"); 1140Debug.Assert(dataService != null, "dataService != null"); 1141Debug.Assert(dataService.Configuration != null, "dataService.Configuration != null"); 1142Debug.Assert(dataService.OperationContext.Host != null, "dataService.OperationContext.Host != null"); 1155Debug.Assert(description.LastSegmentInfo.TargetContainer != null, "description.LastSegmentInfo.TargetContainer != null"); 1183Debug.Assert(container != null, "container != null"); 1198Debug.Assert(description.TargetSource == RequestTargetSource.Property, "description.TargetSource == RequestTargetSource.Property"); 1199Debug.Assert(description.IsSingleResult, "description.IsSingleResult"); 1295Debug.Assert( 1324Debug.Assert(description != null, "description != null"); 1325Debug.Assert(dataService != null, "dataService != null"); 1326Debug.Assert(dataService.OperationContext != null && dataService.OperationContext.Host != null, "dataService.OperationContext != null && dataService.OperationContext.Host != null"); 1328Debug.Assert( 1340Debug.Assert(parentResourceIndex >= 0 && parentResourceIndex < description.SegmentInfos.Length, "parentResourceIndex >= 0 && parentResourceIndex < description.SegmentInfos.Length"); 1350Debug.Assert(String.IsNullOrEmpty(host.RequestIfMatch) && String.IsNullOrEmpty(host.RequestIfNoneMatch), "ETag cannot be specified for $link requests"); 1360Debug.Assert(container != null, "container != null"); 1367Debug.Assert(description.Property != null, "non-open type property"); 1397Debug.Assert(host.AstoriaHttpVerb == AstoriaVerbs.POST, "Must be POST method"); 1420Debug.Assert( 1427Debug.Assert(resourceType != null, "resourceType != null, WebUtil.GetResourceType() should throw if it fails to resolve the resource type."); 1458Debug.Assert(ResourceTypeKind.EntityType == resourceType.ResourceTypeKind, "ResourceTypeKind.EntityType == " + resourceType.ResourceTypeKind); 1524Debug.Assert(segmentIdx == description.SegmentInfos.Length - 1, "$value has to be the last segment."); 1539Debug.Assert(openTypeParentResourceType.ResourceTypeKind == ResourceTypeKind.EntityType, "Entity Type expected"); 1561Debug.Assert(responseFormat != ContentFormat.Unknown, "responseFormat != ContentFormat.Unknown"); 1601Debug.Assert(results != null && results.Length == 1, "results != null && results.Length == 1"); 1612Debug.Assert(container != null, "description.LastSegmentInfo.TargetContainer != null"); 1623Debug.Assert(description.LinkUri, "This method must be called for link operations"); 1624Debug.Assert(description.IsSingleResult, "Expecting this method to be called on single resource uris"); 1634Debug.Assert(description.Property != null, "description.Property != null"); 1641Debug.Assert(description.Property.Kind == ResourcePropertyKind.ResourceSetReference, "expecting collection nav properties"); 1642Debug.Assert(description.LastSegmentInfo.HasKeyValues, "expecting properties to have key value specified"); 1671Debug.Assert( 1686Debug.Assert(this.operationContext != null, "this.operationContext != null"); 1761Debug.Assert(writer != null, "writer != null"); 1772Debug.Assert(description.TargetKind != RequestTargetKind.Batch, "description.TargetKind != RequestTargetKind.Batch"); 1815Debug.Assert(this.operationContext != null && this.operationContext.Host != null, "this.operationContext != null && this.operationContext.Host != null"); 1870Debug.Assert(this.configuration != null, "this.configuration != null -- otherwise this.provider was ----signed with no configuration"); 1952Debug.Assert(queryProviderInstance != null, "If we have IDSMP we should also have IDSQP."); 1965Debug.Assert(metadata != null, "Metadata item should have been found or created within this function"); 2029Debug.Assert(this.configuration != null, "configuration != null"); 2030Debug.Assert(this.provider != null, "wrapper != null"); 2039Debug.Assert( 2145Debug.Assert(dataService != null, "dataService != null"); 2146Debug.Assert(batchRequestStream != null, "batchRequestStream != null"); 2147Debug.Assert(batchBoundary != null, "batchBoundary != null"); 2278Debug.Assert(segmentIndex >= 0 && segmentIndex < description.SegmentInfos.Length, "segment index must be a valid one"); 2408Debug.Assert(!String.IsNullOrEmpty(changesetBoundary), "!String.IsNullOrEmpty(changesetBoundary)"); 2435Debug.Assert(this.batchOperationContexts.Count == this.batchRequestDescription.Count, "counts must be the same"); 2463Debug.Assert(this.operationContext.Host.AstoriaHttpVerb == AstoriaVerbs.GET, "this.operationContext.Host.AstoriaHttpVerb == AstoriaVerbs.GET"); 2464Debug.Assert(this.batchRequestDescription.Count == 0, "this.batchRequestDescription.Count == 0"); 2465Debug.Assert(this.batchOperationContexts.Count == 0, "this.batchRequestHost.Count == 0"); 2501Debug.Assert( 2526Debug.Assert(this.batchRequestStream.State == BatchStreamState.EndBatch, "expecting end batch state"); 2620Debug.Assert(absoluteServiceUri != null && absoluteServiceUri.IsAbsoluteUri, "absoluteServiceUri != null && absoluteServiceUri.IsAbsoluteUri"); 2621Debug.Assert(batchStream != null, "batchStream != null"); 2622Debug.Assert(boundary != null, "boundary != null"); 2659Debug.Assert(exception != null, "exception != null"); 2660Debug.Assert(changesetOperationContexts != null, "changesetOperationContexts != null"); 2661Debug.Assert(WebUtil.IsCatchableExceptionType(exception), "WebUtil.IsCatchableExceptionType(exception)"); 2723Debug.Assert(this.batchRequestStream.State == BatchStreamState.Put, "This method must be called only for PUT requests"); 2724Debug.Assert(this.batchRequestDescription[this.batchRequestDescription.Count - 1] == requestDescription, "The current request description must be the last one"); 2725Debug.Assert(this.batchRequestDescription.Count == this.batchOperationContexts.Count, "Host and request description count must be the same"); 2766Debug.Assert(batchHost != null, "host != null"); 2817Debug.Assert(enumerator != null, "enumerator != null");
System\Data\Services\DataServiceConfiguration.cs (44)
135Debug.Assert(provider != null, "provider != null"); 460Debug.Assert(resourceType.FullName == typeName, "resourceType.FullName == typeName"); 475Debug.Assert(service != null, "service != null"); 476Debug.Assert(container != null, "container != null"); 502Debug.Assert(predicate is LambdaExpression, "predicate is LambdaExpression -- otherwise signature check missed something."); 532Debug.Assert(service != null, "service != null"); 533Debug.Assert(container != null, "container != null"); 534Debug.Assert(query != null, "query != null"); 557Debug.Assert(predicate is LambdaExpression, "predicate is LambdaExpression -- otherwise signature check missed something."); 571Debug.Assert(container != null, "container != null"); 572Debug.Assert(requiredRights != EntitySetRights.None, "requiredRights != EntitySetRights.None"); 586Debug.Assert(container != null, "container != null"); 597Debug.Assert(operation != null, "operation != null"); 598Debug.Assert(requiredRights != ServiceOperationRights.None, "requiredRights != EntitySetRights.None"); 613Debug.Assert(operation != null, "operation != null"); 628Debug.Assert(description != null, "description != null"); 629Debug.Assert( 632Debug.Assert( 647Debug.Assert(index >= 0 && index < description.SegmentInfos.Length, "index >=0 && index <description.SegmentInfos.Length"); 696Debug.Assert(container != null, "container != null"); 697Debug.Assert(this.resourceRights != null, "this.resourceRights != null"); 713Debug.Assert(serviceOperation != null, "operation != null"); 714Debug.Assert(this.serviceRights != null, "this.serviceRights != null"); 730Debug.Assert(container != null, "container != null"); 731Debug.Assert(this.pageSizes != null, "this.pageSizes != null"); 753Debug.Assert(this.accessEnabledResourceTypes != null, "this.accessEnabledResourceTypes != null"); 765Debug.Assert(type != null, "type != null"); 778Debug.Assert(resourceSet != null, "resourceSet != null"); 796Debug.Assert(resourceSet != null, "resourceSet != null"); 814Debug.Assert(!this.configurationSealed, "!configurationSealed - otherwise .Seal is invoked multiple times"); 825Debug.Assert(this.configurationSealed, "Configuration must be sealed to validate server options"); 848Debug.Assert( 861Debug.Assert(maxProtocolVersion >= requestDescription.ResponseVersion, "ResponseVersion > MaxProtocolVersion"); 878Debug.Assert(builder != null, "builder != null"); 896Debug.Assert(type != null, "type != null"); 897Debug.Assert(method != null, "method != null"); 898Debug.Assert(container != null, "container != null"); 929Debug.Assert(method != null, "method != null"); 930Debug.Assert(parameter != null, "parameter != null"); 945Debug.Assert(type != null, "type != null"); 959Debug.Assert(method.IsStatic, "method.IsStatic"); 960Debug.Assert(method.Name == XmlConstants.ClrServiceInitializationMethodName, "Making sure that the method name is as expected"); 991Debug.Assert(type != null, "type != null"); 992Debug.Assert(this.provider != null, "this.provider != null");
System\Data\Services\DataServiceHostWrapper.cs (3)
121Debug.Assert(host != null, "host != null"); 149Debug.Assert(!string.IsNullOrEmpty(requestMethod), "!string.IsNullOrEmpty(requestMethod)"); 417Debug.Assert(this.host is BatchServiceHost, "We shouldn't be calling this outside of the batching code path.");
System\Data\Services\DataServiceOperationContext.cs (3)
55Debug.Assert(host != null, "host != null"); 158Debug.Assert(this.hostWrapper != null, "Must call InitializeAndCacheHeaders() before calling the Host property."); 172Debug.Assert(this.hostInterface != null, "this.hostInterface != null");
System\Data\Services\DataServiceProcessingPipelineEventArgs.cs (1)
37Debug.Assert(operationContext != null, "operationContext != null");
System\Data\Services\DelegateBodyWriter.cs (4)
43Debug.Assert(service != null, "service != null"); 44Debug.Assert(writer != null, "writer != null"); 56Debug.Assert(writer != null, "writer != null"); 101Debug.Assert(xmlWriter != null, "xmlWriter != null");
System\Data\Services\Epm\EpmContentDeSerializer.cs (1)
38Debug.Assert(resourceType.HasEntityPropertyMappings == true, "Must have entity property mappings to instantiate EpmContentDeSerializer");
System\Data\Services\Epm\EpmContentSerializer.cs (18)
75Debug.Assert(this.resourceType != null, "Must have a valid ResourceType"); 87Debug.Assert(this.epmSyndicationSerializer != null, "ResourceType with mapping implies a valid syndication content serializer"); 89Debug.Assert(this.epmCustomSerializer != null, "ResourceType with mapping implies a valid custom content serializer"); 101Debug.Assert(this.epmSyndicationSerializer != null, "ResourceType with mapping implies a valid syndication content serializer"); 103Debug.Assert(this.epmCustomSerializer != null, "ResourceType with mapping implies a valid custom content serializer"); 110Debug.Assert(this.targetItem != null, "Must always have target content item"); 141Debug.Assert(epmInfo != null, "epmInfo != null"); 163Debug.Assert(currentType != null, "currentType != null"); 166Debug.Assert(currentValue != null, "currentValue != null"); 231Debug.Assert(currentType != null, "currentType != null"); 232Debug.Assert(currentValue != DBNull.Value, "currentValue != DBNull.Value -- we have converted DBNull to null"); 265Debug.Assert(node.ResourceType != null, "node.ResourceType != null"); 273Debug.Assert(c == null, "when look up not found, c should be null."); 276Debug.Assert(node.Children.Count > 0, "If the property represented by the current node is not null, there must be children nodes."); 285Debug.Assert(node.Children.Count == 0, "If the property represented by the current node is not null, there must not be any children node."); 301Debug.Assert(c == null, "DictionaryContent not expected for primitive properties."); 302Debug.Assert(node.Element == null, "node.Element == null"); 312Debug.Assert(false, "We cannot map navigation properties with friendly feeds.");
System\Data\Services\Epm\EpmContentSerializerBase.cs (1)
153Debug.Assert(kind == EpmSerializationKind.All, "Must serialize everything");
System\Data\Services\Epm\EpmCustomContentSerializer.cs (3)
80Debug.Assert(c != null, "Must have custom data for all the children of root"); 131Debug.Assert(targetSegment.HasContent, "Must have content for attributes"); 174Debug.Assert(currentContent.Data != null, "Must always have non-null data content value");
System\Data\Services\Epm\EpmHelper.cs (1)
246Debug.Assert(Enum.GetNames(typeof(SyndicationItemProperty)).Count() == 12, "Any addition to SyndicationItemPropery enum requires updating this method.");
System\Data\Services\Epm\EpmSourceTree.cs (3)
73Debug.Assert(!String.IsNullOrEmpty(sourceName), "Must have been validated during EntityPropertyMappingAttribute construction"); 98Debug.Assert(Object.ReferenceEquals(foundProperty, currentProperty), "currentProperty variable should have been updated already to foundProperty"); 102Debug.Assert(foundProperty.SubProperties.Count == 0, "If non-leaf, it means we allowed complex type to be a leaf node");
System\Data\Services\Epm\EpmSyndicationContentDeSerializer.cs (1)
137Debug.Fail("Unhandled SyndicationItemProperty enum value - should never get here.");
System\Data\Services\Epm\EpmSyndicationContentSerializer.cs (3)
144Debug.Fail("Unhandled SyndicationItemProperty enum value - should never get here."); 245Debug.Fail("propertyToSet is not a Contributor property."); 249Debug.Assert(this.Target.Contributors.Count == 1, "There should be one and only one contributor.");
System\Data\Services\Epm\EpmTargetTree.cs (2)
78Debug.Assert(!String.IsNullOrEmpty(targetName), "Must have been validated during EntityPropertyMappingAttribute construction"); 152Debug.Assert(!String.IsNullOrEmpty(targetName), "Must have been validated during EntityPropertyMappingAttribute construction");
System\Data\Services\ErrorHandler.cs (32)
50Debug.Assert(args != null, "args != null"); 66Debug.Assert(service != null, "service != null"); 67Debug.Assert(host != null, "host != null"); 68Debug.Assert(exception != null, "exception != null"); 69Debug.Assert(writer != null, "writer != null"); 70Debug.Assert(service.Configuration != null, "service.Configuration != null"); 71Debug.Assert(WebUtil.IsCatchableExceptionType(exception), "WebUtil.IsCatchableExceptionType(exception)"); 99Debug.Assert(service != null, "service != null"); 100Debug.Assert(exception != null, "exception != null"); 101Debug.Assert(writer != null, "writer != null"); 102Debug.Assert(service.Configuration != null, "service.Configuration != null - it should have been initialized by now"); 103Debug.Assert(WebUtil.IsCatchableExceptionType(exception), "WebUtil.IsCatchableExceptionType(exception) - "); 128Debug.Assert(WebUtil.IsCatchableExceptionType(exception), "WebUtil.IsCatchableExceptionType(exception)"); 129Debug.Assert(exception != null, "exception != null"); 130Debug.Assert(service != null, "service != null"); 160Debug.Assert(service != null, "service != null"); 161Debug.Assert(exception != null, "exception != null"); 162Debug.Assert(exceptionWriter != null, "exceptionWriter != null"); 163Debug.Assert(service.Configuration != null, "service.Configuration != null"); 164Debug.Assert(WebUtil.IsCatchableExceptionType(exception), "WebUtil.IsCatchableExceptionType(exception)"); 177Debug.Assert(exception != null, "exception != null"); 198Debug.Assert(args != null, "args != null"); 199Debug.Assert(writer != null, "writer != null"); 209Debug.Assert(args != null, "args != null"); 210Debug.Assert(writer != null, "writer != null"); 234Debug.Assert(host != null, "host != null"); 251Debug.Assert(args != null, "args != null"); 252Debug.Assert(encoding != null, "encoding != null"); 424Debug.Assert(writer != null, "writer != null"); 458Debug.Assert(writer != null, "writer != null"); 490Debug.Assert(stream != null, "stream != null"); 507Debug.Assert(stream != null, "stream != null");
System\Data\Services\HttpContextServiceHost.cs (4)
390Debug.Assert(item != null, "item != null"); 391Debug.Assert(item.Trim() == item, "item.Trim() == item - otherwise, there are leading/trailing spaces in the name"); 419Debug.Assert(values != null && values.Length > 0, "values != null && values.Length > 0 - otherwise we should have returned already"); 436Debug.Assert(this.operationContext != null, "this.operationContext != null");
System\Data\Services\HttpProcessUtility.cs (20)
69Debug.Assert(mime != null, "mime != null"); 89Debug.Assert(availableTypes != null, "acceptableTypes != null"); 167Debug.Assert(exactContentType != null && exactContentType.Length != 0, "exactContentType != null && exactContentType.Length != 0"); 168Debug.Assert(inexactContentType != null, "inexactContentType != null"); 235Debug.Assert(selectedContentType == null, "selectedContentType == null - otherwise accept types were not empty"); 239Debug.Assert(selectedContentType != null, "selectedContentType != null - otherwise no selection was made"); 354Debug.Assert(text != null, "text != null"); 473Debug.Assert(text != null, "text != null"); 505Debug.Assert(text != null, "text != null"); 559Debug.Assert(text != null, "text != null"); 560Debug.Assert(text.Length >= 0, "text >= 0"); 561Debug.Assert(textIndex <= text.Length, "text <= text.Length"); 633Debug.Assert(!String.IsNullOrEmpty(text), "!String.IsNullOrEmpty(text)"); 851Debug.Assert(!String.IsNullOrEmpty(headerValue), "!String.IsNullOrEmpty(headerValuer)"); 980Debug.Assert(charset != null, "charset != null"); 981Debug.Assert(charset.Length > 0, "charset.Length > 0"); 982Debug.Assert(0 <= quality && quality <= 1000, "0 <= quality && quality <= 1000"); 1011Debug.Assert(type != null, "type != null"); 1012Debug.Assert(subType != null, "subType != null"); 1037Debug.Assert(candidate != null, "candidate must not be null.");
System\Data\Services\IgnorePropertiesAttribute.cs (1)
82Debug.Assert(attributes.Length == 0 || attributes.Length == 1, "There should be atmost one IgnoreProperties specified");
System\Data\Services\Internal\NeedSkipTokenVisitor.cs (4)
102Debug.Assert(orderingInfo != null, "Must have valid ordering information to collect skip token properties"); 103Debug.Assert(orderingInfo.IsPaged, "Must have paging enabled to collection skip token properties"); 117Debug.Assert(visitor.Property != null, "Must have a valid property if skip token is not needed"); 166Debug.Assert(
System\Data\Services\Internal\ProjectedWrapper.cs (16)
82Debug.Assert(value != null, "value != null"); 157Debug.Assert(bindingExpressions != null, "bindingExpression != null"); 158Debug.Assert(projectedWrapperType != null, "projectedWrapperType != null"); 159Debug.Assert(bindingExpressions.Length >= 2, "At least the ResourceTypeName and PropertyNameList properties must be bound."); 160Debug.Assert( 258Debug.Assert(queryable != null, "queryable != null"); 276Debug.Assert(bindings.Length >= 2, "Must have at least two bindings."); 277Debug.Assert(bindingExpressions.Length >= 2, "Must have at least two expressions to bind."); 278Debug.Assert(typeof(ProjectedWrapper).IsAssignableFrom(projectedWrapperType), "Can't bind to type which is not a projected wrapper."); 291Debug.Assert( 294Debug.Assert( 314Debug.Assert( 317Debug.Assert(bindingExpressions.Length > expressionStartIndex, "At least one expression to bind."); 402Debug.Assert(queryable != null, "queryable != null"); 436Debug.Assert(enumerable != null, "enumerable != null"); 466Debug.Assert(enumerator != null, "enumerator != null");
System\Data\Services\Internal\PropertyAccessVisitor.cs (3)
47Debug.Assert( 57Debug.Assert( 71Debug.Assert(
System\Data\Services\KeyInstance.cs (7)
49Debug.Assert( 95Debug.Assert(this.positionalValues != null, "this.positionalValues != null"); 138Debug.Assert(type != null, "type != null"); 139Debug.Assert(!this.IsEmpty, "!this.IsEmpty -- caller should check"); 140Debug.Assert(type.KeyProperties.Count == this.ValueCount, "type.KeyProperties.Count == this.ValueCount -- will change with containment"); 164Debug.Assert(this.positionalValues != null, "positionalValues != null -- otherwise this is Empty"); 198Debug.Assert(text != null, "text != null");
System\Data\Services\MimeTypeAttribute.cs (1)
70Debug.Assert(member != null, "member != null");
System\Data\Services\OpenTypes\OpenTypeMethods.cs (1)
715Debug.Assert(expression != null, "expression != null");
System\Data\Services\Parsing\ExpressionLexer.cs (5)
67Debug.Assert(expression != null, "expression != null"); 362Debug.Assert(text != null, "text != null"); 394Debug.Assert(text != null, "text != null"); 474Debug.Assert(Char.IsDigit(this.ch), "Char.IsDigit(this.ch)"); 554Debug.Assert(Char.IsLetter(this.ch) || this.ch == '_', "Char.IsLetter(this.ch) || this.ch == '_'");
System\Data\Services\Parsing\FunctionDescription.cs (37)
155Debug.Assert(arguments != null, "arguments != null"); 156Debug.Assert(arguments.Length == this.ParameterTypes.Length, "arguments.Length == this.ParameterTypes.Length"); 171Debug.Assert(methodInfo != null, "methodInfo != null"); 285Debug.Assert( 288Debug.Assert( 310Debug.Assert(arguments != null, "arguments != null"); 311Debug.Assert(arguments.Length == 2, "arguments.Length == 2"); 316Debug.Assert(method != null, "method != null -- otherwise couldn't find string.Contains(string)"); 346Debug.Assert(arguments != null, "arguments != null"); 347Debug.Assert(arguments.Length == 1, "arguments.Length == 1"); 348Debug.Assert(arguments[0].NodeType == ExpressionType.Constant, "Constant expression expected for argument[0]"); 349Debug.Assert(((ConstantExpression)arguments[0]).Type == typeof(ResourceType), "Constant expression type should be ResourceType"); 359Debug.Assert(arguments != null, "arguments != null"); 360Debug.Assert(arguments.Length == 3, "arguments.Length == 3"); 361Debug.Assert(arguments[1].NodeType == ExpressionType.Constant, "Constant expression expected for argument[1]"); 362Debug.Assert(((ConstantExpression)arguments[1]).Type == typeof(ResourceType), "Constant expression type should be ResourceType"); 363Debug.Assert(arguments[2].NodeType == ExpressionType.Constant, "Constant expression expected for argument[2]"); 364Debug.Assert(((ConstantExpression)arguments[2]).Type == typeof(bool), "Constant expression type should be boolean"); 376Debug.Assert(arguments.Length == 1, "arguments.Length == 1"); 387Debug.Assert(arguments.Length == 2, "arguments.Length == 2"); 412Debug.Assert(arguments != null, "arguments != null"); 413Debug.Assert(arguments.Length == 1, "arguments.Length == 1"); 414Debug.Assert(arguments[0].NodeType == ExpressionType.Constant, "Constant expression expected for argument[0]"); 415Debug.Assert(((ConstantExpression)arguments[0]).Type == typeof(ResourceType), "Constant expression type should be ResourceType"); 425Debug.Assert(arguments != null, "arguments != null"); 426Debug.Assert(arguments.Length == 3, "arguments.Length == 3"); 427Debug.Assert(arguments[1].NodeType == ExpressionType.Constant, "Constant expression expected for argument[1]"); 428Debug.Assert(((ConstantExpression)arguments[1]).Type == typeof(ResourceType), "Constant expression type should be ResourceType"); 429Debug.Assert(arguments[2].NodeType == ExpressionType.Constant, "Constant expression expected for argument[2]"); 430Debug.Assert(((ConstantExpression)arguments[2]).Type == typeof(bool), "Constant expression type should be boolean"); 450Debug.Assert(targetType != null, "targetType != null"); 451Debug.Assert(name != null, "name != null"); 452Debug.Assert(parameterTypes.Length == 0 || method, "parameterTypes.Length == 0 || method"); 453Debug.Assert(method || instance, "method || instance"); 461Debug.Assert(member != null, "methodInfo != null"); 466Debug.Assert(member != null, "propertyInfo != null"); 495Debug.Assert(instance, "instance");
System\Data\Services\Parsing\RequestQueryParser.cs (52)
41Debug.Assert(service != null, "service != null"); 42Debug.Assert(source != null, "source != null"); 43Debug.Assert(orderingInfo != null, "orderingInfo != null"); 77Debug.Assert(service != null, "service != null"); 78Debug.Assert(typeForIt != null, "typeForIt != null"); 79Debug.Assert(typeForIt.ResourceTypeKind != ResourceTypeKind.EntityType || setForIt != null, "setForIt cannot be null if typeForIt is an entity type."); 80Debug.Assert(source != null, "source != null"); 81Debug.Assert(predicate != null, "predicate != null"); 101Debug.Assert(service != null, "service != null"); 102Debug.Assert(typeForIt != null, "typeForIt != null"); 103Debug.Assert(typeForIt.ResourceTypeKind != ResourceTypeKind.EntityType || setForIt != null, "setForIt cannot be null if typeForIt is an entity type."); 104Debug.Assert(queryElementType != null, "queryElementType != null"); 105Debug.Assert(expression != null, "expression != null"); 106Debug.Assert(typeForIt.InstanceType == queryElementType, "typeForIt.InstanceType == queryElementType"); 223Debug.Assert(service != null, "service != null"); 228Debug.Assert(typeForIt != null, "typeForIt != null"); 230Debug.Assert(expression != null, "expression != null"); 231Debug.Assert(parameterForIt != null, "parameterForIt != null"); 301Debug.Assert(lastMatch.Type == typeof(bool), "Skip token should generate boolean expression."); 451Debug.Assert(!type.IsEnum, "!type.IsEnum"); 527Debug.Assert(applicable != null, "applicable != null"); 801Debug.Assert(args != null, "args != null"); 802Debug.Assert(m1 != null, "m1 != null"); 803Debug.Assert(m2 != null, "m2 != null"); 1222Debug.Assert(expression != null, "expression != null"); 1231Debug.Assert(input != null, "input != null"); 1269Debug.Assert(false, "Unexpected expression type found."); 1281Debug.Assert(input != null, "input != null"); 1351Debug.Assert(l.CurrentToken.Id == TokenId.NullLiteral, "l.CurrentToken.Id == TokenId.NullLiteral"); 1447Debug.Assert( 1579Debug.Assert(!IsEnumType(left.Type), "!IsEnumType(left.Type)"); 1580Debug.Assert(!IsEnumType(right.Type), "!IsEnumType(right.Type)"); 1586Debug.Assert(op.Id == TokenId.Identifier, "op.id == TokenId.Identifier"); 1659Debug.Assert(ExpressionParser.TokenIdentifierIs(op, ExpressionConstants.KeywordSub), "ExpressionParser.TokenIdentifierIs(op, ExpressionConstants.KeywordSub)"); 1693Debug.Assert(op.IdentifierIs(ExpressionConstants.KeywordModulo), "op.IdentifierIs(ExpressionConstants.KeywordModulo)"); 1780Debug.Assert(Object.ReferenceEquals(this.lexer, l), "Lexer should be the member lexer"); 1797Debug.Assert(Object.ReferenceEquals(this.lexer, l), "Lexer should be the member lexer"); 1934Debug.Assert(typeExpression != null, "typeExpression != null -- otherwise function finding failed."); 1967Debug.Assert( 1979Debug.Assert(candidateTypeArgument != null, "Should have failed to bind to the function if arguments don't match"); 1980Debug.Assert(candidateTypeArgument.Type == typeof(string), "First argument to 'cast' should have been a string"); 1981Debug.Assert(candidateTypeArgument.NodeType == ExpressionType.Constant, "Non-constant in type name for a cast?"); 1996Debug.Assert(this.CurrentToken.Id == TokenId.BooleanLiteral, "this.CurrentToken.Id == TokenId.BooleanLiteral"); 2005Debug.Assert(originalText == ExpressionConstants.KeywordFalse, "originalText == ExpressionConstants.KeywordFalse"); 2034Debug.Assert(instance != null, "instance != null"); 2042Debug.Assert(this.currentSegmentInfo != null, "Must have initialized current segment information."); 2184Debug.Assert(functions != null, "functions != null"); 2304Debug.Assert(signatures != null, "signatures != null"); 2305Debug.Assert(operationName != null, "operationName != null"); 2447Debug.Assert(!pi.IsOut, "!pi.IsOut"); 2468Debug.Assert(expr != null, "expr != null"); 2469Debug.Assert(type != null, "type != null");
System\Data\Services\Parsing\WebConvert.cs (22)
76Debug.Assert(text != null, "text != null"); 117Debug.Assert(type != null, "type != null"); 127Debug.Assert(value != null, "value != null"); 145Debug.Assert(result != null, "result != null"); 205Debug.Assert(!String.IsNullOrEmpty(text), "!String.IsNullOrEmpty(text)"); 208Debug.Assert(quote == '\'', "quote == '\''"); 209Debug.Assert(text[text.Length - 1] == '\'', "text should end with '\''."); 221Debug.Assert(i + 1 < s.Length && s[i + 1] == '\'', @"Each single quote should be propertly escaped with double single quotes."); 235Debug.Assert(text != null, "text != null"); 345Debug.Assert(text != null, "text != null"); 346Debug.Assert(targetType != null, "targetType != null"); 391Debug.Assert(IsKeyValueQuoted(text), "IsKeyValueQuoted(text) - otherwise caller didn't check this before"); 481Debug.Assert(typeof(System.Xml.Linq.XElement) == targetType, "XElement == " + targetType); 500Debug.Assert(text != null, "text != null"); 501Debug.Assert(targetType != null, "targetType != null"); 564Debug.Assert(typeof(Single) == targetType, "typeof(Single) == targetType(" + targetType + ")"); 617Debug.Assert(value != null, "value != null"); 699Debug.Assert(result != null, "result != null"); 710Debug.Assert(IsCharHexDigit(c)); 764Debug.Assert(text != null, "text != null"); 765Debug.Assert(suffix != null, "suffix != null"); 787Debug.Assert(prefix != null, "prefix != null");
System\Data\Services\ProcessRequestArgs.cs (1)
38System.Diagnostics.Debug.Assert(requestUri != null, "requestUri != null");
System\Data\Services\Providers\BaseServiceProvider.cs (32)
71Debug.Assert( 166Debug.Assert(this.providerWrapper != null, "this.providerWrapper != null"); 250Debug.Assert(type != null, "type != null"); 292Debug.Assert(container != null, "resourceContainer != null"); 301Debug.Assert(resource != null, "instance != null"); 313Debug.Assert(target != null, "target != null"); 314Debug.Assert(resourceProperty != null, "resourceProperty != null"); 319Debug.Assert(propertyInfo != null, "propertyInfo != null"); 376Debug.Assert(resourceType != null, "resourceType != null"); 377Debug.Assert(this.ChildTypesCache.ContainsKey(resourceType), "this.ChildTypesCache.ContainsKey(resourceType)"); 401Debug.Assert(resourceType != null, "resourceType != null"); 402Debug.Assert(this.ChildTypesCache.ContainsKey(resourceType), "this.ChildTypesCache.ContainsKey(resourceType)"); 403Debug.Assert(this.ChildTypesCache[resourceType] == null || this.ChildTypesCache[resourceType].Count > 0, "this.ChildTypesCache[resourceType] == null || this.ChildTypesCache[resourceType].Count > 0"); 414Debug.Assert(!string.IsNullOrEmpty(name), "!string.IsNullOrEmpty(name)"); 424Debug.Assert(!string.IsNullOrEmpty(name), "!string.IsNullOrEmpty(name)"); 434Debug.Assert(!string.IsNullOrEmpty(name), "!string.IsNullOrEmpty(name)"); 435Debug.Assert(this.metadata != null, "this.metadata != null"); 436Debug.Assert(this.TypeCache != null, "this.TypeCache != null"); 475Debug.Assert(type != null, "type != null"); 476Debug.Assert(!type.IsGenericTypeDefinition, "!type.IsGenericTypeDefinition"); 504Debug.Assert(type != null, "type != null"); 521Debug.Assert(this.metadata != null, "this.metadata != null -- otherwise we don't have an item to populate"); 531Debug.Assert(configuration != null, "configuration != null"); 583Debug.Assert(knownTypes != null, "knownTypes != null"); 584Debug.Assert(type != null, "type != null"); 685Debug.Assert(m != null, "m != null"); 695Debug.Assert(m != null, "m != null"); 717Debug.Assert(method != null, "method != null"); 718Debug.Assert(!method.IsAbstract, "!method.IsAbstract - if method is abstract, the type is abstract - already checked"); 773Debug.Assert(resultType != null, "resultType != null"); 850Debug.Assert(type != null, "type != null"); 880Debug.Assert(type != null, "type != null");
System\Data\Services\Providers\BasicExpandProvider.cs (55)
96Debug.Assert(provider != null, "provider != null"); 138Debug.Assert(projection is RootProjectionNode, "We always get the special root node."); 210Debug.Assert(root != null, "root != null"); 221Debug.Assert( 368Debug.Assert(source != null, "source != null"); 517Debug.Assert(name != null, "name != null"); 518Debug.Assert(property == null || String.Equals(property.Name, name, StringComparison.Ordinal), "The name of the property must match the specified name."); 690Debug.Assert(node != null, "node != null"); 691Debug.Assert(provider != null, "provider != null"); 818Debug.Assert(provider != null, "provider != null"); 819Debug.Assert(rootProjectionNode != null, "projection != null"); 918Debug.Assert( 1046Debug.Assert(this.projectedProperties == null, "By default the entire resource should be projected."); 1051Debug.Assert(this.projectedProperties == null, "By default the entire resource should be projected."); 1076Debug.Assert(child.Node != null, "child.Segment != null -- only the root has a null segment"); 1120Debug.Assert(this.RequiresProjectedWrapper, "The parent segment must use projected wrapper, if some of its children where projected explicitely."); 1145Debug.Assert(query != null, "query != null"); 1146Debug.Assert(this.isRoot, "BuildProjectionQuery is being called on a non-root node."); 1153Debug.Assert( 1173Debug.Assert(property != null, "property != null"); 1174Debug.Assert(this.projectedProperties != null, "Trying to find a projected property when no projections were applied."); 1192Debug.Assert(delegateType != null, "delegateType != null"); 1193Debug.Assert(body != null, "body != null"); 1219Debug.Assert(m != null, "m != null"); 1220Debug.Assert(!String.IsNullOrEmpty(name), "!String.IsNullOrEmpty(name)"); 1250Debug.Assert(source != null, "source != null"); 1251Debug.Assert(resourceType != null, "resourceType != null"); 1252Debug.Assert(property != null, "property != null"); 1253Debug.Assert(resourceType.InstanceType.IsAssignableFrom(source.Type), "Trying to access a property on expression of a wrong type."); 1294Debug.Assert(property.Type.IsAssignableFrom(expression.Type), "The returned expression is not of the type of the property being accessed."); 1306Debug.Assert(source != null, "source != null"); 1307Debug.Assert(propertyName != null, "propertyName != null"); 1314Debug.Assert(expression.Type == typeof(object), "Open properties should always return 'object' type."); 1330Debug.Assert(propertyName != null, "propertyName != null"); 1331Debug.Assert(source != null, "source != null"); 1385Debug.Assert(expression != null, "expression != null"); 1406Debug.Assert(this.RequiresProjectedWrapper, "this.RequiresProjectedWrapper"); 1435Debug.Assert(source != null, "source != null"); 1436Debug.Assert(this.RequiresExpandedWrapper, "this.RequiresExpandedWrapper"); 1471Debug.Assert( 1502Debug.Assert(!this.singleResult, "We don't need sorting for single results"); 1503Debug.Assert(this.orderingInfo != null, "Must have ordering info to require skip token"); 1540Debug.Assert(!this.RequiresProjectedWrapper || this.projectedProperties != null, "Must have a list of projected properties if projection wrapper is required."); 1553Debug.Assert(this.resourceTypes != null, "We should have filled a list of resource types already."); 1554Debug.Assert(this.resourceTypes.Count > 0, "We should have at least the base type filled."); 1702Debug.Assert(typeIsExpression.Type == typeof(bool), "The type test expression should be of type bool."); 1706Debug.Assert(expression.Type == projectedWrapperType, "The projection expression is of a wrong type."); 1709Debug.Assert(expression != null, "We should have generated some projection expression."); 1715Debug.Assert(WebUtil.TypeAllowsNull(expression.Type), "We should only project types which are nullable."); 1743Debug.Assert(this.OrderingInfo.IsPaged, "Paging should be enabled for current segment."); 1764Debug.Assert(this.Node.MaxResultsExpected.HasValue, "Paging is on for this node, so it should have the MaxResultsExpected set as well."); 1780Debug.Assert(this.RequiresWrapper, "this.RequiresWrapper -- otherwise no need to call SetWrapperElementType"); 1797Debug.Assert(this.OrderingInfo != null, "Must have ordering info to require a skip token"); 1824Debug.Assert(this.RequiresProjectedWrapper, "The node must have some projections for it to use projected wrapper."); 1904Debug.Assert(trueAnnotation == falseAnnotation, "True and False branches of a conditional expression have different asigned expand nodes.");
System\Data\Services\Providers\DataServiceProviderWrapper.cs (45)
99Debug.Assert(metadata != null, "metadata != null"); 100Debug.Assert(metadataProvider != null, "metadataProvider != null"); 101Debug.Assert(queryProvider != null, "queryProvider != null"); 102Debug.Assert( 410Debug.Assert(resourceSet != null, "resourceSet != null"); 422Debug.Assert(instance != null, "instance != null"); 435Debug.Assert(target != null, "target != null"); 436Debug.Assert(resourceProperty != null, "resourceProperty != null"); 437Debug.Assert(resourceProperty.IsReadOnly, "resourceProperty.IsReadOnly"); 447Debug.Assert(resourceType != null, "resourceType != null"); 449Debug.Assert(propertyInfo != null, "propertyInfo != null"); 472Debug.Assert(target != null, "target != null"); 473Debug.Assert(!string.IsNullOrEmpty(propertyName), "!string.IsNullOrEmpty(propertyName)"); 485Debug.Assert(target != null, "target != null"); 503Debug.Assert(serviceOperation != null, "serviceOperation != null"); 516Debug.Assert(!string.IsNullOrEmpty(name), "!string.IsNullOrEmpty(name)"); 544Debug.Assert(resourceSet != null, "resourceSet != null"); 545Debug.Assert(resourceType != null, "resourceType != null"); 546Debug.Assert(resourceProperty != null, "resourceProperty != null"); 609Debug.Assert(!string.IsNullOrEmpty(name), "!string.IsNullOrEmpty(name)"); 639Debug.Assert(resourceType != null, "resourceType != null"); 662Debug.Assert(this.ValidateResourceType(resourceType) != null, "resourceType must be read-only and visible."); 671Debug.Assert(!string.IsNullOrEmpty(name), "!string.IsNullOrEmpty(name)"); 702Debug.Assert(resourceType != null, "resourceType != null"); 703Debug.Assert(resourceProperty != null, "resourceProperty != null"); 715Debug.Assert(resourceType != null, "resourceType != null"); 722Debug.Assert(this.queryProvider != null, "this.queryProvider != null"); 723Debug.Assert(this.metadataProvider != null, "this.metadataProvider != null"); 743Debug.Assert(this.IsV1Provider, "this.IsV1Provider"); 796Debug.Assert(this.IsV1Provider, "Must be a V1 provider to call this function"); 808Debug.Assert(containerName != null || !(this.metadataProvider is ObjectContextServiceProvider), "ContainerName is required for MEST-enabled provider (EFx provider)"); 809Debug.Assert(resourceType != null && resourceType.ResourceTypeKind == ResourceTypeKind.EntityType, "Resource should be non-null and of an entity type"); 826Debug.Assert(resourceType != null, "resourceType != null"); 829Debug.Assert(resourceSet != null, "resourceSet != null"); 864Debug.Assert(serializer != null, "serializer != null"); 865Debug.Assert(writer != null, "writer != null"); 923Debug.Assert(dataService != null, "dataService != null"); 924Debug.Assert(dataService.Provider == this, "dataService.Provider == this"); 925Debug.Assert(typeof(T) != typeof(IDataServiceMetadataProvider), "typeof(T) != typeof(IDataServiceMetadataProvider)"); 926Debug.Assert(typeof(T) != typeof(IDataServiceQueryProvider), "typeof(T) != typeof(IDataServiceQueryProvider)"); 927Debug.Assert(typeof(T).IsVisible, "Trying to ask the service for non-public interface."); 987Debug.Assert(resourceSet != null, "resourceSet != null"); 988Debug.Assert(resourceType != null, "resourceType != null"); 994Debug.Assert(result == DataServiceProviderWrapper.RefTrue || result == DataServiceProviderWrapper.RefFalse, "result must be either RefTrue or RefFalse."); 1054Debug.Assert(resourceType != null, "resourceType != null");
System\Data\Services\Providers\DataServiceStreamProviderWrapper.cs (26)
55Debug.Assert(dataService != null, "dataService != null"); 90Debug.Assert(this.streamProvider != null, "this.streamProvider != null"); 108Debug.Assert(!string.IsNullOrEmpty(mediaLinkEntryUri), "!string.IsNullOrEmpty(mediaLinkEntryUri)"); 150Debug.Assert(entity != null, "entity != null"); 151Debug.Assert(operationContext != null, "operationContext != null"); 156Debug.Assert( 213Debug.Assert(entity != null, "entity != null"); 214Debug.Assert(operationContext != null, "operationContext != null"); 219Debug.Assert( 241Debug.Assert(entity != null, "entity != null"); 242Debug.Assert(operationContext != null, "operationContext != null"); 256Debug.Assert(entity != null, "entity != null"); 257Debug.Assert(operationContext != null, "operationContext != null"); 282Debug.Assert(entity != null, "entity != null"); 283Debug.Assert(operationContext != null, "operationContext != null"); 313Debug.Assert(entity != null, "entity != null"); 314Debug.Assert(operationContext != null, "operationContext != null"); 338Debug.Assert(operationContext != null, "operationContext != null"); 365Debug.Assert(entity != null, "entity != null"); 366Debug.Assert(operationContext != null, "operationContext != null"); 405Debug.Assert(operationContext != null, "operationContext != null"); 406Debug.Assert(operationContext.Host != null, "operationContext.Host != null"); 408Debug.Assert(string.IsNullOrEmpty(host.RequestIfMatch) || string.IsNullOrEmpty(host.RequestIfNoneMatch), "IfMatch and IfNoneMatch should not be both set."); 437Debug.Assert(!string.IsNullOrEmpty(methodName), "!string.IsNullOrEmpty(methodName)"); 438Debug.Assert(operationContext != null, "operationContext != null"); 439Debug.Assert(apiCall != null, "apiCall != null");
System\Data\Services\Providers\EntityPropertyMappingInfo.cs (5)
81Debug.Assert(attribute != null, "attribute != null"); 82Debug.Assert(definingType != null, "definingType != null"); 83Debug.Assert(actualPropertyType != null, "actualPropertyType != null"); 89Debug.Assert(!string.IsNullOrEmpty(attribute.SourcePath), "Invalid source path"); 220Debug.Assert(resourceType != null, "resourceType != null");
System\Data\Services\Providers\ExpandedProjectionNode.cs (9)
97Debug.Assert(resourceSetWrapper != null, "resourceSetWrapper != null"); 98Debug.Assert(property != null || propertyName.Length == 0, "We don't support open navigation properties."); 209Debug.Assert(this.Property != null, "Derived class should override this if property can be null."); 241Debug.Assert(!value || this.projectionFound, "Marking node to include all child properties requires the node to be projected."); 264Debug.Assert(propertyName != null, "propertyName != null"); 273Debug.Assert(node != null, "node != null"); 274Debug.Assert(this.FindNode(node.PropertyName) == null, "Trying to add a duplicate node."); 371Debug.Assert( 392Debug.Assert(this.nodes.Count == existingNodes.Count, "We didn't sort all the properties.");
System\Data\Services\Providers\ObjectContextServiceProvider.cs (91)
107Debug.Assert(resourceSet != null, "resourceSet != null"); 108Debug.Assert(resourceType != null, "resourceType != null"); 109Debug.Assert(resourceProperty != null, "resourceProperty != null"); 110Debug.Assert(resourceType == DataServiceProviderWrapper.GetDeclaringTypeForProperty(resourceType, resourceProperty), "resourceType should be the declaring type for resourceProperty"); 114Debug.Assert(sourceEntitySet != null, "entitySet != null -- GetEntitySet should never return null"); 118Debug.Assert(sourceEntityType != null, "entityType != null"); 123Debug.Assert(sourceNavigationProperty != null, "navigationProperty != null"); 124Debug.Assert(sourceEntityType == (EntityType)sourceNavigationProperty.DeclaringType, "sourceEntityType == (EntityType)sourceNavigationProperty.DeclaringType"); 146Debug.Assert(targetResourceSet != null, "targetResourceSet != null"); 152Debug.Assert(targetResourceType != null, "targetResourceType != null"); 246Debug.Assert(projection is RootProjectionNode, "We always get the special root node."); 248Debug.Assert(rootNode.OrderingInfo != null, "We always get non-null OrderingInfo"); 292Debug.Assert(xmlWriter != null, "xmlWriter != null"); 350Debug.Assert(resourceType != null, "resourceType != null"); 360Debug.Assert(resourceType.ResourceTypeKind == ResourceTypeKind.EntityType, "resourceType.ResourceTypeKind == ResourceTypeKind.EntityType - expecting an entity type"); 367Debug.Assert(resourceType.ResourceTypeKind == ResourceTypeKind.ComplexType, "resourceType.ResourceTypeKind == ResourceTypeKind.ComplexType - expecting a complex type"); 382Debug.Assert(query != null, "query != null"); 385Debug.Assert(objectQuery != null, "objectQuery != null - otherwise we're passed an IQueryable we didn't produce"); 402Debug.Assert(resourceType != null, "the result must return a known type"); 419Debug.Assert(resource != null, "resource != null"); 470Debug.Assert(resourceType != null, "resourceType != null"); 472Debug.Assert(resourceProperty != null, "resourceProperty != null"); 496Debug.Assert(resourceType != null, "resourceType != null"); 498Debug.Assert(resourceProperty != null, "resourceProperty != null"); 591Debug.Assert(resource != null, "resource != null"); 641Debug.Assert(checkForEquality.Value, "If-None-Match header is currently not supported for Update/Delete operations"); 643Debug.Assert(objectStateEntry != null, "ObjectStateEntry must be found"); 669Debug.Assert(contentKind == SyndicationTextContentKind.Xhtml, "Unexpected syndication text content kind"); 704Debug.Assert(property == SyndicationItemProperty.Title, "Unexpected SyndicationItemProperty value"); 726Debug.Assert(!String.IsNullOrEmpty(containerName), "container name must not be empty"); 727Debug.Assert(resourceType != null, "Type cannot be null"); 731Debug.Assert(entityType != null, "entityType != null"); 745Debug.Assert(property != null, "property != null"); 746Debug.Assert(property.TypeKind == ResourceTypeKind.Primitive, "property.TypeKind == ResourceTypeKind.Primitive"); 801Debug.Assert(containerEntry.Key != null, "containerEntry.Key != null"); 802Debug.Assert(containerEntry.Value != null, "containerEntry.Value != null"); 846Debug.Assert(knownTypes != null, "knownTypes != null"); 847Debug.Assert(entitySets != null, "entitySets != null"); 848Debug.Assert(this.ObjectContext != null, "this.ObjectContext != null"); 910Debug.Assert(resourceContainer != null, "resourceContainer != null"); 960Debug.Assert(!WebUtil.IsPrimitiveType(type), "Why are we trying to load metadata for a primitive type?"); 1006Debug.Assert(dataSourceInstance != null, "dataSourceInstance != null"); 1036Debug.Assert(workspace != null, "workspace != null"); 1037Debug.Assert(edmType != null, "edmType != null"); 1038Debug.Assert( 1060Debug.Assert(type != null, "type != null"); 1061Debug.Assert(workspace != null, "workspace != null"); 1089Debug.Assert(workspace != null, "workspace != null"); 1090Debug.Assert(associationType != null, "associationType != null"); 1091Debug.Assert(member != null, "member != null"); 1135Debug.Assert(type != null, "type != null"); 1181Debug.Assert(query != null, "query != null"); 1182Debug.Assert(dottedPath != null, "dottedPath != null"); 1215Debug.Assert(type != null, "type != null"); 1222Debug.Assert( 1234Debug.Assert(segments != null, "segments != null"); 1270Debug.Assert( 1309Debug.Assert( 1359Debug.Assert(childTypes.ContainsKey(baseResourceType), "childTypes.ContainsKey(baseResourceType)"); 1382Debug.Assert(resourceType != null, "resourceType != null"); 1383Debug.Assert(workspace != null, "workspace != null"); 1430Debug.Assert(!WebUtil.IsPrimitiveType(propertyClrType), "We don't support collections of primitives, we shouldn't see one here"); 1434Debug.Assert(false, "Invalid member type encountered on " + member.Name + " - " + member.TypeUsage.EdmType.BuiltInTypeKind); 1438Debug.Assert(propertyType != null, "propertyType != null"); 1481Debug.Assert(set != null, "set != null"); 1482Debug.Assert(member != null, "member != null"); 1499Debug.Assert(properties != null, "properties != null"); 1608Debug.Assert(xmlWriter != null, "xmlWriter != null"); 1609Debug.Assert(metadataProperties != null, "metadataProperties != null"); 1610Debug.Assert( 1627Debug.Assert(index != -1, "empty space is a reserved namespace for edm. So this should never be the case"); 1702Debug.Assert( 1738Debug.Assert( 1824Debug.Assert(false, "Unexpected EdmType encountered"); 2032Debug.Assert( 2119Debug.Assert(resourceProperty != null, "resourceProperty must not be null"); 2287Debug.Assert( 2308Debug.Assert( 2313Debug.Assert( 2348Debug.Assert(container != null, "container != null"); 2393Debug.Assert(targetResource != null, "targetResource != null"); 2394Debug.Assert(!String.IsNullOrEmpty(propertyName), "!String.IsNullOrEmpty(propertyName)"); 2404Debug.Assert(resourceProperty != null && resourceProperty.TypeKind == ResourceTypeKind.EntityType, "property must be a navigation property"); 2414Debug.Assert(addRelationship == null, "addRelationship == null for reference properties"); 2454Debug.Assert(propertyValue != null, "propertyValue != null"); 2461Debug.Assert(propertyValue != null, "propertyValue != null"); 2514Debug.Assert(workspace != null, "workspace != null"); 2515Debug.Assert(provider != null, "provider != null"); 2728Debug.Assert(edmType != null, "edmType != null"); 2740Debug.Assert(resourceType != null, "resourceType != null"); 2784Debug.Assert(
System\Data\Services\Providers\ProjectionNode.cs (2)
43Debug.Assert(propertyName != null, "propertyName != null"); 44Debug.Assert(property == null || property.Name == propertyName, "If the property is specified its name must match.");
System\Data\Services\Providers\ReflectionServiceProvider.cs (33)
73Debug.Assert(resourceSet != null, "resourceSet != null"); 74Debug.Assert(resourceType != null, "resourceType != null"); 75Debug.Assert(resourceProperty != null, "resourceProperty != null"); 76Debug.Assert(resourceType == DataServiceProviderWrapper.GetDeclaringTypeForProperty(resourceType, resourceProperty), "resourceType should be the declaring type for resourceProperty"); 79Debug.Assert(targetType != null && targetType.ResourceTypeKind == ResourceTypeKind.EntityType, "targetType != null && targetType.ResourceTypeKind == ResourceTypeKind.EntityType"); 82Debug.Assert(targetSet != null, "targetSet != null"); 106Debug.Assert(type != null, "type != null"); 146Debug.Assert(projection is RootProjectionNode, "We always get the special root node."); 148Debug.Assert(rootNode.OrderingInfo != null, "We always get non-null OrderingInfo"); 311Debug.Assert(resourceContainer != null, "resourceContainer != null"); 328Debug.Assert(resourceContainer.ReadFromContextDelegate != null, "resourceContainer.ReadFromContextDelegate != null"); 399Debug.Assert(type != null, "type != null"); 432Debug.Assert(type != null, "type != null"); 470Debug.Assert(knownTypes != null, "knownTypes != null"); 471Debug.Assert(unvisitedTypes != null, "unvisitedTypes != null"); 472Debug.Assert(entitySets != null, "entitySets != null"); 598Debug.Assert(parentResourceType != null, "parentResourceType != null"); 599Debug.Assert(knownTypes != null, "knownTypes != null"); 600Debug.Assert(unvisitedTypes != null, "unvisitedTypes != null"); 601Debug.Assert(entitySets != null, "entitySets != null"); 612Debug.Assert(parentResourceType.IsOpenType == false, "ReflectionServiceProvider does not support Open types."); 670Debug.Assert(currentKeyKind == ResourceKeyKind.AttributedKey, "This is the only way of specifying composite keys"); 704Debug.Assert(resourceType.ResourceTypeKind == ResourceTypeKind.EntityType, "Must be an entity type"); 810Debug.Assert(type != null, "type != null"); 811Debug.Assert(entitySets != null, "entitySets != null"); 838Debug.Assert(knownTypes != null, "knownTypes != null"); 839Debug.Assert(unvisitedTypes != null, "unvisitedTypes != null"); 840Debug.Assert(entitySets != null, "entitySets != null"); 922Debug.Assert(attributes.Length <= 1, "Only one attribute can be specified per type"); 963Debug.Assert(childTypes.ContainsKey(baseType), "childTypes.ContainsKey(baseType)"); 983Debug.Assert(type != null, "type != null"); 990Debug.Assert(type.DeclaringType != null, "type.DeclaringType != null"); 1019Debug.Assert(type.DeclaringType != null, "type.DeclaringType != null");
System\Data\Services\Providers\ResourceAssociationSet.cs (4)
124Debug.Assert(resourceSet != null, "resourceSet != null"); 125Debug.Assert(resourceType != null, "resourceType != null"); 151Debug.Assert(resourceSet != null, "resourceSet != null"); 152Debug.Assert(resourceType != null, "resourceType != null");
System\Data\Services\Providers\ResourceAssociationType.cs (4)
43Debug.Assert(!String.IsNullOrEmpty(name), "!String.IsNullOrEmpty(name)"); 44Debug.Assert(end1 != null && end2 != null, "end1 != null && end2 != null"); 84Debug.Assert(resourceType != null, "resourceType != null"); 105Debug.Assert(resourceType != null, "resourceType != null");
System\Data\Services\Providers\ResourceAssociationTypeEnd.cs (2)
43Debug.Assert(!String.IsNullOrEmpty(name), "!String.IsNullOrEmpty(name)"); 44Debug.Assert(resourceType != null, "type != null");
System\Data\Services\Providers\ResourceContainerWrapper.cs (1)
70Debug.Assert(resourceSet != null, "resourceSet != null");
System\Data\Services\Providers\ResourceProperty.cs (1)
153Debug.Assert(!this.isReadOnly, "Kind - the resource property cannot be readonly");
System\Data\Services\Providers\ResourceType.cs (31)
161Debug.Assert(WebUtil.IsPrimitiveType(type), "This constructor should be called only for primitive types"); 296Debug.Assert(this.isReadOnly, "PropetiesDeclaredInThisType - at this point, the resource type must be readonly"); 334Debug.Assert(this.isReadOnly, "KeyProperties - at this point, the resource type must be readonly"); 335Debug.Assert( 360Debug.Assert(this.isReadOnly, "ETagProperties - at this point, the resource type must be readonly"); 474Debug.Assert(this.IsReadOnly, "Type must be read-only."); 504Debug.Assert(this.isReadOnly, "Resource type must already be read-only."); 533Debug.Assert(this.epmInfo != null, "Must have valid EpmInfo"); 543Debug.Assert(this.epmInfo != null, "Must have valid EpmInfo"); 553Debug.Assert(this.epmInfo != null, "Must have valid EpmInfo"); 563Debug.Assert(this.epmInfo != null, "Must have valid EpmInfo"); 836Debug.Assert(currentValue != null, "currentValue != null -- we should never be here if the complex property were null."); 845Debug.Assert( 866Debug.Assert(!this.isReadOnly, "The resource type cannot be sealed - RemoveKeyProperties"); 869Debug.Assert(key.Count == 1, "Key Properties count must be zero"); 870Debug.Assert(this.BaseType == null, "BaseType must be null"); 871Debug.Assert(key[0].IsOfKind(ResourcePropertyKind.Key), "must be key property"); 924Debug.Assert(resourceProperty != null, "resourceProperty != null"); 925Debug.Assert(resourceProperty.CanReflectOnInstanceTypeProperty, "resourceProperty.CanReflectOnInstanceTypeProperty"); 935Debug.Assert(propertyInfo != null, "propertyInfo != null"); 945Debug.Assert(instance != null, "instance != null"); 946Debug.Assert(resourceProperty != null, "resourceProperty != null"); 1035Debug.Assert(this.isReadOnly, "Propeties - at this point, the resource type must be readonly"); 1070Debug.Assert(property.TypeKind == ResourceTypeKind.Primitive, "This check must have been done in ResourceProperty.ValidatePropertyParameters method"); 1071Debug.Assert(!property.IsOfKind(ResourcePropertyKind.ETag), "This check must have been done in ResourceProperty.ValidatePropertyParameters method"); 1072Debug.Assert(property.IsOfKind(ResourcePropertyKind.Primitive), "This check must have been done in ResourceProperty.ValidatePropertyParameters method"); 1099Debug.Assert(resourceProperty != null, "resourceProperty != null"); 1100Debug.Assert(resourceProperty.CanReflectOnInstanceTypeProperty, "resourceProperty.CanReflectOnInstanceTypeProperty"); 1120Debug.Assert(propertyInfo != null, "propertyInfo != null"); 1148Debug.Assert(this.OwnEpmInfo.SingleOrDefault(attr => Object.ReferenceEquals(epmAttr, attr)) != null, "Own epmInfo should already have the given instance"); 1210Debug.Assert(this.isLoadPropertiesMethodCalled && this.IsReadOnly, "This method must be invoked only if LoadPropertiesDeclaredOnThisType has been called and the type is set to ReadOnly");
System\Data\Services\Providers\RootProjectionNode.cs (1)
71Debug.Assert(baseResourceType != null, "baseResourceType != null");
System\Data\Services\Providers\ServiceOperationWrapper.cs (2)
52Debug.Assert(serviceOperation != null, "serviceOperation != null"); 155Debug.Assert(
System\Data\Services\RequestDescription.cs (18)
109Debug.Assert(resultUri != null, "resultUri != null"); 110Debug.Assert(resultUri.IsAbsoluteUri, "resultUri.IsAbsoluteUri(" + resultUri + ")"); 140Debug.Assert(segmentInfos != null && segmentInfos.Length != 0, "segmentInfos != null && segmentInfos.Length != 0"); 141Debug.Assert(resultUri != null, "resultUri != null"); 142Debug.Assert(resultUri.IsAbsoluteUri, "resultUri.IsAbsoluteUri(" + resultUri + ")"); 163Debug.Assert( 166Debug.Assert( 471Debug.Assert(this.LastSegmentInfo != null, "this.LastSegmentInfo != null"); 481Debug.Assert(leftSet != null, "leftSet != null"); 482Debug.Assert(rightSet != null, "rightSet != null"); 495Debug.Assert(resourceSet != null, "resourceSet != null"); 511Debug.Assert(resourceSet != null, "resourceSet != null"); 512Debug.Assert(service != null, "provider != null"); 540Debug.Assert(provider != null, "provider != null"); 545Debug.Assert(resourceSet != null, "Must have valid resource set"); 565Debug.Assert(this.segmentInfos.Length >= 1, "this.segmentInfos.Length >= 1"); 650Debug.Assert(this.LinkUri, "GetLinkedResourceSets should only be called if this is a $link request."); 661Debug.Assert(idx > 0 && idx < this.segmentInfos.Length - 1, "idx > 0 && idx < this.segmentInfos.Length - 1");
System\Data\Services\RequestQueryProcessor.cs (31)
144Debug.Assert(targetContainer != null, "Must have target container for non-open properties"); 176Debug.Assert(service != null, "service != null"); 204Debug.Assert(service != null, "service != null"); 220Debug.Assert(expression != null, "expression != null"); 221Debug.Assert(filterLambda != null, "filterLambda != null"); 253Debug.Assert(service != null, "service != null"); 284Debug.Assert(source != null, "source != null"); 296Debug.Assert(source != null, "source != null"); 318Debug.Assert(!String.IsNullOrEmpty(value), "!String.IsNullOrEmpty(value)"); 388Debug.Assert(this.expandPathsAsText != null, "this.expandPaths != null"); 595Debug.Assert(currentNode.ResourceType == this.description.TargetResourceType, "The resource type of the root doesn't match the target type of the query."); 599Debug.Assert(currentNode != null, "Can't apply projections to non-expanded nodes."); 608Debug.Assert(lastPathSegment, "The * select segment must be the last one. This should have been checked already by the ReadExpandOrSelect method."); 652Debug.Fail("Unexpected property type."); 674Debug.Assert( 814Debug.Assert(!this.service.Provider.IsV1Provider, "All V1 providers should implement the IProjectionProvider interface."); 844Debug.Assert(this.queryResults != null, "this.queryResults != null"); 886Debug.Assert(!this.IsCustomPaged, "Custom paging should be disabled for this function to be called."); 918Debug.Assert(this.IsCustomPaged, "Custom paging should be enabled for this function to be called."); 955Debug.Assert(this.topLevelOrderingInfo != null, "Must have valid ordering information in ProcessOrderBy"); 1031Debug.Assert(this.topLevelOrderingInfo == null, "Must only be called once per query"); 1034Debug.Assert(rt != null || this.setQueryApplicable == false, "Resource type must be known for Ordering to be applied."); 1043Debug.Assert(this.description.LastSegmentInfo.TargetContainer != null, "Resource set must be known for Ordering to be applied."); 1071Debug.Assert(this.query.ElementType == rt.InstanceType, "Resource type should match query element type when in this function"); 1162Debug.Assert(this.queryResults != null, "this.queryResults != null -- otherwise ProcessExpand didn't set it"); 1285Debug.Assert(this.query != null, "this.query != null"); 1288Debug.Assert(this.orderApplied, "Ordering must have already been applied."); 1293Debug.Assert(this.query != null, "this.query != null"); 1298Debug.Assert(this.orderApplied, "Ordering must have already been applied."); 1303Debug.Assert(this.query != null, "this.query != null"); 1358Debug.Assert(queryItem != null, "queryItem != null");
System\Data\Services\RequestUriProcessor.cs (73)
70Debug.Assert(service != null, "service != null"); 71Debug.Assert(absoluteRequestUri != null, "absoluteRequestUri != null"); 72Debug.Assert(absoluteRequestUri.IsAbsoluteUri, "absoluteRequestUri.IsAbsoluteUri(" + absoluteRequestUri + ")"); 95Debug.Assert(lastSegment != null, "lastSegment != null"); 96Debug.Assert(lastSegment.TargetSource == RequestTargetSource.ServiceOperation, "targetSource == RequestTargetSource.ServiceOperation"); 107Debug.Assert(lastSegment != null, "lastSegment != null"); 108Debug.Assert( 192Debug.Assert(uri != null, "uri != null"); 193Debug.Assert(text != null, "text != null"); 211Debug.Assert(uri != null, "uri != null"); 212Debug.Assert(text != null, "text != null"); 231Debug.Assert(!String.IsNullOrEmpty(reference), "!String.IsNullOrEmpty(reference) -- caller should check and throw appropriate message"); 232Debug.Assert(absoluteServiceUri != null, "absoluteServiceUri != null"); 233Debug.Assert(absoluteServiceUri.IsAbsoluteUri, "absoluteServiceUri.IsAbsoluteUri(" + absoluteServiceUri + ")"); 260Debug.Assert( 272Debug.Assert(uri != null, "uri != null"); 288Debug.Assert(operationContext != null, "operationContext != null"); 314Debug.Assert(absoluteRequestUri != null, "absoluteRequestUri != null"); 315Debug.Assert(absoluteRequestUri.IsAbsoluteUri, "absoluteRequestUri.IsAbsoluteUri(" + absoluteRequestUri.IsAbsoluteUri + ")"); 316Debug.Assert(baseUri != null, "baseUri != null"); 317Debug.Assert(baseUri.IsAbsoluteUri, "baseUri.IsAbsoluteUri(" + baseUri + ")"); 360Debug.Assert(segmentIndex == segments.Length, "segmentIndex == segments.Length -- otherwise we mis-counted populated/skipped segments."); 378Debug.Assert(absoluteRequestUri != null, "absoluteRequestUri != null"); 379Debug.Assert(absoluteRequestUri.IsAbsoluteUri, "absoluteRequestUri.IsAbsoluteUri(" + absoluteRequestUri + ")"); 380Debug.Assert(service != null, "service != null"); 393Debug.Assert(description.LastSegmentInfo.SingleResult, "description.LastSegmentInfo.SingleResult"); 398Debug.Assert(description.LastSegmentInfo.Key != null && !description.LastSegmentInfo.Key.IsEmpty, "Key Must be specified"); 410Debug.Assert(query != null, "query != null"); 411Debug.Assert(projectedType != null, "projectedType != null"); 412Debug.Assert(selector != null, "selector != null"); 425Debug.Assert(query != null, "query != null"); 426Debug.Assert(predicate != null, "predicate != null"); 436Debug.Assert(filter != null, "filter != null"); 437Debug.Assert(segment != null, "segment!= null"); 438Debug.Assert(segment.SingleResult == false, "segment.SingleResult == false"); 465Debug.Assert(service != null, "service != null"); 466Debug.Assert(identifier != null, "identifier != null"); 557Debug.Assert(segment.Operation.ResultKind == ServiceOperationResultKind.Void, "segment.Operation.ResultKind == ServiceOperationResultKind.Nothing"); 643Debug.Assert(service != null, "service != null"); 663Debug.Assert(segments != null, "segments != null"); 664Debug.Assert(service != null, "service != null"); 730Debug.Assert( 762Debug.Assert(previous.TargetKind == RequestTargetKind.OpenProperty, "For open properties, the target resource type must be null"); 767Debug.Assert(previous.TargetKind != RequestTargetKind.OpenProperty, "Since the query element type is known, this can't be open property"); 768Debug.Assert(previous.TargetResourceType != null, "Previous wasn't open, so it should have a resource type"); 893Debug.Assert(segment.ProjectedProperty.IsOfKind(ResourcePropertyKind.Primitive), "must be primitive type property"); 972Debug.Assert(segment != null, "segment != null"); 992Debug.Assert(source != null, "source != null"); 993Debug.Assert(selector != null, "selector != null"); 1008Debug.Assert(source != null, "source != null"); 1009Debug.Assert(selector != null, "selector != null"); 1023Debug.Assert(query != null, "query != null"); 1024Debug.Assert(predicate != null, "predicate != null"); 1046Debug.Assert(input.Parameters.Count == 1, "Assuming a single parameter for input lambda expression in this function."); 1064Debug.Assert(host != null, "host != null"); 1101Debug.Assert(filter != null, "filter != null"); 1113Debug.Assert(query != null, "query != null"); 1114Debug.Assert(property.Kind != ResourcePropertyKind.ResourceSetReference, "property != ResourcePropertyKind.ResourceSetReference"); 1132Debug.Assert(query != null, "query != null"); 1133Debug.Assert(property.Kind == ResourcePropertyKind.ResourceSetReference, "property == ResourcePropertyKind.ResourceSetReference"); 1136Debug.Assert(enumerableElement != null, "Providers should never expose a property as a resource-set if it doesn't implement IEnumerable`1."); 1157Debug.Assert(query != null, "query != null"); 1158Debug.Assert(propertyName != null, "propertyName != null"); 1176Debug.Assert(query != null, "query != null"); 1177Debug.Assert(property != null && !property.CanReflectOnInstanceTypeProperty, "property != null && !property.CanReflectOnInstanceTypeProperty"); 1196Debug.Assert(query != null, "query != null"); 1197Debug.Assert(property != null && property.Kind == ResourcePropertyKind.ResourceSetReference && !property.CanReflectOnInstanceTypeProperty, "property != null && property.Kind == ResourcePropertyKind.ResourceSetReference && !property.CanReflectOnInstanceTypeProperty"); 1217Debug.Assert(query != null, "query != null"); 1218Debug.Assert(key != null && key.ValueCount != 0, "key != null && key.ValueCount != 0"); 1219Debug.Assert(resourceType.KeyProperties.Count == key.ValueCount, "resourceType.KeyProperties.Count == key.ValueCount"); 1224Debug.Assert(keyProperty.IsOfKind(ResourcePropertyKind.Key), "keyProperty.IsOfKind(ResourcePropertyKind.Key)"); 1261Debug.Assert(type != null, "type != null"); 1270Debug.Assert(type.ResourceTypeKind == ResourceTypeKind.Primitive, "typeKind == ResourceTypeKind.Primitive");
System\Data\Services\ResponseBodyWriter.cs (12)
64Debug.Assert(responseFormat != ContentFormat.Unknown, "responseFormat != ContentFormat.Unknown"); 101Debug.Assert(stream != null, "stream != null"); 109Debug.Assert( 119Debug.Assert(this.mediaResourceStream != null, "this.mediaResourceStream != null"); 131Debug.Assert( 144Debug.Assert(this.requestDescription.TargetKind != RequestTargetKind.PrimitiveValue, "this.requestDescription.TargetKind != RequestTargetKind.PrimitiveValue"); 145Debug.Assert(this.requestDescription.TargetKind != RequestTargetKind.OpenPropertyValue, "this.requestDescription.TargetKind != RequestTargetKind.OpenPropertyValue"); 146Debug.Assert(this.requestDescription.TargetKind != RequestTargetKind.Metadata, "this.requestDescription.TargetKind != RequestTargetKind.Metadata"); 177Debug.Assert( 192Debug.Assert(exceptionWriter != null, "this.exceptionWriter != null"); 199Debug.Assert( 202Debug.Assert(this.requestDescription.TargetKind == RequestTargetKind.Metadata, "this.requestDescription.TargetKind == RequestTargetKind.Metadata");
System\Data\Services\SegmentInfo.cs (1)
75Debug.Assert(other != null, "other != null");
System\Data\Services\Serializers\Atom10FormatterFactory.cs (5)
44Debug.Assert(feedToWrite != null, "feedToWrite != null"); 63Debug.Assert(itemToWrite != null, "itemToWrite != null"); 83Debug.Assert(stream != null, "stream != null"); 96Debug.Assert(stream != null, "stream != null"); 97Debug.Assert(encoding != null, "encoding != null");
System\Data\Services\Serializers\AtomServiceDocumentSerializer.cs (1)
96Debug.Assert(
System\Data\Services\Serializers\BatchWriter.cs (3)
53Debug.Assert(writer != null, "writer != null"); 54Debug.Assert(host != null, "host != null"); 55Debug.Assert(boundary != null, "boundary != null");
System\Data\Services\Serializers\BinarySerializer.cs (4)
31Debug.Assert(output != null, "output != null"); 39Debug.Assert(args != null, "args != null"); 50Debug.Assert(content != null, "content != null"); 71Debug.Assert(inputStream != null, "stream != null");
System\Data\Services\Serializers\DataStringEscapeBuilder.cs (3)
71Debug.Assert(this.index == 0, "Expected this.index to be 0, because Build can only be called once for an instance of DataStringEscapeBuilder."); 72Debug.Assert(this.output.Length == 0, "Expected this.output.Length to be 0, because Build can only be called once for an instance of DataStringEscapeBuilder."); 129Debug.Assert(false, "unterminated quote in uri.");
System\Data\Services\Serializers\Deserializer.cs (60)
56Debug.Assert(dataService != null, "dataService != null"); 67Debug.Assert(parent != null, "parent != null"); 147Debug.Assert(requestStream != null, "requestStream != null"); 148Debug.Assert(tracker != null, "Change tracker must always be created."); 151Debug.Assert( 188Debug.Assert(deserializer != null, "deserializer != null"); 203Debug.Assert(property.TypeKind == ResourceTypeKind.Primitive, "This method must be called for primitive types only"); 215Debug.Assert( 233Debug.Assert(stream != null, "stream != null"); 234Debug.Assert(dataService != null, "dataService != null"); 246Debug.Assert(tracker != null, "Change tracker must always be created."); 281Debug.Assert(requestFormat == ContentFormat.Text, "requestFormat == ContentFormat.Text"); 282Debug.Assert(encoding != null, "encoding != null"); 394Debug.Assert(description.SegmentInfos.Length >= 2, "description.SegmentInfos.Length >= 2"); 435Debug.Assert(entityResourceIndex != -1, "This method should never be called for request that doesn't have a parent resource"); 452Debug.Assert( 477Debug.Assert( 509Debug.Assert(!description.LastSegmentInfo.HasKeyValues, "CreateSegments must have caught the problem already."); 518Debug.Assert( 542Debug.Assert( 571Debug.Assert(!string.IsNullOrEmpty(fullTypeName), "!string.IsNullOrEmpty(fullTypeName)"); 572Debug.Assert(requestStream != null, "requestStream != null"); 573Debug.Assert(service != null, "service != null"); 574Debug.Assert(description != null, "description != null"); 575Debug.Assert(tracker != null, "tracker != null"); 592Debug.Assert(resourceToBeModified != null, "resourceToBeModified != null"); 593Debug.Assert(requestStream.CanRead, "requestStream.CanRead"); 594Debug.Assert(service != null, "service != null"); 624Debug.Assert(segmentInfo.RequestEnumerable != null, "The segment should always have the result"); 626Debug.Assert(results != null && results.Length == 1, "results != null && results.Length == 1"); 627Debug.Assert(results[0] != null, "results[0] != null"); 657Debug.Assert(description != null, "description != null"); 658Debug.Assert(linkResource != null, "linkResource != null"); 659Debug.Assert(service != null, "service != null"); 660Debug.Assert(tracker != null, "tracker != null"); 666Debug.Assert(resourceToBeModified == entityGettingModified, "Since this is a link operation, modifying resource must be the entity resource"); 672Debug.Assert(description.Property != null, "description.Property != null"); 692Debug.Assert(requestDescription != null, "requestDescription != null"); 697Debug.Assert(requestDescription.LastSegmentInfo != null, "requestDescription.LastSegmentInfo != null"); 698Debug.Assert(requestDescription.LastSegmentInfo.TargetContainer != null, "requestDescription.LastSegmentInfo.TargetContainer != null"); 699Debug.Assert(requestDescription.TargetResourceType != null, "requestDescription.TargetResourceType != null"); 708Debug.Assert(!segmentInfo.SingleResult, "POST operation is allowed only on collections"); 730Debug.Assert(!this.Update, "This method must be called for POST operations only"); 731Debug.Assert(requestDescription != null, "requestDescription != null"); 738Debug.Assert(resourceInPayload != null, "link resource cannot be null"); 751Debug.Assert(requestDescription.Property.Kind == ResourcePropertyKind.ResourceSetReference, "Expecting POST resource set property"); 756Debug.Assert(requestDescription.TargetSource == RequestTargetSource.EntitySet, "Expecting POST on entity set"); 770Debug.Assert(0 <= value, "MaxObjectCount cannot be initialized to a negative number"); 771Debug.Assert(value <= this.Service.Configuration.MaxObjectCountOnInsert, "On initialize, the value should be less than max object count"); 785Debug.Assert( 945Debug.Assert(resourceType == null && !verifyETag || resourceType != null, "For etag verification, resource type must be specified"); 975Debug.Assert(checkForNull, "For resetting resource, the value cannot be null"); 988Debug.Assert(this.Update && this.objectCount == 0 || !this.Update, "For updates, the object count is never tracked"); 989Debug.Assert(this.objectCount <= this.Service.Configuration.MaxObjectCountOnInsert, "The object count should never exceed the limit"); 1010Debug.Assert(this.Service != null, "this.Service != null"); 1011Debug.Assert(resourceType != null, "Must have valid resource type"); 1012Debug.Assert(resourceType.ResourceTypeKind == ResourceTypeKind.EntityType, "resourceType.ResourceTypeKind == ResourceTypeKind.EntityType"); 1013Debug.Assert(this.RequestDescription != null, "this.RequestDescription != null"); 1083Debug.Assert(requestDescription.IsSingleResult, "requestDescription.IsSingleResult"); 1096Debug.Assert(!requestDescription.LastSegmentInfo.HasKeyValues, "CreateSegments must have caught this issue.");
System\Data\Services\Serializers\DictionaryContent.cs (11)
69Debug.Assert(other != null, "other != null"); 108Debug.Assert(value != null, "value != null -- otherwise AddNull should have been called."); 109Debug.Assert( 112Debug.Assert(!this.valueNames.Contains(name), "!this.valueNames.Contains(name) -- otherwise repeated property set."); 116Debug.Assert(this.valueNames.Count == this.valueTypes.Count, "this.valueNames.Count == this.valueTypes.Count"); 117Debug.Assert(this.valueNames.Count == this.valueContents.Count, "this.valueNames.Count == this.valueContents.Count"); 125Debug.Assert(!this.valueNames.Contains(name), "!this.valueNames.Contains(name) -- otherwise repeated property set."); 129Debug.Assert(this.valueNames.Count == this.valueTypes.Count, "this.valueNames.Count == this.valueTypes.Count"); 130Debug.Assert(this.valueNames.Count == this.valueContents.Count, "this.valueNames.Count == this.valueContents.Count"); 139Debug.Assert(!this.IsEmpty, "!this.IsEmpty -- calling with 0 properties is disallowed."); 169Debug.Assert(value is DictionaryContent, "Must only look for complex properties, primitives must not be found");
System\Data\Services\Serializers\IndentedTextWriter.cs (1)
77Debug.Assert(value >= 0, "value >= 0");
System\Data\Services\Serializers\JsonDeserializer.cs (17)
44Debug.Assert(requestStream != null, "requestStream != null"); 264Debug.Assert(jsonObject != null, "jsonObject != null"); 265Debug.Assert(segment != null, "segment != null"); 378Debug.Assert(targetResourceType != null, "Should be able to resolve type for well known segments"); 379Debug.Assert( 394Debug.Assert((resourceType != null && resourceType.ResourceTypeKind != ResourceTypeKind.Primitive) || uri != null, "Either uri or resource type must be specified"); 463Debug.Assert(resourceType != null, "resourceType != null"); 466Debug.Assert(resource == null, "resource == null"); 472Debug.Assert(resource == null, "resource == null"); 491Debug.Assert(segmentInfo.TargetKind == RequestTargetKind.OpenProperty, "segmentInfo.TargetKind == RequestTargetKind.OpenProperty"); 577Debug.Assert(ResourceTypeKind.EntityType == resourceProperty.TypeKind, "only expecting nav properties"); 596Debug.Assert(navProperties.Count == navPropertyValues.Count, "nav properties and nav property values count must be the same"); 655Debug.Assert(openPropertyResourceType.ResourceTypeKind == ResourceTypeKind.EntityType, "resource must be of entity type"); 774Debug.Assert(parentResourceSet != null, "parentResourceSet != null"); 775Debug.Assert(parentResourceType != null, "parentResourceType != null"); 776Debug.Assert(resourceProperty != null && resourceProperty.TypeKind == ResourceTypeKind.EntityType, "its must be a nav property"); 814Debug.Assert(resourceInstance != null, "resourceInstance != null");
System\Data\Services\Serializers\JsonReader.cs (5)
51Debug.Assert(reader != null, "reader != null"); 146Debug.Assert(result <= char.MaxValue, "result <= char.MaxValue"); 162Debug.Assert(result >= 0, "Peek must not return value < 0 since we are not at EndOfStream yet."); 163Debug.Assert(result <= char.MaxValue, "result <= char.MaxValue"); 456Debug.Assert(unicodeSequence != null, "unicodeSequence != null");
System\Data\Services\Serializers\JsonSerializer.cs (29)
56Debug.Assert(output != null, "output != null"); 57Debug.Assert(encoding != null, "encoding != null"); 91Debug.Assert(this.RequestDescription.IsSingleResult, "this.RequestDescription.SingleResult"); 107Debug.Assert(elements != null, "elements != null"); 108Debug.Assert(!this.RequestDescription.IsSingleResult, "!this.RequestDescription.SingleResult"); 194Debug.Assert(element != null, "element != null"); 272Debug.Assert(resourceType != null, "resourceType != null"); 314Debug.Assert(value != null, "value != null"); 377Debug.Assert(typeof(System.Data.Linq.Binary) == value.GetType(), "typeof(Binary) == value.GetType() (" + value.GetType() + ")"); 389Debug.Assert(resource != null, "resource != null"); 390Debug.Assert(resourceType != null, "resourceType != null"); 391Debug.Assert(uriPath != null || resourceType.ResourceTypeKind == ResourceTypeKind.ComplexType, "uri can be null for complex types"); 455Debug.Assert(elementName == null || elementName.Length > 0, "elementName == null || elementName.Length > 0"); 456Debug.Assert(elementUri != null, "elementUri != null"); 588Debug.Assert(resourceType.ResourceTypeKind == ResourceTypeKind.Primitive, "resourceType.ResourceTypeKind == ResourceTypeKind.Primitive"); 621Debug.Assert(resource != null, "resource != null"); 622Debug.Assert(resourceType != null, "resourceType != null"); 623Debug.Assert(resourceType.ResourceTypeKind == ResourceTypeKind.EntityType, "resource must be entity type"); 624Debug.Assert(uri != null, "uri != null"); 635Debug.Assert(complexObject != null, "complexObject != null"); 636Debug.Assert(resourceType != null, "resourceType != null"); 637Debug.Assert(resourceType.ResourceTypeKind == ResourceTypeKind.ComplexType, "resource must be complex type"); 649Debug.Assert(uri != null, "uri != null"); 760Debug.Assert(customObject != null, "customObject != null"); 761Debug.Assert(resourceType != null, "customObjectType != null"); 762Debug.Assert( 766Debug.Assert(parentUri != null, "parentUri != null"); 767Debug.Assert(resourceType.ResourceTypeKind != ResourceTypeKind.Primitive, "resourceType.ResourceTypeKind == ResourceTypeKind.Primitive"); 785Debug.Assert(
System\Data\Services\Serializers\JsonServiceDocumentSerializer.cs (2)
47Debug.Assert(output != null, "output != null"); 48Debug.Assert(provider != null, "provider != null");
System\Data\Services\Serializers\JsonWriter.cs (1)
278System.Diagnostics.Debug.Assert(dateTime.Kind == DateTimeKind.Utc, "dateTime.Kind == DateTimeKind.Utc");
System\Data\Services\Serializers\MetadataSerializer.cs (43)
61Debug.Assert(types != null, "types != null"); 66Debug.Assert(type.EpmInfoInitialized, "type.EpmInfoInitialized -- otherwise the call is too soon to determine version."); 86Debug.Assert(dataServiceVersion == XmlConstants.DataServiceVersion1Dot0, "Version is either 1.0 or 2.0 for DataService"); 100Debug.Assert(writer != null, "writer != null"); 101Debug.Assert(dataServiceVersion != null, "dataServiceVersion != null"); 133Debug.Assert(writer != null, "writer != null"); 134Debug.Assert(name != null, "name != null"); 135Debug.Assert(value != null, "value != null"); 148Debug.Assert(writer != null, "writer != null"); 166Debug.Assert( 175Debug.Assert( 228Debug.Assert(this.Writer != null, "this.Writer != null"); 229Debug.Assert(this.Provider != null, "this.Provider != null"); 239Debug.Assert(!string.IsNullOrEmpty(namespaceAlongWithTypes.Key), "!string.IsNullOrEmpty(namespaceAlongWithTypes.Key)"); 299Debug.Assert(ResourceTypeKind.ComplexType == type.ResourceTypeKind, "this must be a complex type"); 318Debug.Assert(xmlWriter != null, "XmlWriter cannot be null"); 319Debug.Assert(entityType.ResourceTypeKind == ResourceTypeKind.EntityType, "Type must be entityType"); 445Debug.Assert(xmlWriter != null, "XmlWriter cannot be null"); 446Debug.Assert(complexType.ResourceTypeKind == ResourceTypeKind.ComplexType, "Type must be complexType"); 447Debug.Assert(complexType.IsOpenType == false, "Complex types cannot be open."); 477Debug.Assert(xmlWriter != null, "xmlWriter != null"); 478Debug.Assert(type != null, "type != null"); 526Debug.Assert( 559Debug.Assert(resourceProperty.IsOfKind(ResourcePropertyKind.Primitive), "property must be of primitive type"); 606Debug.Assert(xmlWriter != null, "xmlWriter != null"); 607Debug.Assert(associationSets != null, "associationSets != null"); 613Debug.Assert(associationSet.ResourceAssociationType != null, "associationSet.ResourceAssociationType != null"); 657Debug.Assert(schemaVersion == MetadataEdmSchemaVersion.Version2Dot0, "Schema version must be 2.0."); 734Debug.Assert(provider != null, "provider != null"); 838Debug.Assert(associationSet != null, "associationSet != null"); 863Debug.Assert(resourceType != null, "resourceType != null"); 975Debug.Assert(resourceType != null, "resourceType != null"); 1052Debug.Assert(end1Name != end2Name, "end1Name != end2Name"); 1082Debug.Assert(resourceSet != null, "resourceSet != null"); 1083Debug.Assert(resourceType != null, "resourceType != null"); 1084Debug.Assert(navigationProperty != null, "navigationProperty != null"); 1085Debug.Assert(resourceType.TryResolvePropertiesDeclaredOnThisTypeByName(navigationProperty.Name) != null, "navigationProperty must be declared on resourceType."); 1143Debug.Assert(resourceSet != null, "resourceSet != null"); 1144Debug.Assert(resourceType != null, "resourceType != null"); 1153Debug.Assert(associationSet.ResourceAssociationType != null, "associationSet.ResourceAssociationType != null"); 1162Debug.Assert(resourceSet != null, "resourceSet != null"); 1184Debug.Assert(serviceOperation != null, "serviceOperation != null"); 1193Debug.Assert(
System\Data\Services\Serializers\PlainXmlDeserializer.cs (27)
47Debug.Assert(stream != null, "stream != null"); 59Debug.Assert(reader != null, "reader != null"); 61Debug.Assert(propertiesApplied != null, "Requires valid collection for applied properties"); 90Debug.Assert(deserializer != null, "deserializer != null"); 91Debug.Assert(reader != null, "reader != null"); 115Debug.Assert(WebUtil.IsPrimitiveType(typeToBeConverted), "WebUtil.IsPrimitiveType(typeToBeConverted)"); 116Debug.Assert(value == null || value is string, "This method should be used only for converting string to a primitve value."); 141Debug.Assert( 164Debug.Assert(segmentInfo.ProjectedProperty != null, "segmentInfo.ProjectedProperty != null"); 165Debug.Assert( 242Debug.Assert( 261Debug.Assert(reader != null, "reader != null"); 262Debug.Assert(reader.NodeType == XmlNodeType.Element, "reader.NodeType == XmlNodeType.Element"); 295Debug.Assert(reader != null, "reader != null"); 296Debug.Assert(XmlNodeType.Element == reader.NodeType, "not positioned on Element"); 381Debug.Assert(resourceType != null, "resourceType != null"); 382Debug.Assert(resource != null, "resource != null"); 414Debug.Assert( 427Debug.Assert(reader != null, "reader != null"); 428Debug.Assert(propertyName != null, "propertyName != null"); 429Debug.Assert(resourceType != null, "resourceType != null"); 430Debug.Assert(resource != null, "resource != null"); 468Debug.Assert(reader != null, "reader != null"); 503Debug.Assert(reader != null, "reader != null"); 504Debug.Assert(propertyName != null, "propertyName != null"); 568Debug.Assert( 579Debug.Assert(
System\Data\Services\Serializers\PlainXmlSerializer.cs (30)
47Debug.Assert(output != null, "output != null"); 48Debug.Assert(encoding != null, "encoding != null"); 65Debug.Assert(value != null, "value != null"); 81Debug.Assert(writer != null, "writer != null"); 82Debug.Assert(propertyName != null, "propertyName != null"); 83Debug.Assert(expectedTypeName != null, "expectedTypeName != null"); 95Debug.Assert(writer != null, "writer != null"); 96Debug.Assert(propertyName != null, "propertyName != null"); 97Debug.Assert(propertyTypeName != null, "expectedType != null"); 98Debug.Assert( 115Debug.Assert(writer != null, "writer != null"); 116Debug.Assert(propertyName != null, "propertyName != null"); 134Debug.Assert( 137Debug.Assert( 173Debug.Assert( 213Debug.Assert(element != null, "element != null"); 284Debug.Assert(element != null, "element != null"); 285Debug.Assert(resourceType != null, "resourceType != null"); 299Debug.Assert(property.TypeKind == ResourceTypeKind.Primitive, "property.TypeKind == ResourceTypeKind.Primitive"); 332Debug.Assert(propertyResourceType.InstanceType == value.GetType(), "propertyResourceType.Type == valueType"); 337Debug.Assert(propertyResourceType.ResourceTypeKind == ResourceTypeKind.EntityType, "EntityType expected."); 353Debug.Assert(propertyName != null, "propertyName != null"); 354Debug.Assert(type != null, "type != null"); 372Debug.Assert(!String.IsNullOrEmpty(propertyName), "!String.IsNullOrEmpty(propertyName)"); 373Debug.Assert(expectedType != null, "expectedType != null"); 374Debug.Assert(expectedType.ResourceTypeKind == ResourceTypeKind.ComplexType, "Must be complex type"); 387Debug.Assert(!expectedType.InstanceType.IsValueType, "!expectedType.Type.IsValueType -- checked in the resource type constructor."); 410Debug.Assert(propertyName != null, "propertyName != null"); 411Debug.Assert(resourceType != null, "resourceType != null"); 419Debug.Assert(
System\Data\Services\Serializers\Serializer.cs (40)
87Debug.Assert(requestDescription != null, "requestDescription != null"); 88Debug.Assert(absoluteServiceUri != null, "absoluteServiceUri != null"); 89Debug.Assert(service != null, "service != null"); 183Debug.Assert(container != null, "container != null"); 213Debug.Assert(this.requestDescription.RequestEnumerable != null, "this.requestDescription.RequestEnumerable != null"); 214Debug.Assert(queryResults != null, "queryResults != null"); 237Debug.Assert(hasMoved == true, "hasMoved == true"); 260Debug.Assert(property != null, "property != null"); 271Debug.Assert( 283Debug.Assert(expanded != null, "expanded != null"); 371Debug.Assert(this.RequestDescription.SkipTokenProperties != null, "Must have skip token properties collection"); 372Debug.Assert(this.RequestDescription.SkipTokenProperties.Count > 0, "Must have some valid ordered properties in the skip token properties collection"); 378Debug.Assert(this.currentSkipTokenForCustomPaging != null, "Must have obtained the skip token for custom paging."); 393Debug.Assert(this.currentSkipTokenForCustomPaging != null, "Must have obtained the skip token for custom paging."); 415Debug.Assert( 435Debug.Assert(topQueryParameter.Value >= this.segmentResultCounts[this.segmentResultCounts.Count - 1], "$top must be the upper limits of the number of results returned."); 458Debug.Assert(propertyName != null, "propertyName != null"); 459Debug.Assert(propertyResourceType != null, "propertyResourceType != null"); 475Debug.Assert(this.segmentResultCounts.Count > 0, "this.segmentResultCounts.Count > 0 -- otherwise we didn't PushSegmentForRoot"); 485Debug.Assert(max == Int32.MaxValue, "Either page size or max result count can be set, but not both"); 514Debug.Assert(property != null, "property != null"); 543Debug.Assert(this.segmentNames.Count > 0, "this.segmentNames.Count > 0"); 547Debug.Assert( 550Debug.Assert( 612Debug.Assert(this.complexTypeCollection != null, "this.complexTypeCollection != null"); 613Debug.Assert(this.complexTypeCollection.Contains(complexTypeInstance), "this.complexTypeCollection.Contains(complexTypeInstance)"); 623Debug.Assert(name != null, "name != null"); 719Debug.Assert(this.CurrentContainer != null, "this.CurrentContainer != null"); 731Debug.Assert(resource != null, "resource != null"); 732Debug.Assert(provider != null, "provider != null"); 733Debug.Assert(!String.IsNullOrEmpty(containerName), "container name must be specified"); 739Debug.Assert(resourceType != null, "resourceType != null"); 741Debug.Assert(keyProperties.Count != 0, "every resource type must have a key"); 745Debug.Assert(property.IsOfKind(ResourcePropertyKind.Key), "must be key property"); 775Debug.Assert(keyValueText != null, "keyValueText != null - otherwise TryKeyPrimitiveToString returned true and null value"); 826Debug.Assert( 1073Debug.Assert( 1076Debug.Assert( 1082Debug.Assert( 1085Debug.Assert(
System\Data\Services\Serializers\SyndicationDeserializer.cs (29)
49Debug.Assert(stream != null, "stream != null"); 50Debug.Assert(factory != null, "factory != null"); 127Debug.Assert(item != null, "item != null"); 138Debug.Assert(formatter != null, "formatter != null"); 139Debug.Assert(reader != null, "reader != null"); 150Debug.Assert(formatter.Feed != null, "formatter.Feed != null"); 160Debug.Assert(formatter != null, "formatter != null"); 161Debug.Assert(reader != null, "reader != null"); 172Debug.Assert(formatter.Item != null, "formatter.Item != null"); 257Debug.Assert( 292Debug.Assert(item != null, "item != null"); 293Debug.Assert(resourceType != null, "resourceType != null"); 294Debug.Assert(propertiesApplied != null, "propertiesApplied != null"); 295Debug.Assert(resource != null, "resource != null"); 346Debug.Assert(item != null, "item != null"); 347Debug.Assert(topLevel || !this.Update, "deep updates not supported"); 374Debug.Assert(segmentInfo.TargetKind == RequestTargetKind.Resource, "segmentInfo.TargetKind == RequestTargetKind.Resource"); 381Debug.Assert(currentResourceType.ResourceTypeKind == ResourceTypeKind.EntityType, "only expecting entity types"); 441Debug.Assert(segmentInfo.TargetContainer != null, "segmentInfo.TargetContainer != null"); 457Debug.Assert(link != null, "link != null"); 458Debug.Assert(resourceType != null, "resourceType != null"); 459Debug.Assert(resource != null, "resource != null"); 536Debug.Assert(item != null, "item != null"); 583Debug.Assert(parentResource != null, "parent resource cannot be null"); 584Debug.Assert(property != null, "property != null"); 585Debug.Assert(link != null, "link != null"); 644Debug.Assert(propertySegment.TargetKind != RequestTargetKind.OpenProperty, "Open navigation properties are not supported on OpenTypes."); 660Debug.Assert(propertySegment.TargetKind != RequestTargetKind.OpenProperty, "Open navigation properties are not supported on OpenTypes."); 675Debug.Assert(
System\Data\Services\Serializers\SyndicationSerializer.cs (51)
92Debug.Assert(service != null, "service != null"); 93Debug.Assert(output != null, "output != null"); 94Debug.Assert(encoding != null, "encoding != null"); 95Debug.Assert(factory != null, "factory != null"); 115Debug.Assert(!String.IsNullOrEmpty(propertyName), "!String.IsNullOrEmpty(propertyName)"); 116Debug.Assert(expectedTypeName != null, "expectedTypeName != null"); 124Debug.Assert(primitiveString != null, "primitiveString != null"); 137Debug.Assert(linkRelation != null, "linkRelation != null"); 138Debug.Assert(item != null, "item != null"); 139Debug.Assert(linkType != null, "linkType != null"); 160Debug.Assert(this.RequestDescription.IsSingleResult, "this.RequestDescription.SingleResult"); 161Debug.Assert(element != null, "element != null"); 182Debug.Assert( 197Debug.Assert(this.RequestDescription.Property != null, "this.RequestDescription.Property - otherwise Property source set with no Property specified."); 202Debug.Assert( 228Debug.Assert(elements != null, "elements != null"); 229Debug.Assert(!this.RequestDescription.IsSingleResult, "!this.RequestDescription.SingleResult"); 320Debug.Assert(item != null, "item != null"); 334Debug.Assert(item != null, "item != null"); 335Debug.Assert(relativeUri != null, "relativeUri != null"); 364Debug.Assert(epmProperty.SubProperties.Count == 0, "Complex type added as leaf node in EPM tree."); 365Debug.Assert(epmProperty.EpmInfo != null, "Found a non-leaf property for which EpmInfo is not set."); 366Debug.Assert(epmProperty.EpmInfo.Attribute != null, "Attribute should always be initialized for EpmInfo."); 404Debug.Assert(!String.IsNullOrEmpty(propertyName), "!String.IsNullOrEmpty(propertyName)"); 405Debug.Assert(expectedType != null, "expectedType != null"); 406Debug.Assert(!String.IsNullOrEmpty(relativeUri), "!String.IsNullOrEmpty(relativeUri)"); 407Debug.Assert(expectedType.ResourceTypeKind == ResourceTypeKind.ComplexType, "Must be complex type"); 408Debug.Assert(content != null, "content != null"); 414Debug.Assert(!expectedType.IsMediaLinkEntry, "!expectedType.IsMediaLinkEntry"); 416Debug.Assert(!expectedType.InstanceType.IsValueType, "!expectedType.Type.IsValueType -- checked in the resource type constructor."); 451Debug.Assert(element != null || (absoluteUri != null && !String.IsNullOrEmpty(relativeUri)), "Uri's must be specified for null values"); 452Debug.Assert(target != null, "target != null"); 492Debug.Assert(absoluteUri.AbsoluteUri.StartsWith(this.AbsoluteServiceUri.AbsoluteUri, StringComparison.Ordinal), "absoluteUri.AbsoluteUri.StartsWith(this.AbsoluteServiceUri.AbsoluteUri, StringComparison.Ordinal))"); 533Debug.Assert(readStreamUri != null, "readStreamUri != null"); 534Debug.Assert(!string.IsNullOrEmpty(mediaContentType), "!string.IsNullOrEmpty(mediaContentType)"); 577Debug.Assert(feed != null, "feed != null"); 700Debug.Assert(item != null, "item != null"); 701Debug.Assert(absoluteUri != null, "absoluteUri != null"); 702Debug.Assert(relativeUri != null, "relativeUri != null"); 747Debug.Assert(customObject != null, "customObject != null"); 748Debug.Assert(resourceType != null, "resourceType != null"); 750Debug.Assert(!String.IsNullOrEmpty(relativeUri), "!String.IsNullOrEmpty(relativeUri)"); 766Debug.Assert(this.CurrentContainer != null, "this.CurrentContainer != null"); 843Debug.Assert(navProperties != null, "navProperties list must be assigned for entity types"); 914Debug.Assert(propertyResourceType.InstanceType == valueType, "propertyResourceType.Type == valueType"); 925Debug.Assert( 946Debug.Assert(navProperties != null, "navProperties list must be assigned for entity types"); 1027Debug.Assert( 1044Debug.Assert( 1090Debug.Assert(collection, "metadata loading must have ensured that navigation set properties must implement IEnumerable"); 1157Debug.Assert(resourceProperty != null, "resourceProperty != null");
System\Data\Services\Serializers\TextSerializer.cs (4)
36Debug.Assert(output != null, "output != null"); 37Debug.Assert(encoding != null, "encoding != null"); 56Debug.Assert(content != null, "content != null"); 64Debug.Assert(contentAsText != null, "contentAsText != null");
System\Data\Services\Serializers\XmlDocumentSerializer.cs (6)
49Debug.Assert(output != null, "output != null"); 50Debug.Assert(provider != null, "provider != null"); 51Debug.Assert(baseUri != null, "baseUri != null"); 52Debug.Assert(encoding != null, "encoding != null"); 53Debug.Assert(baseUri.IsAbsoluteUri, "baseUri.IsAbsoluteUri(" + baseUri + ")"); 54Debug.Assert(baseUri.AbsoluteUri[baseUri.AbsoluteUri.Length - 1] == '/', "baseUri(" + baseUri.AbsoluteUri + ") ends with '/'");
System\Data\Services\SingleResultAttribute.cs (1)
39Debug.Assert(method != null, "method != null");
System\Data\Services\UpdatableWrapper.cs (24)
105Debug.Assert(query != null, "query != null"); 124Debug.Assert(resource != null, "resource != null"); 142Debug.Assert(resourceCookie != null, "resourceCookie != null"); 143Debug.Assert(container != null, "container != null"); 145Debug.Assert(String.IsNullOrEmpty(host.RequestIfNoneMatch), "IfNoneMatch header cannot be specified for Update/Delete operations"); 149Debug.Assert(actualEntity != null, "actualEntity != null"); 152Debug.Assert(resourceType != null, "resourceType != null"); 194Debug.Assert(!String.IsNullOrEmpty(etagValue), "etag value can never be null"); 211Debug.Assert(targetResource != null, "targetResource != null"); 212Debug.Assert(!String.IsNullOrEmpty(propertyName), "!String.IsNullOrEmpty(propertyName)"); 224Debug.Assert(targetResource != null, "targetResource != null"); 225Debug.Assert(!String.IsNullOrEmpty(propertyName), "!String.IsNullOrEmpty(propertyName)"); 237Debug.Assert(targetResource != null, "targetResource != null"); 238Debug.Assert(!String.IsNullOrEmpty(propertyName), "!String.IsNullOrEmpty(propertyName)"); 250Debug.Assert(targetResource != null, "targetResource != null"); 251Debug.Assert(!String.IsNullOrEmpty(propertyName), "!String.IsNullOrEmpty(propertyName)"); 263Debug.Assert(targetResource != null, "targetResource != null"); 264Debug.Assert(!String.IsNullOrEmpty(propertyName), "!String.IsNullOrEmpty(propertyName)"); 274Debug.Assert(targetResource != null, "targetResource != null"); 293Debug.Assert(resource != null, "resource != null"); 331Debug.Assert(etagProperties != null && etagProperties.Count != 0, "There must be atleast one etag property specified"); 332Debug.Assert(!String.IsNullOrEmpty(ifMatchHeaderValue), "IfMatch header cannot be null"); 340Debug.Assert(ifMatchHeaderValue.StartsWith(XmlConstants.HttpWeakETagPrefix, StringComparison.Ordinal), "If-Match header must be properly formatted - this check is done in DataService.CheckETagValues method"); 341Debug.Assert(ifMatchHeaderValue.Length >= XmlConstants.HttpWeakETagPrefix.Length + 1, "If-Match header must be properly formatted - this check is done in DataService.CheckETagValues method");
System\Data\Services\UpdateTracker.cs (5)
51Debug.Assert(service != null, "service != null"); 94Debug.Assert(methods != null, "methods != null - should not have been tracking changes to the container otherwise."); 134Debug.Assert(this.items != null, "this.items != null - otherwise FireNotification has already been called"); 181Debug.Assert(target != null, "target != null"); 182Debug.Assert(container != null, "container != null");
System\Data\Services\WebUtil.cs (48)
145Debug.Assert(baseUri != null, "baseUri"); 294Debug.Assert(Enum.IsDefined(typeof(T), value), "enum value is not valid"); 313Debug.Assert(absoluteUri != null, "absoluteUri != null"); 314Debug.Assert(absoluteUri.IsAbsoluteUri, "absoluteUri.IsAbsoluteUri"); 369Debug.Assert(type != null, "type != null"); 385Debug.Assert(e != null, "Unexpected null exception!"); 399Debug.Assert(recursionDepth <= recursionLimit, "recursionDepth <= recursionLimit"); 412Debug.Assert(recursionDepth <= recursionLimit, "recursionDepth <= recursionLimit"); 424Debug.Assert(0 <= recursionDepth, "0 <= recursionDepth"); 536Debug.Assert(null != input, "null input stream"); 537Debug.Assert(input.CanRead, "input.CanRead"); 538Debug.Assert(null != output, "null output stream"); 539Debug.Assert(output.CanWrite, "output.CanWrite"); 540Debug.Assert(buffer != null, "buffer != null"); 578Debug.Assert(type != null, "type != null"); 579Debug.Assert(targetType != null, "targetType != null"); 630Debug.Assert(provider != null, "provider != null"); 631Debug.Assert(typeName != null, "typeName != null"); 661Debug.Assert(obj != null, "obj != null"); 662Debug.Assert(provider != null, "provider != null"); 682Debug.Assert(obj != null, "obj != null"); 735Debug.Assert(mimeType != null, "mimeType != null"); 742Debug.Assert(partFound || !slashFound, "partFound || !slashFound -- slashFound->partFound"); 743Debug.Assert(slashFound || !subTypeFound, "slashFound || !subTypeFound -- subTypeFound->slashFound"); 856Debug.Assert(type != null, "type != null"); 868Debug.Assert(type != null, "type != null"); 885Debug.Assert(expression != null, "expression != null"); 900Debug.Assert(etagProperties.Count != 0, "etagProperties.Count != 0"); 944Debug.Assert(keyValueText != null, "keyValueText != null - otherwise TryKeyPrimitiveToString returned true and null value"); 979Debug.Assert(type != null, "type != null"); 995Debug.Assert(fullName.StartsWith(XmlConstants.EdmNamespace, StringComparison.Ordinal), "fullName.StartsWith(XmlConstants.EdmNamespace, StringComparison.Ordinal)"); 1003Debug.Assert(primitiveResourceTypes != null, "primitiveResourceTypes != null"); 1048Debug.Assert(service.OperationContext.Host != null, "service.OperationContext.Host != null"); 1054Debug.Assert(host.AstoriaHttpVerb == AstoriaVerbs.GET, "this method must be called for GET operations only"); 1099Debug.Assert(!String.IsNullOrEmpty(host.RequestIfNoneMatch), "Both can't be null, otherwise it should have entered the first condition"); 1173Debug.Assert(reader != null, "reader != null"); 1330Debug.Assert(wrapperParameters.Length > 1, "Must have 1 element besides the ProjectedType"); 1398Debug.Assert((null != reader) && (null != localName) && (null != namespaceUri), "null"); 1490Debug.Assert(provider != null, "provider != null"); 1491Debug.Assert(resource != null, "resource != null"); 1492Debug.Assert( 1513Debug.Assert(resourceType != null, "resourceType != null"); 1514Debug.Assert(propertyName != null, "propertyName != null"); 1515Debug.Assert(resourceType.IsOpenType, "resourceType must be of open type."); 1524Debug.Assert(service != null, "service != null"); 1525Debug.Assert(service.OperationContext != null, "service.OperationContext != null"); 1621Debug.Assert(hostHeader != null, "hostHeader != null"); 1670Debug.Assert(writer != null, "writer != null");
System.Data.Services.Client (793)
parent\Server\System\Data\Services\Epm\EpmContentSerializerBase.cs (1)
153Debug.Assert(kind == EpmSerializationKind.All, "Must serialize everything");
parent\Server\System\Data\Services\Epm\EpmCustomContentSerializer.cs (3)
80Debug.Assert(c != null, "Must have custom data for all the children of root"); 131Debug.Assert(targetSegment.HasContent, "Must have content for attributes"); 174Debug.Assert(currentContent.Data != null, "Must always have non-null data content value");
parent\Server\System\Data\Services\Epm\EpmSourceTree.cs (2)
73Debug.Assert(!String.IsNullOrEmpty(sourceName), "Must have been validated during EntityPropertyMappingAttribute construction"); 98Debug.Assert(Object.ReferenceEquals(foundProperty, currentProperty), "currentProperty variable should have been updated already to foundProperty");
parent\Server\System\Data\Services\Epm\EpmTargetTree.cs (2)
78Debug.Assert(!String.IsNullOrEmpty(targetName), "Must have been validated during EntityPropertyMappingAttribute construction"); 152Debug.Assert(!String.IsNullOrEmpty(targetName), "Must have been validated during EntityPropertyMappingAttribute construction");
parent\Server\System\Data\Services\HttpProcessUtility.cs (8)
354Debug.Assert(text != null, "text != null"); 473Debug.Assert(text != null, "text != null"); 505Debug.Assert(text != null, "text != null"); 559Debug.Assert(text != null, "text != null"); 560Debug.Assert(text.Length >= 0, "text >= 0"); 561Debug.Assert(textIndex <= text.Length, "text <= text.Length"); 1011Debug.Assert(type != null, "type != null"); 1012Debug.Assert(subType != null, "subType != null");
parent\Server\System\Data\Services\Parsing\WebConvert.cs (5)
117Debug.Assert(type != null, "type != null"); 127Debug.Assert(value != null, "value != null"); 145Debug.Assert(result != null, "result != null"); 617Debug.Assert(value != null, "value != null"); 699Debug.Assert(result != null, "result != null");
parent\Server\System\Data\Services\Providers\EntityPropertyMappingInfo.cs (5)
81Debug.Assert(attribute != null, "attribute != null"); 82Debug.Assert(definingType != null, "definingType != null"); 83Debug.Assert(actualPropertyType != null, "actualPropertyType != null"); 89Debug.Assert(!string.IsNullOrEmpty(attribute.SourcePath), "Invalid source path"); 153Debug.Assert(pi != null, "Cannot find property " + srcPathPart + "on type " + element.GetType().Name);
System\Data\Services\Client\ALinq\DataServiceExpressionVisitor.cs (1)
94Debug.Assert(ire != null, "ire != null -- otherwise caller never should have visited here");
System\Data\Services\Client\ALinq\DataServiceQueryProvider.cs (2)
106Debug.Assert(mce != null, "mce != null"); 132Debug.Assert(false, "Not supported singleton operator not caught by Resource Binder");
System\Data\Services\Client\ALinq\Evaluator.cs (1)
170Debug.Assert(!(constantValue is Expression), "!(constantValue is Expression)");
System\Data\Services\Client\ALinq\ExpressionNormalizer.cs (8)
68Debug.Assert(normalizerRewrites != null, "normalizerRewrites != null"); 94Debug.Assert(expression != null, "expression != null"); 95Debug.Assert(rewrites != null, "rewrites != null"); 511Debug.Assert(false, "This method should never be called. It exists merely to support creation of relational LINQ expressions."); 523Debug.Assert(false, "CreateRelationalOperator has unknown op " + op); 607Debug.Assert(source != null, "source != null"); 608Debug.Assert(rewritten != null, "rewritten != null"); 609Debug.Assert(this.NormalizerRewrites != null, "this.NormalizerRewrites != null");
System\Data\Services\Client\ALinq\ExpressionWriter.cs (7)
56Debug.Assert(context != null, "context != null"); 179Debug.Assert(ire != null, "ire != null"); 210Debug.Assert(m.Method.Name == "Contains", "m.Method.Name == 'Contains'"); 211Debug.Assert(m.Object != null, "m.Object != null"); 212Debug.Assert(m.Arguments.Count == 1, "m.Arguments.Count == 1"); 301Debug.Assert(result != null, "result != null"); 484Debug.Assert(type != null, "type != null");
System\Data\Services\Client\ALinq\InputBinder.cs (5)
80Debug.Assert(e != null, "Expression cannot be null"); 81Debug.Assert(currentInput != null, "A current input resource set is required"); 82Debug.Assert(inputParameter != null, "The input lambda parameter is required"); 83Debug.Assert(referencedInputs != null, "The referenced inputs list is required"); 171Debug.Assert(source != null, "source != null -- otherwise ResourceBinder created an accessor to nowhere");
System\Data\Services\Client\ALinq\InputReferenceExpression.cs (3)
44Debug.Assert(target != null, "Target resource set cannot be null"); 63Debug.Assert(newTarget != null, "Resource set cannot be null"); 64Debug.Assert(newTarget.ResourceType.Equals(this.Type), "Cannot reference a resource set with a different resource type");
System\Data\Services\Client\ALinq\NavigationPropertySingletonExpression.cs (2)
50Debug.Assert(memberExpression != null, "memberExpression != null"); 51Debug.Assert(resourceType != null, "resourceType != null");
System\Data\Services\Client\ALinq\PathBox.cs (5)
82Debug.Assert(parameterExpressions.Count > 0); 90Debug.Assert(this.ParamExpressionInScope != null, "this.ParamExpressionInScope != null -- should not be starting new path with no lambda parameter in scope."); 101Debug.Assert(pi != null, "pi != null"); 110Debug.Assert(sb != null); // there should always be an expand path because must call StartNewPath first. 120Debug.Assert(sb != null, "sb != null -- we are always building paths in the context of a parameter");
System\Data\Services\Client\ALinq\ProjectionAnalyzer.cs (16)
47Debug.Assert(le != null, "le != null"); 120Debug.Assert(call != null, "call != null"); 156Debug.Assert(elementType != null, "elementType == null"); 201Debug.Assert(mie != null, "mie != null"); 202Debug.Assert(pb != null, "pb != null"); 269Debug.Assert(pb != null, "pb != null"); 270Debug.Assert(type != null, "type != null"); 281Debug.Assert(mie != null, "mie != null"); 319Debug.Assert( 322Debug.Assert( 345Debug.Assert(u != null, "u != null"); 398Debug.Assert(m != null, "m != null"); 506Debug.Assert(member != null, "member != null"); 515Debug.Assert(fieldInfo != null, "fieldInfo != null -- otherwise Expression.Member factory should have thrown an argument exception"); 560Debug.Assert(u != null, "u != null"); 626Debug.Assert(m != null, "m != null");
System\Data\Services\Client\ALinq\ProjectionQueryOptionExpression.cs (3)
47Debug.Assert(type != null, "type != null"); 48Debug.Assert(lambda != null, "lambda != null"); 49Debug.Assert(paths != null, "paths != null");
System\Data\Services\Client\ALinq\ProjectionRewriter.cs (1)
38Debug.Assert(proposedParameterType != null, "proposedParameterType != null");
System\Data\Services\Client\ALinq\QueryOptionExpression.cs (2)
42Debug.Assert(previous != null, "other != null"); 43Debug.Assert(previous.GetType() == this.GetType(), "other.GetType == this.GetType() -- otherwise it's not the same specification");
System\Data\Services\Client\ALinq\ResourceBinder.cs (54)
39Debug.Assert(e != null, "e != null"); 97Debug.Assert(expression != null, "expression != null"); 108Debug.Assert(projection.Selector != null, "projection.Selector != null -- otherwise incorrectly constructed"); 129Debug.Assert(mce != null, "mce != null -- caller couldn't have know the expression kind otherwise"); 130Debug.Assert(mce.Method.Name == "Where", "mce.Method.Name == 'Where' -- otherwise this isn't a predicate"); 213Debug.Assert(!target.HasQueryOptions, "Navigation source had query options?"); 277Debug.Assert(rse != null, "rse != null"); 278Debug.Assert(keyValues != null, "keyValues != null"); 308Debug.Assert(left != null, "left != null"); 309Debug.Assert(right != null, "right != null"); 310Debug.Assert(comparer != null, "comparer != null"); 356Debug.Assert(target != null, "target != null"); 357Debug.Assert(predicates != null, "predicates != null"); 392Debug.Assert(keyValues != null || nonKeyPredicates != null, "No key predicates or non-key predicates found?"); 422Debug.Assert(input != null, "input != null"); 423Debug.Assert(keyValuesDictionary != null, "keyValuesDictionary != null"); 424Debug.Assert(keyValuesDictionary.Count > 0, "At least one key property is required in a key predicate"); 448Debug.Assert(conjuncts != null, "conjuncts != null"); 471Debug.Assert(mce != null, "mce != null"); 472Debug.Assert( 600Debug.Assert(mce != null, "mce != null"); 650Debug.Assert(mce != null, "mce != null"); 710Debug.Assert(selectManyCall != null, "selectManyCall != null"); 761Debug.Assert(input.OrderBy != null, "input.OrderBy != null"); 781Debug.Assert(mce != null, "mce != null"); 782Debug.Assert(maxCardinality > 0, "Cardinality must be at least 1"); 926Debug.Assert(type != null, "type != null"); 927Debug.Assert(source != null, "source != null"); 928Debug.Assert(memberExpression != null, "memberExpression != null"); 929Debug.Assert(resourceType != null, "resourceType != null"); 936Debug.Assert(elementType != null, "elementType != null -- otherwise the set isn't going to act like a collection"); 990Debug.Assert(e != null, "e != null"); 1016Debug.Assert(expression != null, "expression != null"); 1032Debug.Assert(rse != null, "rse != null"); 1310Debug.Assert(expression != null, "expression != null"); 1347Debug.Assert(expression != null, "expression != null"); 1373Debug.Assert(expression != null, "lambda != null"); 1476Debug.Assert(me != null, "me != null"); 1524Debug.Assert(type != null, "type != null"); 1564Debug.Assert(expression != null, "expression != null"); 1606Debug.Assert(lambda != null, "lambda != null"); 1655Debug.Assert(refPath != null, "refPath != null -- otherwise MatchPropertyAccess should not have returned true"); 1897Debug.Assert(expression != null, "expression != null"); 1922Debug.Assert(conditional != null, "conditional != null"); 1968Debug.Assert(assignedCandidate != null, "assignedCandidate != null"); 1969Debug.Assert(memberCandidate != null, "memberCandidate != null"); 2023Debug.Assert(expression != null, "expression != null"); 2083Debug.Assert(expression != null, "expression != null"); 2148Debug.Assert(argument != null, "argument != null"); 2149Debug.Assert(expressions != null, "expressions != null"); 2416Debug.Assert(obj != null, "obj != null"); 2446Debug.Assert(target != null, "target != null"); 2459Debug.Assert(target != null, "target != null"); 2460Debug.Assert(tree != null, "tree != null");
System\Data\Services\Client\ALinq\ResourceSetExpression.cs (9)
64Debug.Assert(type != null, "type != null"); 65Debug.Assert(memberExpression != null, "memberExpression != null"); 66Debug.Assert(resourceType != null, "resourceType != null"); 67Debug.Assert( 234Debug.Assert(qoe != null, "qoe != null"); 253Debug.Assert(newInput != null, "Original resource set cannot be null"); 254Debug.Assert(this.inputRef == null, "OverrideInputReference cannot be called if the target has already been referenced"); 315Debug.Assert(!string.IsNullOrEmpty(acc), "Set accessor cannot be null or empty"); 316Debug.Assert(sourceAccesors != null, "sourceAccesors != null");
System\Data\Services\Client\ALinq\SkipQueryOptionExpression.cs (4)
58Debug.Assert(previous != null, "other != null"); 59Debug.Assert(previous.GetType() == this.GetType(), "other.GetType == this.GetType() -- otherwise it's not the same specification"); 60Debug.Assert(this.skipAmount != null, "this.skipAmount != null"); 61Debug.Assert(
System\Data\Services\Client\ALinq\TakeQueryOptionExpression.cs (4)
58Debug.Assert(previous != null, "other != null"); 59Debug.Assert(previous.GetType() == this.GetType(), "other.GetType == this.GetType() -- otherwise it's not the same specification"); 60Debug.Assert(this.takeAmount != null, "this.takeAmount != null"); 61Debug.Assert(
System\Data\Services\Client\ALinq\TypeSystem.cs (3)
83Debug.Assert(expressionMethodMap.Count == ExpectedCount, "expressionMethodMap.Count == ExpectedCount"); 101Debug.Assert(expressionVBMethodMap.Count == 11, "expressionVBMethodMap.Count == 11"); 126Debug.Assert(propertiesAsMethodsMap.Count == 7, "propertiesAsMethodsMap.Count == 7");
System\Data\Services\Client\ALinq\UriWriter.cs (2)
49Debug.Assert(context != null, "context != null"); 326Debug.Assert(false, "Unexpected expression type " + (int)et);
System\Data\Services\Client\ArraySet.cs (2)
53Debug.Assert(index < this.count); 168Debug.Assert(unchecked((uint)index < (uint)this.count), "index out of range");
System\Data\Services\Client\AtomEntry.cs (1)
85Debug.Assert(value.HasValue, "value.HasValue -- callers shouldn't set the value to unknown");
System\Data\Services\Client\AtomMaterializer.cs (120)
60Debug.Assert(materializer.GetType() == typeof(AtomMaterializer), "materializer.GetType() == typeof(AtomMaterializer)"); 77Debug.Assert(entry.GetType() == typeof(AtomEntry), "entry.GetType() == typeof(AtomEntry)"); 78Debug.Assert(path.GetType() == typeof(ProjectionPath), "path.GetType() == typeof(ProjectionPath)"); 98Debug.Assert(materializer.GetType() == typeof(AtomMaterializer), "materializer.GetType() == typeof(AtomMaterializer)"); 99Debug.Assert(entry.GetType() == typeof(AtomEntry), "entry.GetType() == typeof(AtomEntry)"); 100Debug.Assert(path.GetType() == typeof(ProjectionPath), "path.GetType() == typeof(ProjectionPath)"); 110Debug.Assert(entry.GetType() == typeof(AtomEntry), "entry.GetType() == typeof(AtomEntry)"); 130Debug.Assert(materializer.GetType() == typeof(AtomMaterializer), "materializer.GetType() == typeof(AtomMaterializer)"); 131Debug.Assert(entry.GetType() == typeof(AtomEntry), "entry.GetType() == typeof(AtomEntry)"); 147Debug.Assert(materializer.GetType() == typeof(AtomMaterializer), "materializer.GetType() == typeof(AtomMaterializer)"); 148Debug.Assert(entry.GetType() == typeof(AtomEntry), "entry.GetType() == typeof(AtomEntry)"); 149Debug.Assert(path.GetType() == typeof(ProjectionPath), "path.GetType() == typeof(ProjectionPath)"); 160Debug.Assert(materializer.GetType() == typeof(AtomMaterializer), "materializer.GetType() == typeof(AtomMaterializer)"); 161Debug.Assert(entry.GetType() == typeof(AtomEntry), "entry.GetType() == typeof(AtomEntry)"); 172Debug.Assert(materializer.GetType() == typeof(AtomMaterializer), "materializer.GetType() == typeof(AtomMaterializer)"); 173Debug.Assert(entry.GetType() == typeof(AtomEntry), "entry.GetType() == typeof(AtomEntry)"); 260Debug.Assert(context != null, "context != null"); 261Debug.Assert(parser != null, "parser != null"); 262Debug.Assert(log != null, "log != null"); 305Debug.Assert(value != null, "value != null -- otherwise we have no instance target."); 375Debug.Assert(source != null, "source != null"); 399Debug.Assert(source != null, "source != null"); 438Debug.Assert(materializer != null, "materializer != null"); 439Debug.Assert(source != null, "source != null"); 491Debug.Assert(entry != null, "entry != null"); 492Debug.Assert(path != null, "path != null"); 517Debug.Assert(segmentIsLeaf, "segmentIsLeaf -- otherwise the path generated traverses a feed, which should be disallowed"); 522Debug.Assert( 581Debug.Assert( 608Debug.Assert(entry != null, "entry != null -- ProjectionGetEntry never returns a null entry, and top-level materialization shouldn't pass one in"); 704Debug.Assert(materializer != null, "materializer != null"); 705Debug.Assert(entry != null, "entry != null"); 706Debug.Assert(path != null, "path != null"); 753Debug.Assert(segmentIsLeaf, "segmentIsLeaf -- otherwise the path generated traverses a feed, which should be disallowed"); 762Debug.Assert( 845Debug.Assert(materializer != null, "materializer != null"); 846Debug.Assert(entry != null, "entry != null"); 847Debug.Assert( 914Debug.Assert(property != null, "property != null"); 915Debug.Assert(atomProperty != null, "atomProperty != null"); 952Debug.Assert( 955Debug.Assert( 966Debug.Assert( 978Debug.Assert( 1023Debug.Assert(this.parser.DataKind == AtomDataKind.Finished, "parser.DataKind == AtomDataKind.None"); 1024Debug.Assert(this.parser.CurrentEntry == null, "parser.Current == null"); 1053Debug.Assert(entry != null, "entry != null"); 1054Debug.Assert(name != null, "name != null"); 1112Debug.Assert(listType != null, "listType != null"); 1139Debug.Assert(instance != null, "instance != null"); 1140Debug.Assert(property != null, "property != null"); 1141Debug.Assert(property.CollectionType != null, "property.CollectionType != null -- otherwise property isn't a collection"); 1161Debug.Assert(result != null, "result != null -- otherwise GetOrCreateCollectionProperty didn't fall back to creation"); 1180Debug.Assert(materializer != null, "materializer != null"); 1181Debug.Assert(list != null, "list != null"); 1202Debug.Assert(type != null, "type != null"); 1203Debug.Assert(atomProperty != null, "atomProperty != null"); 1204Debug.Assert(context != null, "context != null"); 1215Debug.Assert(nestedElementType != null, "nestedElementType != null -- otherwise ReadTypeAttribute (or someone!) should throw"); 1266Debug.Assert(actualType != null, "actualType != null"); 1267Debug.Assert(values != null, "values != null"); 1268Debug.Assert(context != null, "context != null"); 1302Debug.Assert(type != null, "type != null"); 1303Debug.Assert(property != null, "property != null"); 1304Debug.Assert(context != null, "context != null"); 1305Debug.Assert(instance != null, "instance != context"); 1359Debug.Assert(type != null, "type != null"); 1360Debug.Assert(properties != null, "properties != null"); 1361Debug.Assert(context != null, "properties != context"); 1362Debug.Assert(instance != null, "instance != context"); 1379Debug.Assert(values != null, "values != null"); 1380Debug.Assert(path != null, "path != null"); 1388Debug.Assert(property != null, "property != null -- if values is null then this isn't the first step"); 1417Debug.Assert(property != null, "property != null -- property path should have at least one segment"); 1434Debug.Assert(entry != null, "entry != null"); 1435Debug.Assert(entry.Tag is XElement, "entry.Tag is XElement"); 1436Debug.Assert(entryType != null, "entryType != null -- othewise how would we know to apply property mappings (note that for projections entry.ActualType may be different that entryType)?"); 1437Debug.Assert(!entry.EntityPropertyMappingsApplied, "!entry.EntityPropertyMappingsApplied -- EPM should happen only once per entry"); 1446Debug.Assert(entryElement != null, "entryElement != null"); 1463Debug.Assert(target != null, "target != null"); 1464Debug.Assert(!target.HasContent, "!target.HasContent"); 1481Debug.Assert(segment.EpmInfo != null, "segment.EpmInfo != null -- otherwise segment.HasValue should be false"); 1514Debug.Assert(segments.Count == elements.Count, "segments.Count == elements.Count -- otherwise they're out of sync"); 1535Debug.Assert(atomProperty != null, "atomProperty != null"); 1557Debug.Assert(atomProperty != null, "atomProperty != null"); 1572Debug.Assert(entry != null, "entry != null"); 1573Debug.Assert(entry.ResolvedObject != null, "entry.ResolvedObject != null"); 1574Debug.Assert(property != null, "property != null"); 1575Debug.Assert(entry != null, "entry != null"); 1576Debug.Assert(plan != null || nextLink == null, "plan != null || nextLink == null"); 1611Debug.Assert( 1614Debug.Assert( 1669Debug.Assert( 1689Debug.Assert( 1697Debug.Assert(actualType != null, "actualType != null -- otherwise ClientType.Create returned a null value"); 1712Debug.Assert( 1732Debug.Assert(entry != null, "entry != null"); 1733Debug.Assert(expectedEntryType != null, "expectedEntryType != null"); 1734Debug.Assert(entry.EntityHasBeenResolved == false, "entry.EntityHasBeenResolved == false"); 1753Debug.Assert(entry.ActualType != null, "entry.ActualType != null"); 1754Debug.Assert(entry.ResolvedObject != null, "entry.ResolvedObject != null"); 1755Debug.Assert(entry.EntityHasBeenResolved, "entry.EntityHasBeenResolved"); 1774Debug.Assert(entry != null, "entry != null"); 1775Debug.Assert(property != null, "property != null"); 1776Debug.Assert(feed != null, "feed != null"); 1804Debug.Assert(entry != null, "entry != null"); 1805Debug.Assert(property != null, "property != null"); 1806Debug.Assert(items != null, "items != null"); 1862Debug.Assert(plan != null || link == null, "plan != null || link == null"); 1889Debug.Assert(entry != null, "entry != null"); 1890Debug.Assert(entry.DataValues != null, "entry.DataValues != null -- otherwise not correctly initialized"); 1891Debug.Assert( 1894Debug.Assert(expectedEntryType != null, "expectedType != null"); 1898Debug.Assert(entry.ResolvedObject != null, "entry.ResolvedObject != null -- otherwise ResolveOrCreateInstnace didn't do its job"); 1909Debug.Assert(entry != null, "entry != null"); 1910Debug.Assert(entry.ResolvedObject != null, "entry.ResolvedObject != null -- otherwise not resolved/created!"); 1949Debug.Assert(includeLinks, "includeLinks -- otherwise we shouldn't be materializing this entry"); 1956Debug.Assert(includeLinks, "includeLinks -- otherwise we shouldn't be materializing this entry"); 1968Debug.Assert(entry.ShouldUpdateFromPayload, "entry.ShouldUpdateFromPayload -- otherwise we're about to set a property we shouldn't"); 1973Debug.Assert(entry.ResolvedObject != null, "entry.ResolvedObject != null -- otherwise we didn't do any useful work");
System\Data\Services\Client\AtomMaterializerLog.cs (24)
69Debug.Assert(context != null, "context != null"); 99Debug.Assert( 137Debug.Assert(entry.ResolvedObject != null, "entry.ResolvedObject != null -- otherwise it wasn't found"); 182Debug.Assert(EntityStates.Detached == link.State, "not detached link"); 204Debug.Assert(entry != null, "entry != null"); 205Debug.Assert(ShouldTrackWithContext(entry), "Existing entries should be entity"); 234Debug.Assert(entry != null, "entry != null"); 235Debug.Assert(entry.ResolvedObject != null, "entry.ResolvedObject != null -- otherwise this is not a target"); 254Debug.Assert(entry != null, "entry != null"); 255Debug.Assert(entry.Identity != null, "entry.Identity != null"); 294Debug.Assert(source != null, "source != null"); 295Debug.Assert(propertyName != null, "propertyName != null"); 316Debug.Assert(entry != null, "entry != null"); 317Debug.Assert(entry.ResolvedObject != null, "entry.ResolvedObject != null -- otherwise, what did we create?"); 318Debug.Assert(entry.CreatedByMaterializer, "entry.CreatedByMaterializer -- otherwise we shouldn't be calling this"); 342Debug.Assert(source != null, "source != null"); 343Debug.Assert(propertyName != null, "propertyName != null"); 347Debug.Assert(this.Tracking, "this.Tracking -- otherwise there's an 'if' missing (it happens to be that the assert holds for all current callers"); 362Debug.Assert(source != null, "source != null"); 363Debug.Assert(propertyName != null, "propertyName != null"); 372Debug.Assert(this.Tracking, "this.Tracking -- otherwise there's an 'if' missing (it happens to be that the assert holds for all current callers"); 389Debug.Assert(entry.ActualType != null, "Entry with no type added to log"); 418Debug.Assert(entry != null, "entry != null"); 419Debug.Assert(descriptor != null, "descriptor != null");
System\Data\Services\Client\AtomParser.cs (41)
99Debug.Assert(reader != null, "reader != null"); 100Debug.Assert(typeScheme != null, "typeScheme != null"); 101Debug.Assert(entryCallback != null, "entryCallback != null"); 102Debug.Assert(!String.IsNullOrEmpty(currentDataNamespace), "currentDataNamespace is empty or null"); 110Debug.Assert(this.kind == AtomDataKind.None, "this.kind == AtomDataKind.None -- otherwise not initialized correctly"); 173Debug.Assert(reader != null, "reader != null"); 174Debug.Assert(reader is Xml.XmlWrappingReader, "reader must be a instance of XmlWrappingReader"); 206Debug.Assert( 266Debug.Assert(false, "Atom Parser is in a wrong state...Did you add a new AtomDataKind?"); 287Debug.Assert( 303Debug.Assert( 318Debug.Assert(newReader != null, "newReader != null"); 339Debug.Assert(reader != null, "reader != null"); 340Debug.Assert( 387Debug.Assert(localName != null, "localName != null"); 388Debug.Assert(namespaceUri != null, "namespaceUri != null"); 389Debug.Assert(!reader.IsEmptyElement, "!reader.IsEmptyElement"); 390Debug.Assert(reader.NodeType != XmlNodeType.EndElement, "reader.NodeType != XmlNodeType.EndElement"); 410Debug.Assert(reader != null, "reader != null"); 411Debug.Assert(reader.Depth >= depth, "reader.Depth >= depth"); 436Debug.Assert(reader != null, "reader != null"); 448Debug.Assert( 476Debug.Assert(reader != null, "reader != null"); 531Debug.Assert(targetEntry != null, "targetEntry != null"); 532Debug.Assert(this.reader.NodeType == XmlNodeType.Element, "this.reader.NodeType == XmlNodeType.Element"); 585Debug.Assert(targetEntry != null, "targetEntry != null"); 586Debug.Assert( 589Debug.Assert( 663Debug.Assert(this.reader is Xml.XmlWrappingReader, "reader must be a instance of XmlWrappingReader"); 667Debug.Assert(nestedReader.LocalName == "inline", "nestedReader.LocalName == 'inline'"); 704Debug.Assert( 745Debug.Assert(this.reader != null, "reader != null"); 746Debug.Assert(property != null, "property != null"); 797Debug.Assert(this.reader != null, "reader != null"); 798Debug.Assert( 838Debug.Assert(values != null, "values != null"); 839Debug.Assert(this.reader.NodeType == XmlNodeType.Element, "this.reader.NodeType == XmlNodeType.Element"); 875Debug.Assert(this.reader.NodeType == XmlNodeType.Element, "this.reader.NodeType == XmlNodeType.Element"); 879Debug.Assert(callbackResult.Key != null, "callbackResult.Key != null"); 884Debug.Assert(this.reader.LocalName == "entry", "this.reader.LocalName == 'entry' - otherwise we're not reading the subtree"); 1014Debug.Assert(this.feed != null, "Trying to parser paging links but feed is null.");
System\Data\Services\Client\BaseAsyncResult.cs (6)
77Debug.Assert(null != source, "null source"); 217Debug.Assert((result.CompletedSynchronously && result.IsCompleted) || !result.CompletedSynchronously, "CompletedSynchronously && !IsCompleted"); 223Debug.Assert(result.IsCompleted, "not completed after waiting"); 417Debug.Assert(asyncResult != null, "asyncResult != null"); 420Debug.Assert(asyncResult.IsCompleted, "asyncResult.IsCompleted"); 440Debug.Assert(asyncResult != null && asyncResult.IsCompleted, "asyncResult != null && asyncResult.IsCompleted");
System\Data\Services\Client\BatchStream.cs (49)
113Debug.Assert(null != stream, "null stream"); 258Debug.Assert(0 <= this.byteLength, "negative byteLength"); 259Debug.Assert(0 <= this.batchLength, "negative batchLength"); 396Debug.Assert(0 <= this.byteLength, "negative byteLength"); 397Debug.Assert(0 <= this.batchLength, "negative batchLength"); 405Debug.Assert(null == this.batchBoundary, "non-null batch boundary"); 406Debug.Assert(null == this.changesetBoundary, "non-null changesetBoundary boundary"); 419Debug.Assert(null != this.batchBoundary, "null batch boundary"); 420Debug.Assert(null == this.changesetBoundary, "non-null changeset boundary"); 426Debug.Assert(null != this.batchBoundary, "null batch boundary"); 427Debug.Assert(null != this.contentHeaders, "null contentHeaders"); 428Debug.Assert(null != this.changesetBoundary, "null changeset boundary"); 436Debug.Assert(null != this.changesetBoundary, "null changeset boundary"); 447Debug.Assert(null != this.changesetBoundary, "null changeset boundary"); 452Debug.Assert(false, "unknown state"); 456Debug.Assert(null == this.contentHeaders, "non-null content headers"); 457Debug.Assert(null == this.contentStream, "non-null content stream"); 462Debug.Assert(null == this.statusCode, "non-null statusCode"); 465Debug.Assert( 489Debug.Assert(this.batchState == BatchStreamState.EndChangeSet, "bad changeset boundary state"); 517Debug.Assert(this.batchState == BatchStreamState.EndChangeSet, "bad changeset boundary state"); 646Debug.Assert( 671Debug.Assert( 865Debug.Assert(0 <= this.byteLength, "negative byteLength"); 866Debug.Assert(0 <= this.batchLength, "negative batchLength"); 951Debug.Assert(0 < this.byteLength, "out of bytes"); 952Debug.Assert(this.bytePosition + this.byteLength <= this.byteBuffer.Length, "byte tracking out of range"); 997Debug.Assert(0 <= this.byteLength, "negative byteLength"); 998Debug.Assert(0 <= this.batchLength, "negative batchLength"); 1011Debug.Assert(0 <= this.byteLength, "negative byteLength"); 1012Debug.Assert(0 <= this.batchLength, "negative batchLength"); 1097Debug.Assert(null != buffer, "null != buffer"); 1098Debug.Assert(0 <= offset, "0 <= offset"); 1099Debug.Assert(0 <= count, "0 <= count"); 1100Debug.Assert(offset + count <= buffer.Length, "offset + count <= buffer.Length"); 1131Debug.Assert(this.bytePosition <= size, "negative size"); 1146Debug.Assert(this.bytePosition <= size, "negative size"); 1159Debug.Assert(0 <= size, "negative size"); 1168Debug.Assert(null != boundary1, "batch boundary shouldn't be null"); 1268Debug.Assert(null != buffer, "null != buffer"); 1269Debug.Assert(0 <= offset, "0 <= offset"); 1270Debug.Assert(0 <= count, "0 <= count"); 1271Debug.Assert(offset + count <= buffer.Length, "offset + count <= buffer.Length"); 1301Debug.Assert(0 <= this.byteLength, "negative byteLength"); 1302Debug.Assert(0 <= this.batchLength, "negative batchLength"); 1400Debug.Assert( 1494Debug.Assert(null != stream, "null != stream"); 1495Debug.Assert(0 < contentLength, "0 < contentLength"); 1570Debug.Assert(0 <= this.length, "Read beyond expected length");
System\Data\Services\Client\Binding\BindingEntityInfo.cs (6)
88Debug.Assert(target != null, "Argument 'target' cannot be null."); 89Debug.Assert(BindingEntityInfo.IsEntityType(target.GetType()), "Argument 'target' must be an entity type."); 119Debug.Assert(collectionType != null, "Argument 'collectionType' cannot be null."); 184Debug.Assert(type != null, "Argument 'type' cannot be null."); 342Debug.Assert(property != null, "property != null"); 345Debug.Assert(!property.IsKnownType, "Known types do not implement INotifyPropertyChanged.");
System\Data\Services\Client\Binding\BindingGraph.cs (33)
72Debug.Assert(collection != null, "'collection' can not be null"); 73Debug.Assert( 96Debug.Assert(entityType != null, "Collection must at least be inherited from DataServiceCollection<T>"); 115Debug.Assert( 159Debug.Assert(sourceVertex != null, "Must have a valid edge source"); 203Debug.Assert(target != null, "Target must be non-null when adding to collections"); 236Debug.Assert(!vertexToRemove.IsRootCollection, "Root collections are never removed"); 240Debug.Assert(parent != null, "Parent has to be present."); 247Debug.Assert(bpi.PropertyKind == BindingPropertyKind.BindingPropertyKindCollection, "parentProperty must refer to an DataServiceCollection"); 282Debug.Assert(collectionVertex != null, "Must be tracking the vertex for the collection"); 341Debug.Assert(collectionVertex != null, "Must be tracking the vertex for the collection"); 374Debug.Assert(collection != null, "Argument 'collection' cannot be null."); 375Debug.Assert(this.graph.ExistsVertex(collection), "Vertex corresponding to 'collection' must exist in the graph."); 398Debug.Assert(childVertex != null, "Must have a vertex in the graph corresponding to the entity."); 399Debug.Assert(childVertex.IsComplex == true, "Vertex must correspond to a complex object."); 406Debug.Assert(childVertex.Parent != null, "Complex properties must always have parent vertices."); 422Debug.Assert(parentVertex != null, "Must have a valid parent entity for complex properties."); 423Debug.Assert(target != null, "Must have non-null complex object reference."); 484Debug.Assert(bpi.PropertyKind == BindingPropertyKind.BindingPropertyKindComplex, "Must be complex type if PropertyKind is not entity or collection."); 499Debug.Assert(target != null, "Argument 'target' cannot be null"); 502Debug.Assert(notify != null, "DataServiceCollection must implement INotifyCollectionChanged"); 513Debug.Assert(target != null, "Argument 'target' cannot be null"); 530Debug.Assert(target != null, "Argument 'target' cannot be null"); 545Debug.Assert(target != null, "Argument 'target' cannot be null"); 585Debug.Assert(this.root != null, "Must have a non-null root vertex when this call is made."); 591Debug.Assert(this.root == null, "Must only initialize root vertex once."); 592Debug.Assert(this.ExistsVertex(value.Item), "Must already have the assigned vertex in the graph."); 780Debug.Assert(item != null, "item must be non-null"); 882Debug.Assert(this.IsCollection, "Must be a collection to be in this method"); 886Debug.Assert(this.Parent != null, "Parent must be non-null for child collection"); 889Debug.Assert(source != null, "Source object must be present for child collection"); 892Debug.Assert(sourceProperty != null, "Source entity property associated with a child collection must be non-null"); 902Debug.Assert(this.Parent == null, "Parent must be null for top level collection");
System\Data\Services\Client\Binding\BindingObserver.cs (32)
45Debug.Assert(context != null, "Must have been validated during DataServiceCollection construction."); 119Debug.Assert(collection != null, "Only constructed collections are tracked."); 242Debug.Assert(bpi.PropertyKind == BindingPropertyKind.BindingPropertyKindComplex, "Must be complex type if PropertyKind is not entity or collection."); 280Debug.Assert(BindingEntityInfo.IsDataServiceCollection(collection.GetType()), "We only register this event for DataServiceCollections."); 379Debug.Assert( 383Debug.Assert(target != null, "target must be provided by the caller."); 384Debug.Assert(BindingEntityInfo.IsEntityType(target.GetType()), "target must be an entity type."); 517Debug.Assert( 521Debug.Assert(target != null, "target must be provided by the caller."); 522Debug.Assert(BindingEntityInfo.IsEntityType(target.GetType()), "target must be an entity type."); 524Debug.Assert(!this.AttachBehavior, "AttachBehavior is only allowed during Construction and Load when this method should never be entered."); 598Debug.Assert(source != null, "source can not be null for update operations."); 599Debug.Assert(BindingEntityInfo.IsEntityType(source.GetType()), "source must be an entity with keys."); 600Debug.Assert(!String.IsNullOrEmpty(sourceProperty), "sourceProperty must be a non-empty string for update operations."); 601Debug.Assert(!String.IsNullOrEmpty(sourceEntitySet), "sourceEntitySet must be non-empty string for update operation."); 688Debug.Assert(!this.AttachBehavior, "During attach operations we must never perform operations for null values."); 700Debug.Assert(entity != null, "entity must be provided when checking for context tracking."); 712Debug.Assert(!this.AttachBehavior || this.Context.ApplyingChanges, "Entity updates must not happen during Attach or construction phases, deserialization case is the exception."); 725Debug.Assert(entity != null, "entity must be provided for update operations."); 726Debug.Assert(BindingEntityInfo.IsEntityType(entity.GetType()), "entity must be an entity with keys."); 727Debug.Assert(!String.IsNullOrEmpty(propertyName) || propertyValue == null, "When propertyName is null no propertyValue should be provided."); 774Debug.Assert(collection != null, "Must have a valid collection to which entities are added."); 812Debug.Assert(collection != null, "Must have a valid collection from which entities are removed."); 813Debug.Assert( 831Debug.Assert(this.DetachBehavior, "Must be detaching each item in collection."); 936Debug.Assert(source != null, "source entity must be provided."); 937Debug.Assert(BindingEntityInfo.IsEntityType(source.GetType()), "source must be an entity with keys."); 939Debug.Assert(!String.IsNullOrEmpty(sourceProperty), "sourceProperty must be provided."); 941Debug.Assert(target != null, "target entity must be provided."); 942Debug.Assert(BindingEntityInfo.IsEntityType(target.GetType()), "target must be an entity with keys."); 952Debug.Assert(entity != null, "entity must be provided."); 953Debug.Assert(BindingEntityInfo.IsEntityType(entity.GetType()), "entity must be an entity with keys.");
System\Data\Services\Client\Binding\BindingUtils.cs (1)
63Debug.Assert(BindingEntityInfo.IsDataServiceCollection(oec.GetType()), "Must be an DataServiceCollection.");
System\Data\Services\Client\Binding\DataServiceCollectionOfT.cs (13)
221Debug.Assert(atomMaterializer != null, "atomMaterializer != null"); 222Debug.Assert(((AtomMaterializer)atomMaterializer).Context != null, "Context != null"); 250Debug.Assert(!this.rootCollection, "Must be a child collection to have the Observer setter called."); 251Debug.Assert(typeof(System.ComponentModel.INotifyPropertyChanged).IsAssignableFrom(typeof(T)), "The entity type must be trackable (by implementing INotifyPropertyChanged interface)"); 479Debug.Assert(this.observer.Context != null, "Must have valid context when the collection is being observed."); 570Debug.Assert(items != null, "items != null"); 576Debug.Assert(queryProvider != null, "Got DataServiceQuery with unknown query provider."); 578Debug.Assert(context != null, "Query provider must always have valid context."); 585Debug.Assert(queryOperationResponse.Results != null, "Got QueryOperationResponse without valid results."); 587Debug.Assert(context != null, "Materializer must always have valid context."); 600Debug.Assert(items != null, "items != null"); 676Debug.Assert(context != null, "Must have a valid context to initialize."); 677Debug.Assert(this.observer == null, "Must have no observer which implies Initialize should only be called once.");
System\Data\Services\Client\ChangesetResponse.cs (1)
33Debug.Assert(descriptor != null, "descriptor != null");
System\Data\Services\Client\ClientConvert.cs (13)
136Debug.Assert(null != propertyValue, "should never be passed null"); 191Debug.Assert(null != knownTypes[(int)StorageType.Binary], "null typeof(System.Data.Linq.Binary)"); 195Debug.Assert(false, "new StorageType without update to knownTypes"); 217Debug.Assert(value != null, "value != null"); 227Debug.Assert(binaryValue != null, "binaryValue != null"); 228Debug.Assert(IsBinaryValue(binaryValue), "IsBinaryValue(binaryValue) - otherwise TryKeyBinaryToString shouldn't have been called."); 245Debug.Assert(value != null, "value != null"); 272Debug.Assert(type != null, "type != null"); 297Debug.Assert(null != propertyValue, "null should be handled by caller"); 356Debug.Assert(null != knownTypes[(int)StorageType.Binary], "null typeof(System.Data.Linq.Binary)"); 357Debug.Assert(knownTypes[(int)StorageType.Binary].IsInstanceOfType(propertyValue), "not IsInstanceOfType System.Data.Linq.Binary"); 361Debug.Assert(false, "new StorageType without update to knownTypes"); 449Debug.Assert(false, "knowntype without reverse mapping");
System\Data\Services\Client\ClientType.cs (34)
81Debug.Assert(null != type, "null type"); 82Debug.Assert(!String.IsNullOrEmpty(typeName), "empty typeName"); 149Debug.Assert(!ptype.ContainsGenericParameters, "remove when test case is found that encounters this"); 248Debug.Assert(0 == this.KeyCount, "shouldn't have a key yet"); 265Debug.Assert(this.KeyCount == this.Properties.Where(k => k.KeyProperty).Count(), "KeyCount mismatch"); 341Debug.Assert(this.epmTargetTree != null, "Must have valid target tree"); 369Debug.Assert(type != null, "type != null"); 598Debug.Assert(null != propertyType, "null propertyType"); 599Debug.Assert(null != genericTypeDefinition, "null genericTypeDefinition"); 600Debug.Assert(genericTypeDefinition.IsGenericTypeDefinition, "!IsGenericTypeDefinition"); 609Debug.Assert(null != methodInfo, "should have found the method"); 680Debug.Assert(type != null, "type != null"); 681Debug.Assert(!type.ContainsGenericParameters, "remove when test case is found that encounters this"); 682Debug.Assert(genericTypeDefinition != null, "genericTypeDefinition != null"); 761Debug.Assert(0 <= dataIndex, "missing data property"); 762Debug.Assert(0 <= mimeTypeIndex, "missing mime type property"); 776Debug.Assert(attributes.Length == 1, "The AttributeUsage in the attribute definition should be preventing more than 1 per property"); 794Debug.Assert(attributes.Length == 1, "The AttributeUsage in the attribute definition should be preventing more than 1 per property"); 880Debug.Assert(null != property, "null property"); 881Debug.Assert(null != propertyType, "null propertyType"); 882Debug.Assert(null == Nullable.GetUnderlyingType(propertyType), "should already have been denullified"); 906Debug.Assert(!this.keyProperty || this.IsKnownType, "can't have an random type as key"); 961Debug.Assert(null != instance, "null instance"); 962Debug.Assert(null != this.propertyGetter, "null propertyGetter"); 973Debug.Assert(null != instance, "null instance"); 974Debug.Assert(null != this.removeMethod, "missing removeMethod"); 976Debug.Assert(this.PropertyType.IsAssignableFrom(instance.GetType()), "unexpected collection instance"); 977Debug.Assert((null == value) || this.CollectionType.IsAssignableFrom(value.GetType()), "unexpected collection value to add"); 1002Debug.Assert(null != instance, "null instance"); 1021Debug.Assert(this.PropertyType.IsAssignableFrom(instance.GetType()), "unexpected dictionary instance"); 1022Debug.Assert((null == value) || this.CollectionType.IsAssignableFrom(value.GetType()), "unexpected dictionary value to set"); 1030Debug.Assert(this.PropertyType.IsAssignableFrom(instance.GetType()), "unexpected collection instance"); 1031Debug.Assert((null == value) || this.CollectionType.IsAssignableFrom(value.GetType()), "unexpected collection value to add"); 1041Debug.Assert((null == value) || this.PropertyType.IsAssignableFrom(value.GetType()), "unexpected property value to set");
System\Data\Services\Client\Common.cs (1)
63Debug.Assert(!type.FullName.StartsWith("System.Tuple", StringComparison.Ordinal), "System.Tuple is not blocked by unsupported type check");
System\Data\Services\Client\DataServiceContext.cs (104)
930Debug.Assert(box.State != EntityStates.Detached, "We should never have a detached entity in the entityDescriptor dictionary."); 1189Debug.Assert(null != errors, "null errors"); 1354Debug.Assert( 1535Debug.Assert( 1712Debug.Assert(null != identity, "must have identity"); 1747Debug.Assert(null != entity, "null != entity"); 1844Debug.Assert((null != descriptor.Identity), "must have identity"); 1845Debug.Assert(null != descriptor.Entity && ClientType.Create(descriptor.Entity.GetType()).IsEntityType, "must be entity type to attach"); 1927Debug.Assert(null != requestUri, "request uri is null"); 1928Debug.Assert(requestUri.IsAbsoluteUri, "request uri is not absolute uri"); 1929Debug.Assert( 1934Debug.Assert( 2047Debug.Assert(!String.IsNullOrEmpty(contentType), "Content-Type must be specified for non get operation"); 2071Debug.Assert(contentType == null, "Content-Type for get methods should be null"); 2111Debug.Assert(null != resourceUri, "null uri"); 2124Debug.Assert(null != resource.Entity, "null entity"); 2152Debug.Assert(null != userType, "null != baseType"); 2198Debug.Assert(null != type, "null type"); 2210Debug.Assert(descriptor != null && descriptor.Entity != null, "Null descriptor or no entity in descriptor"); 2241Debug.Assert(entity != null, "entity != null"); 2242Debug.Assert(data != null, "data != null"); 2289Debug.Assert(Util.SupportedResponseVersions.Length > 0, "At least one supported version must exist."); 2310Debug.Assert(null != baseUriWithSlash && baseUriWithSlash.IsAbsoluteUri && CommonUtil.UriToString(baseUriWithSlash).EndsWith("/", StringComparison.Ordinal), "baseUriWithSlash"); 2311Debug.Assert(!String.IsNullOrEmpty(entitySetName) && !entitySetName.StartsWith("/", StringComparison.Ordinal), "entitySetName"); 2394Debug.Assert(EntityStates.Modified == link.State, "not Modified state"); 2410Debug.Assert(EntityStates.Added == link.State, "not Added state"); 2448Debug.Assert(descriptor.State == EntityStates.Modified, "descriptor.State == EntityStates.Modified"); 2629Debug.Assert(flag, "should have removed existing entity"); 2645Debug.Assert(removed, "should have removed existing identity"); 2656Debug.Assert(null != binding, "null binding"); 2668Debug.Assert(!binding.ContentGeneratedForSave, "already saved link"); 2670Debug.Assert(EntityStates.Added == sourceResource.State, "expected added state"); 2675Debug.Assert(!binding.ContentGeneratedForSave, "already saved link"); 2677Debug.Assert(EntityStates.Added == targetResource.State, "expected added state"); 2681Debug.Assert(null != sourceResource.Identity, "missing sourceResource.Identity"); 2706Debug.Assert(null != binding.Target, "null target in collection"); 2725Debug.Assert(!relative.IsAbsoluteUri, "should be relative uri"); 2768Debug.Assert( 2822Debug.Assert(null != box && ((EntityStates.Added == state) || (EntityStates.Modified == state) || (EntityStates.Deleted == state)), "unexpected entity ResourceState"); 2845Debug.Assert(null != box, "null box"); 2846Debug.Assert(null != text, "null text"); 2847Debug.Assert(box.State == EntityStates.Added || box.State == EntityStates.Deleted || box.State == EntityStates.Modified, "the entity must be in one of the 3 possible states"); 2851Debug.Assert(null != requestUri, "request uri is null"); 2852Debug.Assert(requestUri.IsAbsoluteUri, "request uri is not absolute uri"); 2877Debug.Assert(null != box, "null box"); 3035Debug.Assert(EntityStates.Added == box.State, "entity not added state"); 3040Debug.Assert(!end.ContentGeneratedForSave, "already saved link"); 3058Debug.Assert(null != end.Target, "null is DELETE"); 3096Debug.Assert(editLink != null, "location header must be specified in POST responses."); 3116Debug.Assert(null != entry.Identity, "updated inserted should always gain an identity"); 3117Debug.Assert(x == entry.Entity, "x == box.Entity, should have same object generated by response"); 3118Debug.Assert(EntityStates.Unchanged == entry.State, "should have moved out of insert"); 3119Debug.Assert((null != this.identityToDescriptor) && this.identityToDescriptor.ContainsKey(entry.Identity), "should have identity tracked"); 3137Debug.Assert(0 != end.SaveResultWasProcessed, "link should have been saved with the enty"); 3161Debug.Assert(end.ContentGeneratedForSave, "link should have been saved with the enty"); 3164Debug.Assert(0 == end.SaveResultWasProcessed, "this link already had a result"); 3213Debug.Assert(box.ChangeOrder < end.ChangeOrder, "saving is out of order"); 3233Debug.Assert(continuation == null || requestUri == null, "continuation == null || requestUri == null -- only one or the either (or neither) may be passed in"); 3238Debug.Assert(type.IsEntityType, "must be entity type to be contained"); 3246Debug.Assert(null != property, "should have thrown if propertyName didn't exist"); 3430Debug.Assert(!this.bindings.Values.Any(o => (o.Source == source) && (o.SourceProperty == sourceProperty)), "only expecting one"); 3484Debug.Assert(type.IsEntityType, "should be enforced by just adding an object"); 3511Debug.Assert(type.IsEntityType, "should be enforced by just adding an object"); 3650Debug.Assert(stream != null, "stream must not be null."); 3731Debug.Assert(type.IsEntityType, "must be entity type to be contained"); 3868Debug.Assert(WebUtil.GetDataServiceCollectionOfT(nestedType) != null, "DataServiceCollection<> must be available here."); 3892Debug.Assert(materializer != null, "materializer != null -- otherwise GetMaterializer() returned null rather than empty"); 4254Debug.Assert(this.CompletedSynchronously, "completedSynchronously"); 4255Debug.Assert(this.IsCompletedInternally, "completed"); 4268Debug.Assert((this.CompletedSynchronously && this.IsCompleted) || !this.CompletedSynchronously, "sync without complete"); 4312Debug.Assert(!this.IsCompletedInternally, "why being called if already completed?"); 4334Debug.Assert(this.ChangedEntries[this.entryIndex] is LinkDescriptor, "only expected RelatedEnd to presave"); 4335Debug.Assert( 4439Debug.Assert(this.executeAsync || this.CompletedSynchronously, "sync !CompletedSynchronously"); 4440Debug.Assert((this.CompletedSynchronously && this.IsCompleted) || !this.CompletedSynchronously, "sync without complete"); 4441Debug.Assert(this.entryIndex < this.ChangedEntries.Count || this.ChangedEntries.All(o => o.ContentGeneratedForSave), "didn't generate content for all entities/links"); 4450Debug.Assert(!IsFlagSet(this.options, SaveChangesOptions.Batch), "should be non-batch"); 4455Debug.Assert(Object.ReferenceEquals(this.httpWebResponseStream, this.buildBatchWriter.BaseStream), "expected different stream"); 4551Debug.Assert(this.ChangedEntries[this.entryIndex].IsResource, "Only resources can have MR's."); 4591Debug.Assert(!this.processingMediaLinkEntry || entry.State == EntityStates.Modified, "!this.processingMediaLinkEntry || entry.State == EntityStates.Modified"); 4629Debug.Assert( 4796Debug.Assert(!entry.ContentGeneratedForSave, "already saved entity/link"); 4803Debug.Assert( 4806Debug.Assert( 4812Debug.Assert(this.mediaResourceRequestStream != null, "We should have precreated the MR stream already."); 4875Debug.Assert(null != this.buildBatchWriter, "buildBatchWriter"); 4876Debug.Assert(null != this.changesetBoundary, "changesetBoundary"); 4970Debug.Assert(entry.State == EntityStates.Modified, "Entity state should be set to Modified once we've sent the POST MR"); 5025Debug.Assert(null != this.buildBatchWriter, "null buildBatchWriter"); 5090Debug.Assert(null != requestUri, "request uri is null"); 5091Debug.Assert(requestUri.IsAbsoluteUri, "request uri is not absolute uri"); 5153Debug.Assert(contentStream.IsKnownMemoryStream, "Batch requests don't support MRs yet"); 5210Debug.Assert(Object.ReferenceEquals(text.BaseStream, memory), "should be same"); 5211Debug.Assert(this.ChangedEntries.All(o => o.ContentGeneratedForSave), "didn't generated content for all entities/links"); 5428Debug.Assert(0 == operationCount, "missing an EndChangeSet 2"); 5576Debug.Assert(descriptor.State == EntityStates.Modified, "The MLE state must be Modified."); 5592Debug.Assert(descriptor.State == EntityStates.Unchanged, "The materializer should always set the entity state to Unchanged."); 5654Debug.Assert(batch.State == BatchStreamState.EndBatch, "unexpected batch state"); 5708Debug.Assert(asyncResult != null && asyncResult.IsCompleted, "asyncResult.IsCompleted"); 5777Debug.Assert(asyncResult != null && asyncResult.IsCompleted, "asyncResult.IsCompleted"); 5857Debug.Assert(asyncResult != null && asyncResult.IsCompleted, "asyncResult.IsCompleted"); 5904Debug.Assert(asyncResult != null && asyncResult.IsCompleted, "asyncResult.IsCompleted"); 5990Debug.Assert(asyncResult != null && asyncResult.IsCompleted, "asyncResult.IsCompleted"); 6048Debug.Assert(this.executeAsync, "should be async");
System\Data\Services\Client\DataServiceQueryContinuation.cs (4)
43Debug.Assert(nextLinkUri != null, "nextLinkUri != null"); 44Debug.Assert(plan != null, "plan != null"); 89Debug.Assert(plan != null || nextLinkUri == null, "plan != null || nextLinkUri == null"); 97Debug.Assert(constructors.Length == 1, "constructors.Length == 1");
System\Data\Services\Client\DataServiceQueryOfT.cs (3)
53Debug.Assert(null != provider.Context, "null context"); 54Debug.Assert(expression != null, "null expression"); 55Debug.Assert(provider is DataServiceQueryProvider, "Currently only support Web Query Provider");
System\Data\Services\Client\DataServiceRequest.cs (3)
77Debug.Assert(null != queryComponents, "querycomponents"); 196Debug.Assert(null != context, "context is null"); 270Debug.Assert(null != context, "context is null");
System\Data\Services\Client\DataServiceRequestOfT.cs (1)
52Debug.Assert(queryComponents != null, "queryComponents != null");
System\Data\Services\Client\DataServiceStreamResponse.cs (1)
40Debug.Assert(response != null, "Can't create a stream response object from a null response.");
System\Data\Services\Client\Descriptor.cs (1)
100System.Diagnostics.Debug.Assert(
System\Data\Services\Client\EntityDescriptor.cs (8)
112Debug.Assert(entity != null, "entity is null"); 113Debug.Assert((parentEntity == null && parentProperty == null) || (parentEntity != null && parentProperty != null), "When parentEntity is specified, must also specify parentProperyName"); 244Debug.Assert(this.mediaLinkEntry == true, "this.mediaLinkEntry == true"); 330Debug.Assert(this.streamState == StreamStates.NoStream || this.mediaLinkEntry, "this.streamState == StreamStates.NoStream || this.mediaLinkEntry"); 331Debug.Assert( 414Debug.Assert(this.IsDeepInsert, "For related end, this must be a deep insert"); 415Debug.Assert(this.Identity == null, "If the identity is set, it means that the edit link no longer has the property name"); 476Debug.Assert(this.State == EntityStates.Added, "the entity must be in added state");
System\Data\Services\Client\Epm\EpmSyndicationContentSerializer.cs (3)
155Debug.Assert(false, "Unhandled SyndicationItemProperty enum value - should never get here."); 175Debug.Assert(false, "Only authors and contributors have nested elements"); 208Debug.Assert(this.authorInfoPresent == true, "Must have already written the start element for author");
System\Data\Services\Client\GetReadStreamResult.cs (5)
49Debug.Assert(request != null, "Null request can't be wrapped to a result."); 76Debug.Assert(!this.CompletedSynchronously || this.IsCompleted, "if CompletedSynchronously then MUST IsCompleted"); 144Debug.Assert(null != this.response || null != this.Failure, "should have response or exception"); 171Debug.Assert(state != null, "Async callback got called for different request."); 214Debug.Assert(webResponse != null, "Can't set a null response.");
System\Data\Services\Client\MaterializeFromAtom.cs (14)
104Debug.Assert(queryComponents != null, "queryComponents != null"); 114Debug.Assert(reader != null, "Materializer reader is null! Did you mean to use Materializer.ResultsWrapper/EmptyResults?"); 132Debug.Assert(tag != null, "tag != null"); 133Debug.Assert(entity != null, "entity != null"); 283Debug.Assert(this.current == null, "this.current == null -- otherwise this.reader should have some value."); 379Debug.Assert(reader != null, "reader != null"); 380Debug.Assert(reader.NodeType == XmlNodeType.Element, "reader.NodeType == XmlNodeType.Element"); 422Debug.Assert(this.materializer != null, "Materializer is null!"); 476Debug.Assert(this.countValue == CountStateInitial, "Count value is not in the initial state"); 496Debug.Assert( 547Debug.Assert(context != null, "context != null"); 550Debug.Assert(result != null, "result != null -- otherwise ClientType.Create returned null"); 556Debug.Assert(reader != null, "reader != null"); 557Debug.Assert(
System\Data\Services\Client\MemberAssignmentAnalysis.cs (11)
61Debug.Assert(entity != null, "entity != null"); 93Debug.Assert(entityInScope != null, "entityInScope != null"); 94Debug.Assert(assignmentExpression != null, "assignmentExpression != null"); 260Debug.Assert(!this.multiplePathsFound, "this.multiplePathsFound -- otherwise GetExpressionsToTargetEntity won't return reliable (consistent) results"); 276Debug.Assert(!this.multiplePathsFound, "this.multiplePathsFound -- otherwise GetExpressionsToTargetEntity won't return reliable (consistent) results"); 302Debug.Assert(targetType != null, "targetType != null"); 303Debug.Assert(previous != null, "previous != null"); 304Debug.Assert(candidate != null, "candidate != null"); 346Debug.Assert(targetType != null, "targetType != null"); 347Debug.Assert(previous != null, "previous != null"); 348Debug.Assert(candidate != null, "candidate != null");
System\Data\Services\Client\OperationResponse.cs (2)
36Debug.Assert(null != headers, "null headers"); 63Debug.Assert(null != value, "should not set null");
System\Data\Services\Client\ProjectionPath.cs (1)
53Debug.Assert(members != null, "members != null");
System\Data\Services\Client\ProjectionPathBuilder.cs (8)
81Debug.Assert(this.parameterExpressionTypes.Count > 0, "this.parameterExpressionTypes.Count > 0"); 139Debug.Assert(lambda != null, "lambda != null"); 140Debug.Assert(lambda.Parameters.Count == 1, "lambda.Parameters.Count == 1"); 169Debug.Assert(expression != null, "expression != null"); 237Debug.Assert(root != null, "root != null"); 238Debug.Assert(names != null, "names != null"); 239Debug.Assert(rewriteExpression != null, "rewriteExpression != null"); 250Debug.Assert(root != null, "root != null");
System\Data\Services\Client\ProjectionPathSegment.cs (1)
38Debug.Assert(startPath != null, "startPath != null");
System\Data\Services\Client\ProjectionPlan.cs (2)
77Debug.Assert(materializer != null, "materializer != null"); 78Debug.Assert(entry != null, "entry != null");
System\Data\Services\Client\ProjectionPlanCompiler.cs (46)
78Debug.Assert(projection != null, "projection != null"); 79Debug.Assert(projection.Parameters.Count == 1, "projection.Parameters.Count == 1"); 80Debug.Assert( 138Debug.Assert(conditional != null, "conditional != null"); 193Debug.Assert(m != null, "m != null"); 230Debug.Assert(p != null, "p != null"); 279Debug.Assert(m != null, "m != null"); 290Debug.Assert( 303Debug.Assert(m.Method.Name == "ReferenceEquals", "We don't know how to handle this method, ProjectionAnalyzer updated?"); 327Debug.Assert(nex != null, "nex != null"); 344Debug.Assert(lambda != null, "lambda != null"); 415Debug.Assert(methodName != null, "methodName != null"); 416Debug.Assert(arguments != null, "arguments != null"); 419Debug.Assert(method != null, "method != null - found " + methodName); 447Debug.Assert(entry != null, "entry != null"); 448Debug.Assert(path != null, "path != null"); 463Debug.Assert(entry != null, "entry != null"); 464Debug.Assert(path != null, "path != null"); 486Debug.Assert(conditional != null, "conditional != null"); 487Debug.Assert(nullCheck.Match, "nullCheck.Match -- otherwise no reason to call this rebind method"); 520Debug.Assert(init != null, "init != null"); 521Debug.Assert(init.Bindings.Count > 0, "init.Bindings.Count > 0 -- otherwise this is just empty construction"); 531Debug.Assert(expressions.Length != 0, "expressions.Length != 0 -- otherwise there is no correlation to parameter in entity member init"); 718Debug.Assert(path.Length > 1, "path.Length > 1"); 740Debug.Assert(expression != null, "expression != null"); 759Debug.Assert(expression != null, "expression != null"); 760Debug.Assert(annotation != null, "annotation != null"); 788Debug.Assert(m != null, "m != null"); 789Debug.Assert(baseAnnotation != null, "baseAnnotation != null"); 833Debug.Assert(nex != null, "nex != null"); 834Debug.Assert( 951Debug.Assert(call != null, "call != null"); 952Debug.Assert(call.Method.Name == "Select", "call.Method.Name == 'Select'"); 953Debug.Assert(call.Object == null, "call.Object == null -- otherwise this isn't a call to a static Select method"); 954Debug.Assert(call.Arguments.Count == 2, "call.Arguments.Count == 2 -- otherwise this isn't the expected Select() call on IQueryable"); 1012Debug.Assert(call != null, "call != null"); 1013Debug.Assert(call.Object == null, "call.Object == null -- otherwise this isn't a call to a static ToList method"); 1014Debug.Assert(call.Method.Name == "ToList", "call.Method.Name == 'ToList'"); 1017Debug.Assert(call.Arguments.Count == 1, "call.Arguments.Count == 1 -- otherwise this isn't the expected ToList() call on IEnumerable"); 1035Debug.Assert(call != null, "call != null"); 1036Debug.Assert(ProjectionAnalyzer.IsMethodCallAllowedEntitySequence(call), "ProjectionAnalyzer.IsMethodCallAllowedEntitySequence(call)"); 1037Debug.Assert(call.Object == null, "call.Object == null -- otherwise this isn't the supported Select or ToList methods"); 1048Debug.Assert(call.Arguments.Count == 2, "call.Arguments.Count == 2 -- otherwise this isn't the argument we expected"); 1084Debug.Assert(call.Method.Name == "ToList", "call.Method.Name == 'ToList'"); 1110Debug.Assert(source != null, "source != null"); 1111Debug.Assert(targetType != null, "targetType != null");
System\Data\Services\Client\QueryResult.cs (11)
92Debug.Assert(null != request, "null request"); 138Debug.Assert(response != null, "response != null, BaseAsyncResult.EndExecute() would have thrown a different exception otherwise."); 192Debug.Assert(!this.CompletedSynchronously || this.IsCompleted, "if CompletedSynchronously then MUST IsCompleted"); 326Debug.Assert(this.IsCompletedInternally, "request hasn't completed yet"); 379Debug.Assert(null != this.httpWebResponse || null != this.Failure, "should have response or exception"); 402Debug.Assert(null == this.asyncStreamCopyBuffer, "not expecting buffer"); 426Debug.Assert(null == this.asyncStreamCopyBuffer, "non-null this.asyncStreamCopyBuffer"); 543Debug.Assert(asyncResult != null && asyncResult.IsCompleted, "asyncResult.IsCompleted"); 568Debug.Assert(null == state.asyncResponseStream, "non-null asyncResponseStream"); 642Debug.Assert(!queryResult.CompletedSynchronously || queryResult.IsCompletedInternally, "AsyncEndGetResponse !IsCompleted"); 650Debug.Assert(asyncResult != null && asyncResult.IsCompleted, "asyncResult.IsCompleted");
System\Data\Services\Client\ReferenceEqualityComparer.cs (1)
132Debug.Assert(!typeof(T).IsValueType, "!typeof(T).IsValueType -- can't use reference equality in a meaningful way with value types");
System\Data\Services\Client\SendingRequestEventArgs.cs (2)
42Debug.Assert(null != request, "null request"); 44Debug.Assert(null != requestHeaders, "null requestHeaders");
System\Data\Services\Client\Util.cs (9)
277Debug.Assert((null != baseUri) && baseUri.IsAbsoluteUri, "baseUri !IsAbsoluteUri"); 278Debug.Assert(String.IsNullOrEmpty(baseUri.Query) && String.IsNullOrEmpty(baseUri.Fragment), "baseUri has query or fragment"); 345Debug.Assert(null != array, "null array"); 414Debug.Assert((null != reader) && (null != localName) && (null != namespaceUri), "null"); 435Debug.Assert(type != null, "type != null"); 447Debug.Assert(type != null, "type != null"); 456Debug.Assert(collection != null, "collection != null"); 485Debug.Assert(type != null, "type != null"); 563Debug.Assert(XmlNodeType.Element == reader.NodeType, "not positioned on Element");
System\Data\Services\Client\WebUtil.cs (4)
51Debug.Assert(dataServiceCollectionAvailable != null, "observableCollectionOfTAvailable must not be null here."); 64Debug.Assert(null != input, "null input stream"); 65Debug.Assert(null != output, "null output stream"); 183Debug.Assert(
System\Data\Services\Client\Xml\XmlAtomErrorReader.cs (6)
29Debug.Assert(baseReader != null, "baseReader != null"); 63Debug.Assert(reader != null, "reader != null"); 64Debug.Assert(XmlNodeType.Element == reader.NodeType, "not positioned on Element"); 108Debug.Assert(reader != null, "reader != null"); 109Debug.Assert(reader.NodeType == XmlNodeType.Element, "reader.NodeType == XmlNodeType.Element"); 110Debug.Assert(reader.LocalName == XmlConstants.XmlErrorElementName, "reader.LocalName == XmlConstants.XmlErrorElementName");
System\Data\Services\Client\Xml\XmlWrappingReader.cs (1)
520Debug.Assert(!(newReader is XmlWrappingReader), "The new reader must not be a xmlWrappingReader");
System\Data\Services\Client\XmlUtil.cs (6)
158Debug.Assert(null != stream, "null stream"); 185Debug.Assert(null != encoding, "null != encoding"); 196Debug.Assert(!settings.CloseOutput, "!settings.CloseOutput -- otherwise default changed?"); 210Debug.Assert(null != stream, "null != stream"); 211Debug.Assert(null != encoding, "null != encoding"); 236Debug.Assert(element != null, "element != null");
System.Data.Services.Design (123)
parent\Server\System\Data\Services\Epm\EpmHelper.cs (1)
246Debug.Assert(Enum.GetNames(typeof(SyndicationItemProperty)).Count() == 12, "Any addition to SyndicationItemPropery enum requires updating this method.");
System\Data\Common\Utils\Memoizer.cs (1)
99Debug.Assert(null != createValueDelegate, "delegate must be given");
System\Data\Entity\Design\Common\UniqueIdentifierService.cs (3)
44Debug.Assert(!string.IsNullOrEmpty(identifier), "identifier is null or empty"); 56Debug.Assert(!_knownIdentifiers.Contains(adjustedIdentifier), "we just made it unique"); 61Debug.Assert(!_identifierToAdjustedIdentifier.ContainsKey(value), "should never register one value twice");
System\Data\EntityModel\DataServiceBuildProvider.cs (7)
153Debug.Fail("Shouldn't be given a null virtual path"); 172Debug.Assert(virtualPath.StartsWith(webReferencesRootVirtualPath, StringComparison.OrdinalIgnoreCase), 179Debug.Assert(string.Equals(webReferencesRootVirtualPath, virtualPath, StringComparison.OrdinalIgnoreCase), 215Debug.Fail("Shouldn't get a null app virtual path from the app domain"); 294Debug.Assert(!String.IsNullOrEmpty(mapFilePath), "mapFilePath cannot be null or empty"); 321System.Diagnostics.Debug.Assert(fileStream != null, "Couldn't find ServiceMapSchema.xsd resource"); 436Debug.Assert(node != null, "MetadataFile node must be present");
System\Data\EntityModel\Emitters\AssociationTypeEmitter.cs (1)
29Debug.Assert((base.Item as AssociationType).AssociationEndMembers.Count == 2, "must have exactly two ends");
System\Data\EntityModel\Emitters\AttributeEmitter.cs (11)
53Debug.Assert(emitter != null, "emitter should not be null"); 54Debug.Assert(typeDecl != null, "typeDecl should not be null"); 74Debug.Assert(emitter != null, "emitter should not be null"); 75Debug.Assert(typeDecl != null, "typeDecl should not be null"); 87Debug.Assert(emitter != null, "emitter should not be null"); 88Debug.Assert(typeDecl != null, "typeDecl should not be null"); 124Debug.Assert(emitter != null, "emitter should not be null"); 125Debug.Assert(typeDecl != null, "typeDecl should not be null"); 225Debug.Assert(baseEntityType != null, "Expecting non-null entity type"); 267Debug.Assert(baseEntityType != null, "Expecting non-null entity type"); 317Debug.Assert(complexProperty != null, "Expecting non-null complex property");
System\Data\EntityModel\Emitters\ClientApiGenerator.cs (8)
165Debug.Assert(edmItemCollection != null, "edmItemCollection is null"); 166Debug.Assert(generator != null, "generator is null"); 167Debug.Assert(errors != null, "errors is null"); 238Debug.Assert(target != null, "target parameter is null"); 380Debug.Assert(item != null); 411Debug.Assert(item != null); 510Debug.Assert(false, item.BuiltInTypeKind.ToString()); 611Debug.Assert(csdlNamespaceName != null, "csdlNamespaceName is null");
System\Data\EntityModel\Emitters\CommentEmitter.cs (15)
39Debug.Assert(item != null, "item parameter is null"); 40Debug.Assert(commentCollection != null, "commentCollection parameter is null"); 108Debug.Assert(commentCollection != null, "commentCollection parameter is null"); 124Debug.Assert(commentLines != null, "commentLines parameter is null"); 125Debug.Assert(commentCollection != null, "commentCollection parameter is null"); 144Debug.Assert(parameter != null, "parameter parameter is null"); 145Debug.Assert(comment != null, "comment parameter is null"); 164Debug.Assert(!string.IsNullOrEmpty(text)); 200Debug.Assert(start <= last); 292Debug.Assert(commentCollection != null); 308Debug.Assert(summaryComments != null); 309Debug.Assert(commentCollection != null); 323Debug.Assert(tag != null); 324Debug.Assert(summaryComments != null); 325Debug.Assert(commentCollection != null);
System\Data\EntityModel\Emitters\EntityContainerEmitter.cs (3)
450Debug.Assert(set != null, "Field is Null"); 468Debug.Assert(set != null, "Property is Null"); 587Debug.Assert(set != null, "Property is Null");
System\Data\EntityModel\Emitters\FixUpCollection.cs (1)
109Debug.Assert(false,"Unexpected language value: "+Language.ToString());
System\Data\EntityModel\Emitters\MetadataItemEmitter.cs (8)
23Debug.Assert(item != null, "item is null"); 84Debug.Assert(accessibility == MemberAttributes.Private || 98Debug.Assert(accessibility == MemberAttributes.Private, "did a new type get added?"); 129Debug.Assert(accessibility != null, "why does accessibility == null?"); 141Debug.Assert(accessibility == CodeGenerationValueAccessibilityPublic, "found an accessibility other than " + CodeGenerationValueAccessibilityPublic); 163Debug.Assert(attribute == MemberAttributes.Public, "found MemberAttribute other than " + CodeGenerationValueAccessibilityPublic); 175Debug.Assert(accessibility != null, "why does accessibility == null?"); 182Debug.Assert(accessibility == CodeGenerationValueAccessibilityPublic, "found an accessibility other than " + CodeGenerationValueAccessibilityPublic);
System\Data\EntityModel\Emitters\NavigationPropertyEmitter.cs (2)
70Debug.Assert(fieldType.TypeArguments.Count == 1, "Declare type is non generic."); 327Debug.Assert((BuiltInTypeKind.RefType == endMember.TypeUsage.EdmType.BuiltInTypeKind), "not a reference type");
System\Data\EntityModel\Emitters\PropertyEmitter.cs (6)
408Debug.Assert(GetAccessibilityRank(accessibility) >= 0, "bad accessibility"); 513Debug.Assert(Helper.IsComplexType(typeUsage.EdmType)); 520Debug.Fail("Unexpected Property.Type type: " + propertyType.GetType()); 528Debug.Assert(types.NonNullable != null && types.Nullable != null, "did you forget to set the types variable?"); 772Debug.Assert(collectionKind == CollectionKind.None, "Was another CollectionKind value added"); 837Debug.Assert(GetAccessibilityRank(scope) >= 0, "scope should only be an accessibility attribute");
System\Data\EntityModel\Emitters\PropertyEmitterBase.cs (1)
23Debug.Assert(item != null, "item is null");
System\Data\EntityModel\Emitters\Utils.cs (2)
110Debug.Assert(member is Type, "Did you add a new type of member?"); 297Debug.Assert(!string.IsNullOrEmpty(name), "name parameter is null or empty");
System\Data\EntityModel\EntityClassGenerator.cs (23)
201Debug.Assert(element != null, "element != null"); 202Debug.Assert(schemaNamespace != null, "schemaNamespace != null"); 203Debug.Assert(targetNamespace != null, "targetNamespace != null"); 204Debug.Assert( 282Debug.Assert(csdlSchema != null, "csdlSchema != null"); 285Debug.Assert(associationType != null, "associationType != null -- otherwise can't find TAssociation - CSDL resource has changed?"); 299Debug.Assert(referentialConstraint != null, "referentialConstraint != null"); 313Debug.Assert(csdlSchema != null, "csdlSchema != null"); 316Debug.Assert(entityContainerElement != null, "entityContainerElement != null -- otherwise can't find EntityContainer element- CSDL resource has changed?"); 346Debug.Assert(sourceReader != null, "sourceReader != null"); 362Debug.Assert(schemaElements.Count > 0, "schemaElements.Count > 0 -- otherwise TryCreateReadersV2 should have returned false"); 384Debug.Assert(result.Count == 0, "result.Count == 0 -- otherwise TryCreateReadesV2 should have returned true"); 398Debug.Assert(sourceDocument != null, "sourceDocument != null"); 399Debug.Assert(namespaceManager != null, "namespaceManager != null"); 400Debug.Assert(readers != null, "readers != null"); 401Debug.Assert(namespaceManager.HasNamespace("edmv1"), "namespaceManager.HasNamespace('edmv1')"); 402Debug.Assert(namespaceManager.HasNamespace("edmv1_1"), "namespaceManager.HasNamespace('edmv1_1')"); 436Debug.Assert(element != null, "element != null"); 448Debug.Assert(sourceDocument != null, "sourceDocument != null"); 449Debug.Assert(schemaElements != null, "schemaElements != null"); 500Debug.Assert(element != null, "element != null"); 501Debug.Assert(oldNamespaceName != null, "oldNamespaceName != null"); 502Debug.Assert(newNamespaceName != null, "newNamespaceName != null");
System\Data\EntityModel\LazyTextWriterCreator.cs (1)
30Debug.Assert(targetFilePath != null, "targetFilePath parameter is null");
System\Data\Services\Design\Xml\XNodeSchemaApplier.cs (29)
56Debug.Assert(schemas != null, "schemas != null"); 93Debug.Assert(schemas != null, "schemas != null"); 94Debug.Assert(element != null, "document != null"); 113Debug.Assert(element != null, "element != null"); 114Debug.Assert(elementName != null, "elementName != null"); 115Debug.Assert(expected != null, "expected != null"); 116Debug.Assert( 128Debug.Assert(schemaGroupRef == null, "schemaGroupRef == null -- the validator flattens this out as options."); 129Debug.Assert(schemaSequence == null, "schemaSequence == null -- the validator flattens this out and picks the right one in seq."); 130Debug.Assert(schemaAll == null, "schemaAll == null -- the validator flattens this out as options."); 131Debug.Assert(schemaChoice == null, "schemaChoice == null -- the validator flattens this out as options."); 135Debug.Assert( 168Debug.Assert(schemaObject != null, "schemaObject != null"); 177Debug.Assert(!String.IsNullOrEmpty(schema.TargetNamespace), "schema.TargetNamespace != null||'' -- otherwise this isn't CSDL"); 182Debug.Assert(schemaObject != null, "o != null -- otherwise the object isn't parented to a schema"); 196Debug.Assert(element != null, "element != null"); 197Debug.Assert(expectedParticles != null, "expectedParticles != null"); 218Debug.Assert(attribute != null, "attribute != null"); 219Debug.Assert(expectedAttributes != null, "expectedAttributes != null"); 220Debug.Assert(expectedAttributes.All(a => a.Form != XmlSchemaForm.Qualified), "expectedAttributes.All(a => a.Form != XmlSchemaForm.Qualified)"); 236Debug.Assert( 263Debug.Assert(name != null, "name != null"); 271Debug.Assert(element != null, "element != null"); 321Debug.Assert(element != null, "e != null"); 354Debug.Assert(element != null, "e != null"); 372Debug.Assert(e != null, "e != null"); 403Debug.Assert(element != null, "e != null"); 439Debug.Assert(parent != null, "parent != null"); 452Debug.Assert(expectedParticles != null, "expectedParticles != null -- GetExpectedParticles should return empty at worst");
System.Data.SqlXml (1363)
System\Xml\Xsl\IlGen\GenerateHelper.cs (33)
142Debug.Assert(constrInfo != null, "Constructor " + className + " cannot be null."); 148Debug.Assert(constrInfo != null, "Constructor " + className + " cannot be null."); 416Debug.Assert(methInfo != null, "Method " + className.Name + "." + methName + " cannot be null."); 422Debug.Assert(methInfo != null, "Method " + methName + " cannot be null."); 609default: Debug.Assert(false); return; 825Debug.Assert(!(methInfo is ConstructorBuilder)); 871Debug.Assert(false, "Shouldn't be called"); 886Debug.Assert(clrTypeDst == typeof(object), "Invalid cast, since value types do not allow inheritance."); 891Debug.Assert(clrTypeSrc == typeof(object), "Invalid cast, since value types do not allow inheritance."); 898Debug.Assert(clrTypeSrc.IsAssignableFrom(clrTypeDst) || clrTypeDst.IsAssignableFrom(clrTypeSrc), 948default: Debug.Assert(false, opType + " must be an arithmetic operation."); break; 960default: Debug.Assert(false, opType + " must be an arithmetic operation."); break; 967Debug.Assert(false, "The " + opType + " arithmetic operation cannot be performed on values of type " + code + "."); 980Debug.Assert(false, "Type " + code + " does not support the equals operation."); 994Debug.Assert(false, "Type " + code + " does not support the equals operation."); 1063Debug.Assert(nameType == GenerateNameType.TagNameAndNamespace); 1146default: Debug.Assert(false, nameType + " is invalid here."); break; 1154default: Debug.Assert(false, nameType + " is invalid here."); break; 1174default: Debug.Assert(false, nameType + " is invalid here."); break; 1199default: Debug.Assert(false, nameType + " is invalid here."); break; 1207default: Debug.Assert(false, nameType + " is invalid here."); break; 1327Debug.Assert(keyType.IsAtomicValue, "Sort key must have atomic value type."); 1345Debug.Assert(false, "Heterogenous sort key is not allowed."); 1349Debug.Assert(false, "Sorting over datatype " + keyType.TypeCode + " is not allowed."); 1380Debug.Assert(this.isDebug && this.lastSourceInfo != null); 1381Debug.Assert(sourceInfo != null); 1410Debug.Assert(this.module.EmitSymbols); 1517Debug.Assert(opcode.OperandType == OperandType.ShortInlineI); 1526Debug.Assert(opcode.OperandType == OperandType.InlineI || opcode.OperandType == OperandType.InlineVar); 1535Debug.Assert(opcode.OperandType == OperandType.InlineI8); 1544Debug.Assert(!opcode.Equals(OpCodes.Br) && !opcode.Equals(OpCodes.Br_S), "Use EmitUnconditionalBranch and be careful not to emit unverifiable code."); 1574Debug.Assert(!opcode.Equals(OpCodes.Call) && !opcode.Equals(OpCodes.Callvirt), "Use Call so that debug information will be output correctly."); 1645Debug.Assert(opcode.Equals(OpCodes.Brtrue) || opcode.Equals(OpCodes.Brtrue_S) ||
System\Xml\Xsl\IlGen\IteratorDescriptor.cs (10)
90Debug.Assert(loc.LocalType == itemStorageType || 106Debug.Assert(locIter.LocalType.GetMethod("get_Current").ReturnType == itemStorageType, 120Debug.Assert(methGlobal.ReturnType == itemStorageType || 289Debug.Assert(this.hasNext); 351Debug.Assert(this.storage.IsCached); 419Debug.Assert(brctxt != BranchingContext.None); 481Debug.Assert(false, "Invalid location: " + this.storage.Location); 508Debug.Assert(false, "Invalid location: " + this.storage.Location); 600Debug.Assert(this.storage.ItemStorageType == typeof(XPathItem) || storageTypeDest == typeof(XPathItem), 637Debug.Assert(storageTypeDest == typeof(XPathItem), "Must be converting from XPathNavigator to XPathItem");
System\Xml\Xsl\IlGen\OptimizerPatterns.cs (7)
190Debug.Assert(!this.isReadOnly, "This OptimizerPatterns instance is read-only."); 197Debug.Assert(false, "Cannot handle more than 2 arguments."); 214Debug.Assert(arg != null, "There is no '" + argNum + "' argument."); 222Debug.Assert(Enum.IsDefined(typeof(OptimizerPatternName), pattern)); 223Debug.Assert((int) pattern < 32); 224Debug.Assert(!this.isReadOnly, "This OptimizerPatterns instance is read-only."); 232Debug.Assert(Enum.IsDefined(typeof(OptimizerPatternName), pattern));
System\Xml\Xsl\IlGen\StaticDataManager.cs (2)
119Debug.Assert(ndNmspDecl != null); 120Debug.Assert(ndNmspDecl.Left is QilLiteral && ndNmspDecl.Right is QilLiteral);
System\Xml\Xsl\IlGen\TailCallAnalyzer.cs (1)
36Debug.Assert(XmlILConstructInfo.Read(nd).PushToWriterLast,
System\Xml\Xsl\IlGen\XmlILConstructAnalyzer.cs (28)
122Debug.Assert(!this.isReadOnly, "This XmlILConstructInfo instance is read-only."); 133Debug.Assert(!this.isReadOnly, "This XmlILConstructInfo instance is read-only."); 144Debug.Assert(!this.isReadOnly, "This XmlILConstructInfo instance is read-only."); 155Debug.Assert(!this.isReadOnly, "This XmlILConstructInfo instance is read-only."); 166Debug.Assert(!this.isReadOnly, "This XmlILConstructInfo instance is read-only."); 177Debug.Assert(!this.isReadOnly, "This XmlILConstructInfo instance is read-only."); 178Debug.Assert(value); 198Debug.Assert(!this.isReadOnly, "This XmlILConstructInfo instance is read-only."); 199Debug.Assert(value); 219Debug.Assert(!this.isReadOnly, "This XmlILConstructInfo instance is read-only."); 220Debug.Assert(value); 241Debug.Assert(!this.isReadOnly, "This XmlILConstructInfo instance is read-only."); 266Debug.Assert(!this.isReadOnly, "This XmlILConstructInfo instance is read-only."); 278Debug.Assert(!this.isReadOnly, "This XmlILConstructInfo instance is read-only."); 290Debug.Assert(!this.isReadOnly, "This XmlILConstructInfo instance is read-only."); 302Debug.Assert(!this.isReadOnly, "This XmlILConstructInfo instance is read-only."); 314Debug.Assert(!this.isReadOnly, "This XmlILConstructInfo instance is read-only."); 402Debug.Assert(ndContent != null); 444case QilNodeType.NamespaceDecl: Debug.Assert(ndContent == null); break; 445case QilNodeType.TextCtor: Debug.Assert(ndContent == null); break; 446case QilNodeType.RawTextCtor: Debug.Assert(ndContent == null); break; 450case QilNodeType.XsltCopyOf: Debug.Assert(ndContent == null); break; 454default: Debug.Assert(false, ndConstr.NodeType + " is not handled by XmlILStateAnalyzer."); break; 654Debug.Assert(!typ.IsSingleton); 688Debug.Assert(!typ.IsSingleton); 733Debug.Assert(ndElem.NodeType == QilNodeType.ElementCtor); 964Debug.Assert(nd.NodeType == QilNodeType.NamespaceDecl); 997Debug.Assert(nd.NodeType != QilNodeType.NamespaceDecl || !this.nsmgr.HasNamespace(prefix) || this.nsmgr.LookupNamespace(prefix) == ns,
System\Xml\Xsl\IlGen\XmlILModule.cs (5)
109Debug.Assert(!(useLRE && emitSymbols)); 254Debug.Assert(!this.useLRE, "Cannot create initialized data for an LRE module"); 262Debug.Assert(!this.useLRE, "Cannot create field for an LRE module"); 270Debug.Assert(!this.useLRE, "Cannot create type initializer for an LRE module"); 279Debug.Assert(this.emitSymbols, "Cannot add source information to a module that doesn't allow symbols.");
System\Xml\Xsl\IlGen\XmlILOptimizerVisitor.cs (6)
4033Debug.Assert(nd is QilLiteral, "All literals except True, False, and QName must use QilLiteral"); 4154Debug.Assert(left.XmlType == right.XmlType, "Comparison is not defined between " + left.XmlType + " and " + right.XmlType); 4187Debug.Assert(false, "Cannot fold this comparison operation: " + opType); 4205Debug.Assert(left.NodeType == right.NodeType); 4283Debug.Assert(false, "Cannot fold this arithmetic operation: " + opType); 4333Debug.Assert(nd.NodeType == QilNodeType.Let || nd.NodeType == QilNodeType.Parameter, "Unexpected type of a global");
System\Xml\Xsl\IlGen\XmlIlVisitor.cs (90)
70Debug.Assert(this.iterCurr.Storage.Location == ItemLocation.None, "Root expression should have been pushed to the writer."); 85Debug.Assert(iter.NodeType == QilNodeType.Let || iter.NodeType == QilNodeType.Parameter); 89Debug.Assert(methGlobal != null, "Metadata for global value should have already been computed"); 138Debug.Assert(iter.XmlType == TypeFactory.ItemS, "IlGen currently only supports parameters of type item*."); 180Debug.Assert(iter.NodeType == QilNodeType.Parameter, "Only parameters may not have a default value"); 208Debug.Assert(iter.NodeType == QilNodeType.Parameter); 236Debug.Assert(iter.XmlType == TypeFactory.ItemS, "IlGen currently only supports default values in parameters of type item*."); 299Debug.Assert(nd.XmlType.IsSingleton || CachesResult(nd) || this.iterCurr.HasLabelNext, 316Debug.Fail("Visit" + parent.NodeType + " should never be called"); 706Debug.Assert(this.iterCurr.CurrentBranchingContext == BranchingContext.None); 787Debug.Assert(this.iterCurr.CurrentBranchingContext == BranchingContext.None); 846Debug.Assert(info.ConstructMethod == XmlILConstructMethod.Iterator); 849Debug.Assert(ndCond.Left.XmlType.TypeCode == XmlTypeCode.Boolean); 883Debug.Assert(!ndCond.Center.XmlType.IsSingleton || !ndCond.Right.XmlType.IsSingleton); 913Debug.Assert(ndBranch.XmlType.IsSingleton, "Conditional must produce a singleton"); 917Debug.Assert(itemStorageType == typeof(bool)); 940Debug.Assert(XmlILConstructInfo.Read(ndChoice).PushToWriterFirst); 1063Debug.Assert(XmlILConstructInfo.Read(nd).PullFromIteratorFirst, "VisitEmpty should only be called if items are iterated"); 1083Debug.Assert(XmlILConstructInfo.Read(ndSeq).ConstructMethod == XmlILConstructMethod.Iterator, "This method should only be called if items in list are pulled from a code iterator."); 1400Debug.Assert(!ndStrConcat.Values.XmlType.IsSingleton, "Optimizer should have folded StrConcat of a singleton value"); 1508Debug.Assert(ndParsedTagName.Right.XmlType.IsSingleton); 1583Debug.Assert(ndComp.Left.XmlType.IsAtomicValue && ndComp.Right.XmlType.IsAtomicValue, "Operands to compare must be atomic values."); 1584Debug.Assert(ndComp.Left.XmlType.IsSingleton && ndComp.Right.XmlType.IsSingleton, "Operands to compare must be cardinality one."); 1585Debug.Assert(ndComp.Left.XmlType == ndComp.Right.XmlType, "Operands to compare may not be heterogenous."); 1619Debug.Assert(code != XmlTypeCode.QName, "QName values do not support the " + relOp + " operation"); 1638Debug.Fail("Comparisons for datatype " + code + " are invalid."); 1877Debug.Assert(false, "Pattern " + step.NodeType + " should have been handled."); 1954Debug.Assert(ndIter != null); 1965Debug.Assert(ndIter.NodeType == QilNodeType.Let || ndIter.NodeType == QilNodeType.Parameter); 1966Debug.Assert(!patt.MatchesPattern(OptimizerPatternName.IsPositional)); 1982Debug.Assert(ndFor.XmlType.IsSingleton); 2039Debug.Assert(!ndLet.XmlType.IsSingleton); 2068Debug.Assert(ndIter != null); 2081Debug.Assert(ndIter.NodeType == QilNodeType.For); 2084Debug.Assert(locPos != null); 2097Debug.Assert(ndSort.Variable.NodeType == QilNodeType.For); 2118Debug.Assert(!this.iterNested.Storage.IsCached); 2161Debug.Assert(ndKey.Key.XmlType.IsAtomicValue, "Sort key must be an atomic value."); 2258Debug.Assert(pattStep.MatchesPattern(OptimizerPatternName.Axis), "Dod patterns should only match if step is FilterElements or FilterKindTest or Axis"); 2293Debug.Assert(false, "Pattern " + step.NodeType + " should have been handled."); 2317Debug.Assert(false, "Pattern " + step.NodeType + " should have been handled."); 2339Debug.Assert(this.iterCurr.Storage.IsCached, "DodMerge pattern should only be matched when cached sequences are returned from loop"); 2367Debug.Assert(!XmlILConstructInfo.Read(ndInvoke).PushToWriterFirst || useWriter); 2410Debug.Assert(ndName != null, "Attribute node must have a literal QName as its second argument"); 2577Debug.Assert(XmlILConstructInfo.Read(ndElem).PushToWriterFirst, "Element contruction should always be pushed to writer."); 2626Debug.Assert(XmlILConstructInfo.Read(ndAttr).PushToWriterFirst, "Attribute construction should always be pushed to writer."); 2659Debug.Assert(XmlILConstructInfo.Read(ndComment).PushToWriterFirst, "Comment construction should always be pushed to writer."); 2678Debug.Assert(XmlILConstructInfo.Read(ndPI).PushToWriterFirst, "PI construction should always be pushed to writer."); 2715Debug.Assert(info.PushToWriterFirst, "Text construction should always be pushed to writer."); 2772Debug.Assert(XmlILConstructInfo.Read(ndDoc).PushToWriterFirst, "Document root construction should always be pushed to writer."); 2794Debug.Assert(info.PushToWriterFirst, "Namespace construction should always be pushed to writer."); 2915Debug.Assert(false); 2955Debug.Assert(!typDerived.NeverSubtypeOf(typBase), "Normalizer should have eliminated IsType where source can never be a subtype of destination type."); 2960Debug.Assert(this.iterCurr.Storage.ItemStorageType == typeof(XPathItem), "If !IsNode, then storage type should be Item"); 3033Debug.Assert((typDerived.NodeKinds & kinds) != XmlNodeKindFlags.None, "Normalizer should have taken care of case where node kinds are disjoint."); 3137Debug.Assert(this.iterCurr.CurrentBranchingContext == BranchingContext.None); 3198Debug.Assert(ndVal.Child.XmlType.IsNode, "XPathNodeValue node may only be applied to a sequence of Nodes."); 3312Debug.Assert(XmlILConstructInfo.Read(ndInvoke).ConstructMethod != XmlILConstructMethod.Writer); 3390Debug.Assert(ndActualArg.XmlType.IsSubtypeOf(xmlTypeFormalArg), "Xml type of actual arg must be a subtype of the Xml type of the formal arg"); 3417Debug.Fail("Internal Xslt library may not use parameters of type " + clrTypeFormalArg); 3474Debug.Assert(XmlILConstructInfo.Read(ndCopy).PushToWriterFirst); 3480Debug.Assert(ndCopy.Left.XmlType.IsNode); 3492Debug.Assert(ndCopy.Left.XmlType.IsNode); 3507Debug.Assert(XmlILConstructInfo.Read(ndCopyOf).PushToWriterFirst, "XsltCopyOf should always be pushed to writer."); 3536Debug.Fail("Conversion from " + ndConv.Source.XmlType + " to " + ndConv.TargetType + " is not supported."); 3699Debug.Assert(ndDod.NodeType == QilNodeType.DocOrderDistinct && ndLoop != null); 3811Debug.Assert(ndName.XmlType.TypeCode == XmlTypeCode.QName, "Element or attribute name must have QName type."); 3828Debug.Assert(ValidateNames.ValidateName(prefix, localName, ns, nodeType, ValidateNames.Flags.AllExceptPrefixMapping)); 3895Debug.Assert(relOp == QilNodeType.Eq || relOp == QilNodeType.Ne); 3932Debug.Assert(relOp == QilNodeType.Eq || relOp == QilNodeType.Ne); 3954Debug.Assert(ndSecond.NodeType == QilNodeType.NameOf); 3992default: Debug.Assert(false); opcode = OpCodes.Nop; break; 4004default: Debug.Assert(false); opcode = OpCodes.Nop; break; 4019default: Debug.Assert(false); opcode = OpCodes.Nop; break; 4026Debug.Assert(this.iterCurr.CurrentBranchingContext == BranchingContext.None); 4036default: Debug.Assert(false); opcode = OpCodes.Nop; break; 4056Debug.Assert(relOp == QilNodeType.Eq || relOp == QilNodeType.Ne); 4075Debug.Assert(this.iterCurr.CurrentBranchingContext == BranchingContext.None); 4242Debug.Assert(xmlTypes == XmlNodeKindFlags.PI); 4261Debug.Assert(false, "Cannot map QilNodeType " + typ + " to an XPathNodeType"); 4271Debug.Assert(xmlTypes == XmlNodeKindFlags.Element); 4277Debug.Assert(!isXmlTypeUnion || (xmlTypes & XmlNodeKindFlags.Content) == XmlNodeKindFlags.Content); 4337Debug.Assert(this.iterCurr.Storage.Location == ItemLocation.None || 4406Debug.Assert(!XmlILConstructInfo.Read(nd).PushToWriterLast); 4419Debug.Assert(!XmlILConstructInfo.Read(nd).PushToWriterLast); 4436Debug.Assert(!XmlILConstructInfo.Read(nd).PushToWriterLast); 4445Debug.Assert(!XmlILConstructInfo.Read(nd).PushToWriterLast); 4454Debug.Assert(nd.XmlType.IsSingleton && !XmlILConstructInfo.Read(nd).PushToWriterLast); 4467Debug.Assert(!XmlILConstructInfo.Read(nd).PushToWriterLast); 4480Debug.Assert(this.iterCurr.Storage.IsCached, "Expression result should be cached. CachesResult() might have a bug in it.");
System\Xml\Xsl\QIL\QilList.cs (1)
54Debug.Assert(!xt.IsDod, "Sequences do not preserve DocOrderDistinct");
System\Xml\Xsl\QIL\QilPatternFactory.cs (8)
28Debug.Assert(f != null); 222Debug.Assert(arg != null, "Argulent shouldn't be null"); 223Debug.Assert(arg.XmlType.TypeCode == XmlTypeCode.Boolean && arg.XmlType.IsSingleton, 533Debug.Assert(args.NodeType == QilNodeType.FormalParameterList); 537Debug.Assert(args.NodeType == QilNodeType.FormalParameterList); 542Debug.Assert(args.NodeType == QilNodeType.ActualParameterList); 543Debug.Assert(func.Arguments.Count == args.Count); 678Debug.Assert(t != null, "Type can't be null");
System\Xml\Xsl\QIL\QilReplaceVisitor.cs (1)
79Debug.Assert(newType.IsSubtypeOf(XmlQueryTypeFactory.AtMost(oldType, oldType.Cardinality)), "Replace shouldn't relax original type");
System\Xml\Xsl\QIL\QilValidationVisitor.cs (2)
42Debug.Assert(node != null); 175Debug.Assert(false, message);
System\Xml\Xsl\QIL\QilXmlReader.cs (26)
95Debug.Fail("Unexpected event " + r.NodeType + ", value " + r.Value); 100Debug.Assert(this.fwdDecls.Keys.Count == 0, "One or more forward declarations were never defined"); 101Debug.Assert(this.stk.Peek()[0].NodeType == QilNodeType.QilExpression, "Serialized qil tree did not contain a QilExpression node"); 139Debug.Assert(nd != null, "LiteralQName element must have a name attribute"); 140Debug.Assert(r.IsEmptyElement, "LiteralQName element must be empty"); 196Debug.Assert(list.Count > 0, "QilExpression node requires a Root expression"); 234Debug.Assert(id != null, r.LocalName + " must have an id attribute"); 235Debug.Assert(!this.inFwdDecls || ann.XmlType != null, "Forward decl for " + r.LocalName + " '" + id + "' must have an xmlType attribute"); 240Debug.Assert(list.Count <= (this.inFwdDecls ? 0 : 1), "Parameter '" + id + "' must have 0 or 1 arguments"); 241Debug.Assert(ann.XmlType != null, "Parameter '" + id + "' must have an xmlType attribute"); 249Debug.Assert(list.Count == (this.inFwdDecls ? 0 : 1), "Let '" + id + "' must have 0 or 1 arguments"); 257Debug.Assert(list.Count == 1, "For '" + id + "' must have 1 argument"); 262Debug.Assert(list.Count == (this.inFwdDecls ? 2 : 3), "Function '" + id + "' must have 2 or 3 arguments"); 275Debug.Assert(!this.scope.ContainsKey(id), "Multiple nodes have id '" + id + "'"); 282Debug.Assert(r.LocalName == Enum.GetName(typeof(QilNodeType), nd.NodeType), "Id '" + id + "' is not not bound to a " + r.LocalName + " forward decl"); 291Debug.Assert(!this.scope.ContainsKey(id), "Id '" + id + "' is already in scope"); 302Debug.Assert(id != null, r.LocalName + " must have an id attribute"); 304Debug.Assert(this.scope.ContainsKey(id), "Id '" + id + "' is not in scope"); 342Debug.Assert(ann.ClrNamespace != null, "XsltInvokeEarlyBound must have a clrNamespace attribute"); 343Debug.Assert(list.Count == 2, "XsltInvokeEarlyBound must have exactly 2 arguments"); 344Debug.Assert(list.XmlType != null, "XsltInvokeEarlyBound must have an xmlType attribute"); 356Debug.Assert(mi != null, "Cannot find method " + ann.ClrNamespace + "." + name.ToString()); 364Debug.Assert(nameToFactoryMethod.ContainsKey(r.LocalName), "Method " + r.LocalName + " could not be found on QilFactory"); 366Debug.Assert(facMethod.GetParameters().Length == list.Count, "NodeType " + r.LocalName + " does not allow " + list.Count + " parameters"); 408Debug.Assert(m.Success && m.Groups.Count == 5, "Malformed lineInfo attribute"); 422Debug.Assert(m.Success && m.Groups.Count == 4, "Malformed Type info");
System\Xml\Xsl\QIL\SubstitutionList.cs (2)
47Debug.Assert(n >= 0, "n must be nonnegative"); 60Debug.Assert(s.Count % 2 == 0);
System\Xml\Xsl\QIL\WhitespaceRule.cs (1)
72Debug.Assert(this.GetType() == typeof(WhitespaceRule), "Serialization of WhitespaceRule subclasses is not implemented");
System\Xml\Xsl\QueryReaderSettings.cs (1)
28Debug.Assert(xmlNameTable != null);
System\Xml\Xsl\Runtime\ContentIterators.cs (3)
107Debug.Assert(nodeType != XPathNodeType.Attribute && nodeType != XPathNodeType.Namespace); 379Debug.Assert(false, "Invalid IteratorState " + this.state); 399Debug.Assert(this.state == IteratorState.HaveCurrentHaveNext);
System\Xml\Xsl\Runtime\DecimalFormatter.cs (3)
44Debug.Assert(formatPicture != null && decimalFormat != null); 225Debug.Assert(i+1 < result.Length); 227Debug.Assert('0' <= ch && ch <= '9' || ch == EscChar);
System\Xml\Xsl\Runtime\DocumentOrderComparer.cs (1)
41Debug.Assert(GetDocumentIndex(navThis) != GetDocumentIndex(navThat));
System\Xml\Xsl\Runtime\DodSequenceMerge.cs (1)
89Debug.Assert(this.sequencesToMerge.Count == 1, "While loop should terminate when count == 1");
System\Xml\Xsl\Runtime\EarlyBoundInfo.cs (2)
22Debug.Assert(namespaceUri != null && ebType != null); 27Debug.Assert(this.constrInfo != null, "The early bound object type " + ebType.FullName + " must have a public default constructor");
System\Xml\Xsl\Runtime\NumberFormatter.cs (3)
80Debug.Assert(1 <= val && val <= MaxAlphabeticValue); 81Debug.Assert(Math.Pow(totalChars, MaxAlphabeticLength) >= MaxAlphabeticValue); 104Debug.Assert(1 <= val && val <= MaxRomanValue);
System\Xml\Xsl\Runtime\SetIterators.cs (2)
199Debug.Assert(nestedNavigator == null, "null is passed to MoveNext after IteratorState.HaveCurrent has been returned."); 290Debug.Assert(nestedNavigator == null, "null is passed to MoveNext after IteratorState.HaveCurrent has been returned.");
System\Xml\Xsl\Runtime\StringConcat.cs (1)
53Debug.Assert(value != null);
System\Xml\Xsl\Runtime\TreeIterators.cs (4)
453Debug.Assert(this.state == IteratorState.HaveCurrentHaveNext || this.state == IteratorState.HaveCurrentNoNext); 476Debug.Assert(this.state == IteratorState.HaveCurrentHaveNext || this.state == IteratorState.HaveCurrentNoNext); 757Debug.Assert(this.state == IteratorState.HaveCurrentHaveNext || this.state == IteratorState.HaveCurrentNoNext); 843Debug.Assert(this.state == IteratorState.NoNext, "Illegal state: " + this.state);
System\Xml\Xsl\Runtime\WhitespaceRuleLookup.cs (7)
38Debug.Assert(rules != null); 82Debug.Assert(this.nameTable != null && this.ruleTemp != null); 83Debug.Assert(localName != null && (object) this.nameTable.Get(localName) == (object) localName); 84Debug.Assert(namespaceName != null && (object) this.nameTable.Get(namespaceName) == (object) namespaceName); 153Debug.Assert(obj is InternalWhitespaceRule); 156Debug.Assert(LocalName != null && that.LocalName != null); 157Debug.Assert(NamespaceName != null && that.NamespaceName != null);
System\Xml\Xsl\Runtime\WhitespaceRuleReader.cs (1)
48Debug.Assert(wsRules != null);
System\Xml\Xsl\Runtime\XmlAttributeCache.cs (12)
85Debug.Assert(localName != null && localName.Length != 0 && prefix != null && ns != null); 93Debug.Assert(this.numEntries != 0); 136Debug.Assert(text != null); 137Debug.Assert(this.arrAttrs != null && this.numEntries != 0); 147Debug.Assert(value is XmlAtomicValue, "value should always be an XmlAtomicValue, as XmlAttributeCache is only used by XmlQueryOutput"); 148Debug.Assert(this.arrAttrs != null && this.numEntries != 0); 169Debug.Assert(false, "Should never be called on XmlAttributeCache."); 172Debug.Assert(false, "Should never be called on XmlAttributeCache."); 175Debug.Assert(false, "Should never be called on XmlAttributeCache."); 178Debug.Assert(false, "Should never be called on XmlAttributeCache."); 181Debug.Assert(false, "Should never be called on XmlAttributeCache."); 327Debug.Assert(this.numEntries == this.arrAttrs.Length);
System\Xml\Xsl\Runtime\XmlCollation.cs (3)
95Debug.Assert(((int)value & Mask) == 0); 141Debug.Assert(collationLiteral != null, "collation literal should not be null"); 326Debug.Assert(this.cultInfo == null || this.cultInfo.Equals(new CultureInfo(this.cultInfo.LCID)),
System\Xml\Xsl\Runtime\XmlExtensionFunction.cs (4)
197Debug.Assert(methMatch.ContainsGenericParameters == false); 252Debug.Assert(this.meth != null, "Must call Bind() before calling Invoke."); 253Debug.Assert(args.Length == this.argClrTypes.Length, "Mismatched number of actual and formal arguments."); 274Debug.Assert(that != null);
System\Xml\Xsl\Runtime\XmlILIndex.cs (1)
44Debug.Assert(navigator.ComparePosition(seq[seq.Count - 1]) >= 0, "Index nodes must be added in document order");
System\Xml\Xsl\Runtime\XmlNavigatorFilter.cs (2)
148Debug.Assert(TypeFilters[(int) nodeType] != null); 156Debug.Assert(nodeType != XPathNodeType.Attribute && nodeType != XPathNodeType.Namespace);
System\Xml\Xsl\Runtime\XmlNavigatorStack.cs (2)
53Debug.Assert(!IsEmpty); 61Debug.Assert(!IsEmpty);
System\Xml\Xsl\Runtime\XmlQueryContext.cs (3)
155Debug.Assert(dataSource != null, "GetType() below assumes dataSource is not null"); 182Debug.Assert(uriRelative != null, "Relative URI should not be null"); 275Debug.Fail("This XmlTypeCode should never be inferred from a Clr type: " + xmlTypeFormalArg.TypeCode);
System\Xml\Xsl\Runtime\XmlQueryOutput.cs (47)
153Debug.Assert(prefix != null && localName != null && localName.Length != 0 && ns != null, "Invalid argument"); 154Debug.Assert(ValidateNames.ValidateName(prefix, localName, ns, XPathNodeType.Element, ValidateNames.Flags.All), "Name validation failed"); 209Debug.Assert(prefix != null && localName != null && ns != null, "Invalid argument"); 217Debug.Assert(ValidateNames.ValidateName(prefix, localName, ns, XPathNodeType.Attribute, ValidateNames.Flags.All)); 383Debug.Assert(this.xstate == XmlState.WithinSequence, "StartTree cannot be called in the " + this.xstate + " state."); 393Debug.Assert(this.xstate == XmlState.EnumAttrs || this.xstate == XmlState.WithinContent, "EndTree cannot be called in the " + this.xstate + " state."); 408Debug.Assert(this.xstate == XmlState.WithinContent, "WriteStartElement cannot be called in the " + this.xstate + " state."); 429Debug.Assert(this.xstate == XmlState.EnumAttrs, "StartElementContent cannot be called in the " + this.xstate + " state."); 443Debug.Assert(this.xstate == XmlState.EnumAttrs || this.xstate == XmlState.WithinContent, "WriteEndElement cannot be called in the " + this.xstate + " state."); 461Debug.Assert(this.xstate == XmlState.EnumAttrs, "WriteStartAttribute cannot be called in the " + this.xstate + " state."); 478Debug.Assert(this.xstate == XmlState.WithinAttr, "WriteEndAttribute cannot be called in the " + this.xstate + " state."); 492Debug.Assert(prefix != null && ns != null); 493Debug.Assert(this.xstate == XmlState.EnumAttrs, "WriteNamespaceDeclaration cannot be called in the " + this.xstate + " state."); 496Debug.Assert(prefix.Length == 0 || ns.Length != 0); 523Debug.Assert(this.xstate != XmlState.WithinSequence && this.xstate != XmlState.EnumAttrs, "WriteTextBlock cannot be called in the " + this.xstate + " state."); 531Debug.Assert(this.xstate != XmlState.WithinSequence && this.xstate != XmlState.EnumAttrs, "WriteTextBlockNoEntities cannot be called in the " + this.xstate + " state."); 544Debug.Assert(this.depth == 0, "Root node can only be constructed at top-level."); 556Debug.Assert(this.depth == 1, "Root node can only be constructed at top-level."); 636Debug.Assert(prefix != null && ns != null); 677Debug.Assert(prefix != null, "Invalid argument"); 692Debug.Assert(this.xstate == XmlState.WithinNmsp, "WriteNamespaceString cannot be called in the " + this.xstate + " state."); 700Debug.Assert(this.xstate == XmlState.WithinNmsp, "WriteEndNamespace cannot be called in the " + this.xstate + " state."); 728Debug.Assert(this.xstate == XmlState.WithinComment, "WriteCommentString cannot be called in the " + this.xstate + " state."); 736Debug.Assert(this.xstate == XmlState.WithinComment, "WriteEndComment cannot be called in the " + this.xstate + " state."); 768Debug.Assert(this.xstate == XmlState.WithinPI, "WriteProcessingInstructionString cannot be called in the " + this.xstate + " state."); 776Debug.Assert(this.xstate == XmlState.WithinPI, "WriteEndProcessingInstruction cannot be called in the " + this.xstate + " state."); 804Debug.Assert(this.xstate == XmlState.WithinSequence, "Values can only be written at the top-level."); 850Debug.Assert(navigator.NodeType == XPathNodeType.Element, "StartCopy should return true only for Element nodes."); 868Debug.Assert(navigator.NodeType == XPathNodeType.Root, "EndCopy should only be called for Element and Document nodes."); 889Debug.Assert(text != null, "Invalid argument"); 929Debug.Assert(false, "Text cannot be output in the " + this.xstate + " state."); 944Debug.Assert(navigator != null); 949Debug.Assert(nodeType == XPathNodeType.Element, "StartCopy should return true only for Element nodes."); 1063Debug.Assert(this.xstate != XmlState.WithinSequence, "StartCopy should not called if state is WithinSequence"); 1080Debug.Assert(false); 1092Debug.Assert(navigator.NodeType == XPathNodeType.Element); 1093Debug.Assert(this.xstate == XmlState.WithinContent, "EndCopy cannot be called in the " + this.xstate + " state."); 1105Debug.Assert(navigator.NodeType == XPathNodeType.Element, "Only elements have namespaces to copy"); 1109Debug.Assert(navigator.LocalName.Length != 0, "xmlns:foo='' isn't allowed"); 1139Debug.Assert(rootType == XPathNodeType.Element || rootType == XPathNodeType.Comment || rootType == XPathNodeType.ProcessingInstruction); 1168Debug.Assert(rootType == XPathNodeType.Attribute || rootType == XPathNodeType.Namespace); 1196Debug.Assert(this.nsmgr != null); 1215Debug.Assert(false, xstate.ToString() + " is not a valid XmlState."); 1225Debug.Assert(prefix.Length != 0 && ns.Length != 0); 1268Debug.Assert(prefix != null && ns != null && ns.Length != 0); 1367Debug.Assert(ValidateNames.ParseNCName(name.Name, 0) == name.Name.Length); 1413Debug.Assert(this.stkNames != null);
System\Xml\Xsl\Runtime\XmlQueryRuntime.cs (22)
81Debug.Assert(data != null); 174Debug.Assert(IsGlobalComputed(idx), "Cannot get the value of a global value until it has been computed."); 175Debug.Assert(this.globalValues[idx] is IList<XPathItem>, "Only debugger should call this method, and all global values should have type item* in debugging scenarios."); 188Debug.Assert(IsGlobalComputed(idx), "Cannot get the value of a global value until it has been computed."); 189Debug.Assert(this.globalValues[idx] is IList<XPathItem>, "Only debugger should call this method, and all global values should have type item* in debugging scenarios."); 249Debug.Assert(this.earlyObjects != null && index < this.earlyObjects.Length, "Early bound object does not exist"); 293Debug.Assert(IsGlobalComputed(index), "Cannot get the value of a global value until it has been computed."); 302Debug.Assert(!IsGlobalComputed(index), "Global value should only be set once."); 322Debug.Assert(this.atomizedNames != null); 330Debug.Assert(this.filters != null); 379Debug.Assert(this.prefixMappingsList != null); 450Debug.Assert(this.types != null); 466Debug.Assert(XmlILTypeHelper.GetStorageType(xmlType).IsAssignableFrom(value.GetType()), 468Debug.Assert(destinationType == XsltConvert.ObjectType || !destinationType.IsAssignableFrom(value.GetType()), 483Debug.Assert(xmlType != XmlQueryTypeFactory.Node && xmlType != XmlQueryTypeFactory.NodeS, 535Debug.Assert(destinationType.IsAssignableFrom(value.GetType()), "ChangeType from type " + value.GetType().Name + " to type " + destinationType.Name + " failed"); 645Debug.Assert(XmlILTypeHelper.GetStorageType(xmlType).IsAssignableFrom(value.GetType()), "Xml type " + xmlType + " is not represented in ILGen as " + value.GetType().Name); 734Debug.Fail("XmlTypeCode " + code + " was not fully handled."); 781Debug.Assert(this.collations != null); 839Debug.Assert(context != null); 871Debug.Assert(context != null); 1014Debug.Assert(node.NodeType == XPathNodeType.Namespace);
System\Xml\Xsl\Runtime\XmlQuerySequence.cs (1)
355Debug.Assert(keys.Length >= this.size, "Number of keys must be >= number of items.");
System\Xml\Xsl\Runtime\XmlQueryStaticData.cs (2)
41Debug.Assert(defaultWriterSettings != null && staticData != null); 165Debug.Assert(formatVersion != CurrentFormatVersion || dataReader.Read() == -1, "Extra data at the end of the stream");
System\Xml\Xsl\Runtime\XmlSequenceWriter.cs (1)
294Debug.Assert(false);
System\Xml\Xsl\Runtime\XmlSortKey.cs (8)
64Debug.Assert(this.nextKey != null && that.nextKey != null); 68Debug.Assert(this.priority != that.priority); 78Debug.Assert(that != null && !(this is XmlEmptySortKey)); 113Debug.Assert(obj is XmlSortKey); 227Debug.Assert(that.sortKey != null, "Both keys must have non-null sortKey field"); 231Debug.Assert(this.sortKeyBytes != null && that.sortKeyBytes != null, "Both keys must have non-null sortKeyBytes field"); 306Debug.Assert(this.dblVal == Double.NegativeInfinity || this.dblVal == Double.PositiveInfinity); 311Debug.Assert(that.dblVal == Double.NegativeInfinity || that.dblVal == Double.PositiveInfinity);
System\Xml\Xsl\Runtime\XslNumber.cs (10)
28Debug.Assert(isSeparator == (formatString != null), "AssertSeparator"); 33Debug.Assert(startIdx >= 0 && tokLen > 0); 48Debug.Assert(startIdx >= 0 && tokLen > 0); 115Debug.Assert(groupingSeparator.Length <= 1); 231Debug.Assert(item.ValueType == typeof(double), "Item must be either of type int, or double"); 235Debug.Assert(1 <= dblVal && dblVal < double.PositiveInfinity); 256Debug.Assert(CharUtil.IsDecimalDigitOne(startChar), "Unexpected startChar: " + startChar); 265Debug.Assert(val >= 0 && val == Math.Round(val), "ConvertToArabic operates on non-negative integer numbers only"); 275Debug.Assert(groupSeparator.Length == 1); 310Debug.Assert(pNewEnd >= result, "Separator cannot be the first character");
System\Xml\Xsl\Runtime\XsltConvert.cs (4)
83Debug.Assert(itemType == BooleanType, "Unexpected type of atomic sequence " + itemType.ToString()); 121Debug.Assert(itemType == BooleanType, "Unexpected type of atomic sequence " + itemType.ToString()); 262Debug.Assert(destinationType.IsStrict && destinationType.IsAtomicValue, "Can only convert to strict atomic type."); 320Debug.Fail("Conversion from " + value.XmlType.QualifiedName.Name + " to " + destinationType + " is not supported.");
System\Xml\Xsl\Runtime\XsltFunctions.cs (8)
66Debug.Assert(value.Length < startIndex || Double.IsNaN(startIndex)); 84Debug.Assert(0 <= startIndex && startIndex <= endIndex && endIndex <= value.Length); 87Debug.Assert(endIndex <= startIndex || Double.IsNaN(endIndex)); 242Debug.Assert(item is XPathNavigator); 254Debug.Fail("Unexpected type: " + o.GetType().ToString()); 282Debug.Assert(itemType == XsltConvert.BooleanType, "Unexpected type of atomic value " + itemType.ToString()); 287Debug.Assert(stringValue != null); 502Debug.Assert(lang != null);
System\Xml\Xsl\Runtime\XsltLibrary.cs (15)
77Debug.Assert(methInfo != null, "Method " + className.Name + "." + methName + " not found"); 83Debug.Assert(methInfo != null, "Method " + className.Name + "." + methName + " not found"); 191Debug.Assert(0 <= idx && idx < decimalFormatters.Count, "Value of decimalFormatterIndex is out of range"); 260Debug.Assert(!item.IsNode, "Atomic value expected"); 267Debug.Assert(itemType == XsltConvert.BooleanType, "Unexpected type of atomic value " + itemType.ToString()); 274Debug.Assert(TypeCode.Boolean < TypeCode.Double && TypeCode.Double < TypeCode.String, "Cannot use the smallest TypeCode as a weakest one"); 293Debug.Assert(op == ComparisonOperator.Eq || op == ComparisonOperator.Ne); 297Debug.Assert(compType == TypeCode.Boolean); 304Debug.Assert(compType == TypeCode.Boolean || compType == TypeCode.Double || compType == TypeCode.String); 334Debug.Assert(op == ComparisonOperator.Eq || op == ComparisonOperator.Ne); 373Debug.Assert(ComparisonOperator.Lt <= op && op <= ComparisonOperator.Ge); 403Debug.Assert(XPathNodeType.SignificantWhitespace == XPathNodeType.Text + 1); 404Debug.Assert(XPathNodeType.Whitespace == XPathNodeType.Text + 2); 415Debug.Assert((object)nav1.NameTable == (object)nav2.NameTable, "Ref.Equal cannot be used if navigators have different name tables"); 442Debug.Fail("Invalid XSLT value");
System\Xml\Xsl\SourceLineInfo.cs (6)
73Debug.Assert(lineInfo.Start.Line == lineInfo.End.Line); 74Debug.Assert(lineInfo.Start.Pos == 0 && lineInfo.End.Pos == 0); 76Debug.Assert(0 < lineInfo.Start.Line && 0 < lineInfo.Start.Pos, "0 < start"); 77Debug.Assert(0 < lineInfo.End.Line && 0 < lineInfo.End.Pos , "0 < end"); 78Debug.Assert(lineInfo.Start.LessOrEqual(lineInfo.End), "start <= end"); 84Debug.Assert(uriString != null);
System\Xml\Xsl\XmlILCommand.cs (2)
29Debug.Assert(delExec != null && staticData != null); 206Debug.Assert(results != null);
System\Xml\Xsl\XmlIlGenerator.cs (3)
133Debug.Assert(this.qil.Root != null); 200Debug.Assert(ndParam.NodeType == QilNodeType.Parameter); 321Debug.Assert(methInfo != null, "MethodInfo for global value should have been created previously.");
System\Xml\Xsl\XmlQueryCardinality.cs (1)
25Debug.Assert(0x00 <= value && value <= 0x07);
System\Xml\Xsl\XmlQueryType.cs (11)
484Debug.Assert(Count == 1 && IsSingleton, "This method should only be called for item types."); 485Debug.Assert(baseType.Count == 1 && baseType.IsSingleton, "This method should only be called for item types."); 486Debug.Assert(!IsDod && !baseType.IsDod, "Singleton types may not have DocOrderDistinct property"); 504Debug.Assert(IsAtomicValue && baseType.IsAtomicValue); 521Debug.Assert(this.Count == 1 && this.IsSingleton, "this should be an item"); 522Debug.Assert(other.Count == 1 && other.IsSingleton, "other should be an item"); 551Debug.Assert(Count == 1, "Do not pass a Union type to this method."); 552Debug.Assert(IsSingleton, "Do not pass a Sequence type to this method."); 835Debug.Assert(count < 64, "BitMatrix currently only handles up to 64x64 matrix."); 851Debug.Assert(index1 < bits.Length && index2 < bits.Length, "Index out of range."); 855Debug.Assert(index1 < bits.Length && index2 < bits.Length, "Index out of range.");
System\Xml\Xsl\XmlQueryTypeFactory.cs (14)
63Debug.Assert(schemaType.DerivedBy == XmlSchemaDerivationMethod.Union); 265Debug.Assert(itemType.IsSingleton, "All types should be prime."); 423Debug.Assert(schemaType.Datatype.Variety == XmlSchemaDatatypeVariety.Atomic, "List or Union Xsd types should have been handled by caller."); 451Debug.Assert(!isNillable); 484Debug.Assert(nameTest != null, "nameTest cannot be null"); 485Debug.Assert(schemaType != null, "schemaType cannot be null"); 493Debug.Assert(!IsAtomicValue || schemaType.Datatype.Variety == XmlSchemaDatatypeVariety.Atomic); 529Debug.Assert((object) this == (object) Create(this.code, this.isStrict), "Unknown type"); 713Debug.Assert(members != null && members.Count != 1, "ChoiceType must contain a list with 0 or >1 types."); 720Debug.Assert(t.Cardinality == XmlQueryCardinality.One, "ChoiceType member types must be prime types."); 925Debug.Assert(prime != null, "SequenceType can only modify the cardinality of a non-null XmlQueryType."); 926Debug.Assert(prime.IsSingleton, "Prime type must have cardinality one."); 1123Debug.Fail("Don't know how to serialize " + type.GetType().ToString()); 1140Debug.Fail("Unexpected XmlQueryType's subtype id");
System\Xml\Xsl\XPath\XPathBuilder.cs (31)
47Debug.Fail("Must not be called"); 65Debug.Assert(! inTheBuild, "XPathBuilder is busy!"); 75Debug.Assert(inTheBuild, "StartBuild() wasn't called"); 86Debug.Assert(numFixupCurrent >= 0, "Context fixup error"); 87Debug.Assert(numFixupPosition >= 0, "Context fixup error"); 88Debug.Assert(numFixupLast >= 0, "Context fixup error"); 106Debug.Assert(op != XPathOperator.Unknown); 115Debug.Fail(op + " is not a valid XPathOperator"); 121Debug.Assert(op == XPathOperator.Or || op == XPathOperator.And); 131Debug.Assert(compType == XmlTypeCode.Boolean || compType == XmlTypeCode.Double || compType == XmlTypeCode.String); 132Debug.Assert(compType == XmlTypeCode.Boolean || left.XmlType.IsSingleton && right.XmlType.IsSingleton, "Both comparison operands must be singletons"); 144Debug.Fail("Wrong operator type"); 151Debug.Assert(val.XmlType.IsSingleton); 152Debug.Assert(compType == XmlTypeCode.Boolean || compType == XmlTypeCode.Double || compType == XmlTypeCode.String, "I don't know what to do with RTF here"); 188Debug.Assert(op == XPathOperator.Eq || op == XPathOperator.Ne); 211Debug.Assert(op == XPathOperator.Lt || op == XPathOperator.Le || op == XPathOperator.Gt || op == XPathOperator.Ge); 232Debug.Assert(op == XPathOperator.UnaryMinus); 233Debug.Assert(right == null); 247Debug.Fail("Wrong operator type"); 253Debug.Assert(op == XPathOperator.Union); 354Debug.Fail("Invalid EnumValue 'XPathAxis'"); 392Debug.Assert(nodeset.NodeType == QilNodeType.DocOrderDistinct, 482Debug.Assert(!args.IsReadOnly, "Writable collection expected"); 520Debug.Fail(func.id + " is present in the function table, but absent from the switch"); 747Debug.Assert(current != null); 759Debug.Assert(environment != null); 781Debug.Assert(unknown.NodeType == QilNodeType.Unknown); 807Debug.Assert(this.last != null); 812Debug.Assert(unknown != null); 860Debug.Assert(maxArgs == 0 || maxArgs == Infinity || argTypes != null && argTypes.Length == maxArgs); 886Debug.Assert(numArgs > maxArgs);
System\Xml\Xsl\XPath\XPathParser.cs (6)
29Debug.Assert(this.scanner == null && this.builder == null); 30Debug.Assert(scanner != null && builder != null); 56Debug.Assert(posInfo.Count == 0, "PushPosInfo() and PopPosInfo() calls have been unbalanced"); 229Debug.Assert(scanner.Name == "processing-instruction"); 446Debug.Assert(IsPrimaryExpr()); 472Debug.Assert(
System\Xml\Xsl\XPath\XPathQilFactory.cs (13)
41Debug.Assert(result == (xt.TypeCode == XmlTypeCode.Item || xt.TypeCode == XmlTypeCode.AnyAtomicType), "What else can it be?"); 47Debug.Assert(n != null && IsAnyType(n), "Must be of 'any' type"); 52Debug.Assert(n != null && n.XmlType.IsSingleton && n.XmlType.IsNode, "Must be a singleton node"); 57Debug.Assert(n != null && n.XmlType.IsNode, "Must be a node-set"); 62Debug.Assert(n != null && n.XmlType.IsSingleton && n.XmlType.IsNode && n.XmlType.IsNotRtf, "Must be a singleton node and not an Rtf"); 67Debug.Assert(n != null && n.XmlType.IsSubtypeOf(T.StringX), "Must be a singleton string"); 72Debug.Assert(n != null && n.XmlType.IsSubtypeOf(T.StringXS), "Must be a sequence of strings"); 77Debug.Assert(n != null && n.XmlType.IsSubtypeOf(T.DoubleX), "Must be a singleton Double"); 82Debug.Assert(n != null && n.XmlType.IsSubtypeOf(T.BooleanX), "Must be a singleton Bool"); 123Debug.Assert(op == QilNodeType.Eq || op == QilNodeType.Ne); 138Debug.Assert(op == QilNodeType.Lt || op == QilNodeType.Le || op == QilNodeType.Gt || op == QilNodeType.Ge); 158Debug.Assert(IsAnyType(n), "Unexpected expression type: " + n.XmlType.ToString()); 168default : Debug.Fail("Unexpected XmlTypeCode: " + requiredType); return null;
System\Xml\Xsl\XPath\XPathScanner.cs (19)
80Debug.Assert(xpathExpr != null); 94Debug.Assert(0 <= index && index <= xpathExpr.Length); 100Debug.Assert(-1 <= curIndex && curIndex < xpathExpr.Length); 105Debug.Assert(curIndex == xpathExpr.Length); 124Debug.Assert(kind == LexKind.Name); 125Debug.Assert(name != null); 132Debug.Assert(kind == LexKind.Name); 133Debug.Assert(prefix != null); 150Debug.Assert(kind == LexKind.String); 151Debug.Assert(stringValue != null); 163Debug.Assert(kind == LexKind.Name); 170Debug.Assert(kind == LexKind.Axis); 171Debug.Assert(axis != XPathAxis.Unknown); 419Debug.Assert(IsAsciiDigit(curChar) || curChar == '.'); 455Debug.Assert(xmlCharType.IsStartNCNameSingleChar(curChar) 484Debug.Assert(LexKind.FirstStringable <= t); 496Debug.Assert(LexKind.FirstStringable <= t); 499Debug.Assert("()[].@,*/$}".IndexOf((char)t) >= 0); 508Debug.Fail("Unexpected LexKind: " + t.ToString());
System\Xml\Xsl\XPathConvert.cs (122)
143Debug.Assert(0 != (u & 0x80000000)); 198Debug.Assert(dec.MantissaSize > 0); 209Debug.Assert(dec[ib] > 0 && dec[ib] <= 9); 219Debug.Assert(dec[ib] >= 0 && dec[ib] <= 9); 246Debug.Assert(exponent > 0 && exponent < 512); 260Debug.Assert(digit <= 9); 261Debug.Assert(0 != (this.u2 & 0x80000000)); 265Debug.Assert(this.exp >= 4); 303Debug.Assert(1 == rgu[4]); 326Debug.Assert(this.IsZero); 382Debug.Assert(0 != (this.u2 & 0x80000000)); 383Debug.Assert(0 != (numOp.u2 & 0x80000000)); 396Debug.Assert(uHi < 0xFFFFFFFF); 401Debug.Assert(uHi < 0xFFFFFFFF); 408Debug.Assert(uHi < 0xFFFFFFFF); 415Debug.Assert(uHi < 0xFFFFFFFF); 422Debug.Assert(uHi < 0xFFFFFFFF); 428Debug.Assert(0 != uT); 430Debug.Assert(uHi < 0xFFFFFFFF); 437Debug.Assert(uHi < 0xFFFFFFFF); 444Debug.Assert(uHi < 0xFFFFFFFF); 453Debug.Assert(this.error <= 2 || numOp.error <= 2); 473Debug.Assert(0 != (rgu5 & 0x40000000)); 491Debug.Assert(0 == rgu3); 492Debug.Assert(0 == rgu4); 493Debug.Assert(0 == rgu5); 517Debug.Assert(0 != (bn.u2 & 0x80000000)); 535Debug.Assert(wT >= 12 && wT < 32); 548Debug.Assert(wT > 0 && wT < 32); 578Debug.Assert(this.exp <= 32); 587Debug.Assert(this.error < 0xFFFFFFFF); 591Debug.Assert(0 == this.u2 && 0 == this.u1); 601Debug.Assert(this.error < 0xFFFFFFFF); 634Debug.Assert(!IsSpecial(dbl)); 635Debug.Assert(0 < dbl); 701Debug.Assert(iT >= 0 && iT < 16); 704Debug.Assert(numHH.exp + tenPower.exp > 1); 712Debug.Assert(iT > 0 && iT <= 32); 714Debug.Assert(numHH.exp + tenPower.exp > 1); 721Debug.Assert(iT >= 0 && iT < 16); 724Debug.Assert(numHH.exp + tenPower.exp <= 32); 732Debug.Assert(iT > 0 && iT <= 32); 734Debug.Assert(numHH.exp + tenPower.exp <= 32); 741Debug.Assert(numHH.exp > 0 && numHH.exp < 32); 754Debug.Assert(uLL <= uLH && uLH <= uHL && uHL <= uHH); 776Debug.Assert(uHH >= uScale && uHH / uScale < 10); 779Debug.Assert(uLL <= uHH); 789Debug.Assert(0 != uHH || !numHH.IsZero); 818Debug.Assert(0 <= bLL && bLL < bHH && bHH <= 9); 855Debug.Assert(dblInt == Math.Floor(dblInt) && 1 <= dblInt && dblInt <= 9007199254740991.0d); 870Debug.Assert(iT >= 0 && iT <= 15); 871Debug.Assert(dblInt >= C10toN[iT] && dblInt < C10toN[iT + 1]); 875Debug.Assert(iT >= 0); 878Debug.Assert(dblInt == Math.Floor(dblInt) && 0 <= dblInt && dblInt < C10toN[iT]); 938Debug.Assert(!IsSpecial(dbl)); 939Debug.Assert(0 < dbl); 952Debug.Assert(0 == (dblHi & 0x7FF00000)); 961Debug.Assert(0 != (DblHi(dblT) & 0x7FF00000)); 998Debug.Assert(1 <= dblT && dblT < 2); 1035Debug.Assert(0 == c5Den); 1050Debug.Assert(cu <= 2); 1066Debug.Assert(c2Num > 0 && c2Den > 0); 1072Debug.Assert(0 == (biDen[biDen.Length - 1] & 0xF0000000)); 1073Debug.Assert(0 != (biDen[biDen.Length - 1] & 0x08000000)); 1521Debug.Assert(0 <= idx && idx < length); 1528Debug.Assert(capacity >= InitCapacity); 1529Debug.Assert(length >= 0 && length <= capacity); 1535Debug.Assert(0 == length || 0 != digits[length - 1]); 1561Debug.Assert(cu >= 0); 1579Debug.Assert(2 <= capacity); 1595Debug.Assert((object)this != (object)biSrc); 1608Debug.Assert(dec.MantissaSize >= 0); 1620Debug.Assert(dec[ib] >= 0 && dec[ib] <= 9); 1629Debug.Assert(1 < uMul); 1638Debug.Assert(0 != uMul); 1658Debug.Assert(c5 >= 0); 1685Debug.Assert(cbit >= 0); 1740Debug.Assert(cu >= 0); 1756Debug.Assert(cbit >= 0); 1805Debug.Assert(idx >= 0 && idx < length); 1806Debug.Assert(digits[idx] != bi.digits[idx]); 1814Debug.Assert((object)this != (object)bi); 1857Debug.Assert((object)this != (object)bi); 1868Debug.Assert(0 == wCarry || 1 == wCarry); 1901Debug.Assert(false, "Who's subtracting to negative?"); 1909Debug.Assert((object)this != (object)bi); 1917Debug.Assert(length <= cu); 1924Debug.Assert(uQuo >= 0 && uQuo <= 9); 1937Debug.Assert(0 == wCarry || 1 == wCarry); 1948Debug.Assert(1 == wCarry); 1949Debug.Assert(idx == cu); 1967Debug.Assert(CompareTo(bi) < 0); 2064Debug.Assert(value <= MaxDigits); 2071Debug.Assert(0 <= ib && ib < mantissaSize); 2184Debug.Assert(0 != mantissaSize && 0 != dec[0] && 0 != dec[mantissaSize - 1]); 2194Debug.Assert(dec[ib] >= 0 && dec[ib] <= 9); 2202Debug.Assert(dec[ib] >= 0 && dec[ib] <= 9); 2295Debug.Assert(Double.IsNaN(dblLowPrec) || dblLowPrec == dbl); 2393Debug.Assert(c2Dbl < 32 || 0 != biDec[0]); 2407Debug.Assert(0 == c2Dbl || 0 == c2Dec); 2408Debug.Assert(0 == c5Dbl || 0 == c5Dec); 2527Debug.Assert(('0' & 0xF) == 0, "We use (char)(d |'0') to convert digit to char"); 2541Debug.Assert(Double.IsInfinity(dbl)); 2547Debug.Assert(0 != dec.MantissaSize); 2580Debug.Assert(dec[ib] >= 0 && dec[ib] <= 9); 2593Debug.Assert(0 != cntDigits); 2594Debug.Assert(sizeFract == cntDigits || sizeFract > cntDigits && pch[-1] == '0'); 2603Debug.Assert(sizeFract == cntDigits); 2606Debug.Assert(dec[ib] >= 0 && dec[ib] <= 9); 2612Debug.Assert(0 == sizeInt && 0 == cntDigits); 2642Debug.Assert(('0' & 0xF) == 0, "We use (ch & 0xF) to convert char to digit"); 2703Debug.Assert(IsAsciiDigit(ch)); 2716Debug.Assert(ch == '.'); 2736Debug.Assert(*pchEnd == '\0', "String objects must be zero-terminated"); 2747Debug.Assert(pchFirstDig != null); 2754Debug.Assert(pchFirstDig != pch); 2758Debug.Assert(IsAsciiDigit(*pchFirstDig)); 2765Debug.Assert(expAdj < 0); 2777Debug.Assert(IsAsciiDigit(*pchFirstDig) && *pchFirstDig != '0'); 2783Debug.Assert(IsAsciiDigit(*pch) && *pch != '0'); 2788Debug.Assert(pch - pchFirstDig == numDig || pch - pchFirstDig == numDig + 1); 2792Debug.Assert(numDig > 0 && numDig <= FloatingDecimal.MaxDigits);
System\Xml\Xsl\XslException.cs (2)
49Debug.Fail("Resource string '" + res + "' was not found"); 153Debug.Assert(lineInfo == null || lineInfo.Uri != null);
System\Xml\Xsl\Xslt\Compiler.cs (14)
70Debug.Assert(CompilerResults == null, "Compiler cannot be reused"); 92Debug.Assert(stylesheet != null); 93Debug.Assert(Root == null, "Compiler cannot be reused"); 128Debug.Assert(importPrecedence <= oldNsAlias.ImportPrecedence, "Stylesheets must be processed in the order of decreasing import precedence"); 162Debug.Assert(var.NodeType == XslNodeType.Variable || var.NodeType == XslNodeType.Param); 190Debug.Assert(qname != null); 204Debug.Assert(nameTest != null); 218Debug.Assert(name != null); 254Debug.Assert(value <= ErrorCount); 264Debug.Assert(savedErrorCount == -1, "Nested EnterForwardsCompatible calls"); 270Debug.Assert(savedErrorCount != -1, "ExitForwardsCompatible without EnterForwardsCompatible"); 273Debug.Assert((savedErrorCount = -1) < 0); 276Debug.Assert((savedErrorCount = -1) < 0); 405Debug.Assert(characters.Length == 8);
System\Xml\Xsl\Xslt\CompilerScopeManager.cs (13)
86Debug.Assert(lastRecord == 0 && lastScopes == 0, "PushScope() and PopScope() calls are unbalanced"); 97Debug.Assert(nsDecl.Prefix == null, "NS may be null only when prefix is null where it is used for extension-element-prefixes='#all'"); 127Debug.Assert(flag == (flag & ScopeFlags.ExclusiveFlags) && (flag & (flag - 1)) == 0 && flag != 0, "One exclusive flag"); 128Debug.Assert(uri != null || ncName == null, "null, null means exclude '#all'"); 144Debug.Assert(flag == (flag & ScopeFlags.InheritedFlags) && (flag & (flag - 1)) == 0 && flag != 0, "one inherited flag"); 163Debug.Assert((records[lastRecord].flags & ScopeFlags.CompatibilityFlags) != ScopeFlags.CompatibilityFlags, 170Debug.Assert(varName.LocalName != null && varName.NamespaceUri != null); 177Debug.Assert(prefix != null); 210Debug.Assert(nsUri != null); 216Debug.Assert(recPrefix == null); 252Debug.Assert(localName != null); 346Debug.Assert(LastPredefRecord <= currentRecord && currentRecord <= scope.lastRecord, "MoveNext() either was not called or returned false"); 347Debug.Assert(scope.records[currentRecord].IsNamespace);
System\Xml\Xsl\Xslt\Focus.cs (11)
47Debug.Assert(focusType != SingletonFocusType.Iterator); 63Debug.Assert(focusType != SingletonFocusType.None, "Focus is not set, call SetFocus first"); 72Debug.Assert(focusType == SingletonFocusType.Iterator && current != null, "Unexpected singleton focus type"); 93Debug.Assert(! IsFocusSet, "Focus was already set"); 97Debug.Assert(this.current.Name.NamespaceUri == XmlReservedNs.NsXslDebug && this.current.Name.LocalName == "current"); 101Debug.Assert(this.position.Name.NamespaceUri == XmlReservedNs.NsXslDebug && this.position.Name.LocalName == "position"); 105Debug.Assert(this.last.Name.NamespaceUri == XmlReservedNs.NsXslDebug && this.last.Name.LocalName == "last"); 110Debug.Assert(IsFocusSet, "Focus was not set"); 119Debug.Assert(this.current != null, "---- current() is not expected in this function"); 124Debug.Assert(this.position != null, "---- position() is not expected in this function"); 129Debug.Assert(this.last != null, "---- last() is not expected in this function");
System\Xml\Xsl\Xslt\InvokeGenerator.cs (8)
57Debug.Assert(formalArg.Name.LocalName == "namespaces", "Cur,Pos,Last don't have default values and should be always added to by caller in AddImplicitArgs()"); 58Debug.Assert(formalArg.DefaultValue != null, "PrecompileProtoTemplatesHeaders() set it"); 64Debug.Assert(formalArg.Name.NamespaceUri != XmlReservedNs.NsXslDebug, "Cur,Pos,Last don't have default values and should be always added to by caller in AddImplicitArgs(). We don't have $namespaces in !debug."); 78Debug.Assert(invokeType == T.ItemS, "Actual argument type is not a subtype of formal argument type"); 95Debug.Assert(argName != null); 118Debug.Assert(formalArgs[prevArg] != null, "formalArg must be in the list"); 119Debug.Assert(invokeArgs[prevArg] != null, "This arg should be compiled already"); 134Debug.Assert(invokeArgs[prevArg] is QilIterator);
System\Xml\Xsl\Xslt\KeyMatchBuilder.cs (7)
28Debug.Assert(0 <= depth && depth <= 1, "this shouldn't happen"); 37Debug.Assert(0 <= depth && depth <= 1, "this shouldn't happen"); 42Debug.Assert(base.numFixupLast == 0); 43Debug.Assert(base.numFixupPosition == 0); 68Debug.Assert(node != null); 69Debug.Assert(fixup != null); 96Debug.Assert(content.Child == this.fixup, "Unexpected content node");
System\Xml\Xsl\Xslt\MatcherBuilder.cs (7)
130Debug.Assert( 217Debug.Assert(!double.IsNaN(x.priority)); 218Debug.Assert(!double.IsNaN(y.priority)); 356Debug.Assert(patternList.Count > 0); 376Debug.Assert((int)(QilLiteral)matcher == NoMatch); 399Debug.Assert(pattern.Priority > lastPriority); 462Debug.Assert(priority == branches.Length - 1);
System\Xml\Xsl\Xslt\OutputScopeManager.cs (4)
53Debug.Assert(prefix != null); 54Debug.Assert(uri != null); 125Debug.Assert(prefix != null); 131Debug.Assert(0 < record, "first record is lookup bariaer, so we don't need to check this condition runtime");
System\Xml\Xsl\Xslt\QilGenerator.cs (56)
129Debug.Assert(compiler != null); 208Debug.Assert(IsDebug && curLoop.IsFocusSet); 215Debug.Assert(!curLoop.IsFocusSet && !funcFocus.IsFocusSet, "Must be compiled using singleton focus"); 377Debug.Assert(IsDebug, "This is debug only logic"); 380Debug.Assert(var.XmlType.IsSubtypeOf(T.NamespaceS)); 381Debug.Assert(var.Binding is QilList); 388Debug.Assert(nsList[i].NodeType == QilNodeType.NamespaceDecl); 389Debug.Assert(varList[i].NodeType == QilNodeType.NamespaceDecl); 416Debug.Assert(tmpl != null && tmpl.Function == null); 417Debug.Assert(tmpl.NodeType == XslNodeType.AttributeSet || tmpl.NodeType == XslNodeType.Template); 441Debug.Assert(tmpl.NodeType == XslNodeType.Template); 520Debug.Assert((template != null) == (tmpl.SourceLine != null), "Templates must have line information, and attribute sets must not"); 527Debug.Assert(! IsDebug, "In debug mode we don't generate parumWithCalls functions. Otherwise focus flags should be adjusted"); 556Debug.Assert(tmpl != null && tmpl.Function != null && tmpl.Function.Definition.NodeType == QilNodeType.Unknown); 564Debug.Assert(tmpl is Template, "Only templates can have explicit arguments"); 566Debug.Assert(arg.DefaultValue == null, "Argument must not be compiled yet"); 603Debug.Assert(instructions != null); 643default: Debug.Fail("Unexpected type of AST node: " + nodeType.ToString()); result = null; break; 647Debug.Assert(result != null, "Result of compilation should not be null"); 838Debug.Assert(pos < source.Length); 866Debug.Assert(i == source.Length || source[i] == '{'); 909Debug.Assert(avt != null); 950Debug.Assert(curLoop.IsFocusSet); 999Debug.Assert(withParam.NodeType == XslNodeType.WithParam); 1033Debug.Assert(node.NodeType == XslNodeType.ApplyImports); 1034Debug.Assert(!curLoop.IsFocusSet, "xsl:apply-imports cannot be inside of xsl:for-each"); 1059Debug.Assert(tmpl.Function != null, "All templates should be already compiled"); 1087Debug.Assert(attSet.Function != null, "All templates should be already compiled"); 1196Debug.Assert(when.NodeType == XslNodeType.If || when.NodeType == XslNodeType.Otherwise); 1199Debug.Assert(result == null, "xsl:otherwise must be the last child of xsl:choose"); 1232Debug.Assert(node.NodeType == XslNodeType.Variable); 1240Debug.Assert(node.NodeType == XslNodeType.Variable || node.NodeType == XslNodeType.Param || node.NodeType == XslNodeType.WithParam); 1266Debug.Assert(varValue.SourceLine == null); 1271Debug.Assert(withParam.NodeType == XslNodeType.WithParam); 1437Debug.Assert(result.XmlType == T.StringX); 1443Debug.Assert(sort.NodeType == XslNodeType.Sort); 1525Debug.Assert(0 < list.Count, "Pattern should have at least one filter"); 1571Debug.Fail("Unexpected NodeKind: " + nodeKinds.ToString()); 1777Debug.Assert(num.Level == NumberLevel.Any); 1796Debug.Assert(sheet.TemplateMatches.Count == 0); 1866Debug.Assert(varPar.NodeType == XslNodeType.Variable || varPar.NodeType == XslNodeType.Param); 1895Debug.Assert(varPar.NodeType == XslNodeType.Variable || varPar.NodeType == XslNodeType.Param); 1966Debug.Assert(expr != null); 1990Debug.Assert(pttrn != null); 2011Debug.Assert(pttrn != null); 2099Debug.Assert( 2151Debug.Assert(actualArgs[actArg].NodeType == XslNodeType.WithParam, "All Sorts was removed in CompileSorts()"); 2218Debug.Assert(actualArgs[i].NodeType == XslNodeType.WithParam, "All Sorts was removed in CompileSorts()"); 2245Debug.Assert(actualArgs[0].Name == nameCurrent, "Caller should always pass $current as a first argument to apply-* calls."); 2304Debug.Assert( 2333Debug.Assert(!IsDebug, "Attempt to override SourceLineInfo in debug mode"); 2338Debug.Assert(n.SourceLine == null); 2357Debug.Assert(nsVar.XmlType.IsSubtypeOf(T.NamespaceS)); 2394Debug.Assert(let.NodeType == QilNodeType.Let); 2399Debug.Assert(0 <= varScope && varScope <= vars.Count); 2408Debug.Assert(vars.Count == 0, "Accumulated variables left unclaimed");
System\Xml\Xsl\Xslt\QilGeneratorEnv.cs (11)
28Debug.Assert(args == null || args.Length == 0, "Error message must already be composed in res"); 33Debug.Fail("Should never get here"); 73Debug.Assert(ns != null); 94Debug.Assert(!args.IsReadOnly, "Writable collection expected"); 120Debug.Fail(func.id + " is present in the function table, but absent from the switch"); 128Debug.Assert(ns != null); 208default: Debug.Fail("This XmlTypeCode should never be inferred from a Clr type: " + xmlTypeFormalArg.TypeCode); break; 343Debug.Assert(name.XmlType == T.StringX && key.XmlType == T.StringX); 371Debug.Assert(defList != null && defList.Count > 0); 385Debug.Assert(defList != null && defList.Count > 0); 553Debug.Assert(propValue.ValueType == XsltConvert.DoubleType);
System\Xml\Xsl\Xslt\QilStrConcatenator.cs (6)
28Debug.Assert(! inUse); 45Debug.Assert(inUse, "Reset() wasn't called"); 50Debug.Assert(inUse, "Reset() wasn't called"); 55Debug.Assert(inUse, "Reset() wasn't called"); 57Debug.Assert(value.XmlType.TypeCode == XmlTypeCode.String); 68Debug.Assert(inUse); // If we want allow multiple calls to ToQil() this logic should be changed
System\Xml\Xsl\Xslt\Scripts.cs (1)
117Debug.Assert(compilerInfo != null);
System\Xml\Xsl\Xslt\Stylesheet.cs (4)
80Debug.Assert(var.NodeType == XslNodeType.Variable || var.NodeType == XslNodeType.Param); 81Debug.Assert(var.Name.NamespaceUri != null, "Name must be resolved in XsltLoader"); 95Debug.Assert(template.ImportPrecedence == 0); 107Debug.Assert(template.ImportPrecedence <= old.ImportPrecedence, "Global objects are processed in order of decreasing import precedence");
System\Xml\Xsl\Xslt\XPathPatternBuilder.cs (36)
29Debug.Assert(environment != null); 43Debug.Assert(! inTheBuild, "XPathBuilder is buisy!"); 50Debug.Assert(filter.NodeType == QilNodeType.Filter, "XPathPatternBuilder expected to generate list of Filters on top level"); 51Debug.Assert(filter.Variable.XmlType.IsSubtypeOf(T.NodeNotRtf)); 52Debug.Assert(filter.Variable.Binding.NodeType == QilNodeType.Unknown); // fixupNode 53Debug.Assert(filter.Body.XmlType.IsSubtypeOf(T.Boolean)); 62Debug.Assert(inTheBuild, "StartBuild() wasn't called"); 69Debug.Assert(predicateEnvironment.numFixupCurrent >= 0, "Context fixup error"); 70Debug.Assert(predicateEnvironment.numFixupPosition >= 0, "Context fixup error"); 71Debug.Assert(predicateEnvironment.numFixupLast >= 0, "Context fixup error"); 77Debug.Assert(op == XPathOperator.Union); 78Debug.Assert(left != null); 79Debug.Assert(right != null); 81Debug.Assert(right.NodeType == QilNodeType.Filter, "LocationPathPattern must be compiled into a filter"); 86Debug.Assert(left.NodeType == QilNodeType.Filter, "LocationPathPattern must be compiled into a filter"); 114Debug.Assert( 124Debug.Assert(nodeType == XPathNodeType.All && prefix == null && name == null, " // is the only d-o-s axes that we can have in pattern"); 173Debug.Assert(left != null); 174Debug.Assert(right != null); 177Debug.Assert(nop.Child == this.fixupNode); 181Debug.Assert(GetLastParent(left) == left, "Left is always single axis and never the step"); 182Debug.Assert(left.NodeType == QilNodeType.Filter); 189Debug.Assert(nop.Child != null); 193Debug.Assert(right.NodeType == QilNodeType.Filter); 203Debug.Assert(false, "Should not call to this function."); 261Debug.Assert(prefix.Length == 0); 266Debug.Assert( 272Debug.Assert(name == "key", "Unexpected function"); 273Debug.Assert( 294Debug.Assert(false, prompt); 316Debug.Assert(parent.NodeType == QilNodeType.Filter); 334Debug.Assert(context != null, "Predicate always has step so it can't have context == null"); 335Debug.Assert(context.Variable.NodeType == QilNodeType.For, "It shouldn't be Let, becaus predicates in PatternBuilder don't produce cached tuples."); 381Debug.Assert(current != null); 393Debug.Fail("GetPosition() must not be called"); 398Debug.Fail("GetLast() must not be called");
System\Xml\Xsl\Xslt\XPathPatternParser.cs (7)
29Debug.Assert(this.scanner == null && this.ptrnBuilder == null); 30Debug.Assert(scanner != null && ptrnBuilder != null); 115Debug.Assert(scanner.CanBeFunction); 116Debug.Assert(scanner.Prefix.Length == 0); 117Debug.Assert(scanner.Name == "id" || scanner.Name == "key"); 232Debug.Assert(scanner.Kind == LexKind.LBracket); 235Debug.Assert(scanner.Kind == LexKind.RBracket);
System\Xml\Xsl\Xslt\XslAst.cs (5)
69Debug.Assert(nsUri != null || Prefix == null); 114Debug.Assert(node != null); 196Debug.Assert(node != null && node.NodeType == XslNodeType.List); 273Debug.Assert(list != null && list.Count > 0); 287Debug.Assert(name != null);
System\Xml\Xsl\Xslt\XslAstAnalyzer.cs (23)
86Debug.WriteLineIf(DiagnosticsSwitches.XslTypeInference.TraceVerbose, v1.TraceName + " -> " + v2.TraceName); 105Debug.Assert((v.Flags & XslFlags.Stop) == 0, "Already visited this vertex"); 111Debug.Assert((u.Flags & flag) == flag, "Flag was not set on an adjacent vertex"); 247Debug.Assert(tmpl.Match != null); 339Debug.Assert( 370Debug.Assert(this.forEachDepth == 0, "xsl:apply-imports cannot be inside of xsl:for-each"); 371Debug.Assert(currentTemplate is Template, "xsl:apply-imports can only occur within xsl:template"); 378Debug.Assert(node.Select != null, "Absent @select should be replaced with 'node()' in XsltLoader"); 420Debug.WriteLineIf(DiagnosticsSwitches.XslTypeInference.TraceError, "Unknown template " + node.Name.QualifiedName, "Error"); 422Debug.Assert(target != null); 438Debug.Assert(instr.NodeType == XslNodeType.WithParam); 610Debug.WriteLineIf(DiagnosticsSwitches.XslTypeInference.TraceError, "Unknown attribute-set " + node.Name.QualifiedName, "Error"); 747Debug.Assert((t.Flags & XslFlags.Stop) == 0, "Already visited this vertex"); 754Debug.Assert((u.Flags & XslFlags.SideEffects) == XslFlags.SideEffects, "Flag was not set on an adjacent vertex"); 760Debug.Assert((u.Flags & XslFlags.SideEffects) == XslFlags.SideEffects, "Flag was not set on an adjacent vertex"); 772Debug.Assert((u.Flags & XslFlags.SideEffects) == XslFlags.SideEffects, "Flag was not set on an adjacent vertex"); 916Debug.Assert(op != XPathOperator.Unknown); 945Debug.WriteLineIf(DiagnosticsSwitches.XslTypeInference.TraceError, "Unresolved variable " + Compiler.ConstructQName(prefix, name), "Error"); 1030Debug.Fail("Unexpected XmlQueryType for script function: " + xt.ToString()); 1249Debug.Assert(split > 0); 1277Debug.Assert(scoperecord.IsNamespace || scoperecord.ncName == null); 1278Debug.Assert(!compiler.IsPhantomNamespace(scoperecord.nsUri)); 1316Debug.Assert(parent.Content.Count == split + 1);
System\Xml\Xsl\Xslt\XsltInput.cs (37)
47Debug.Assert(reader != null); 48Debug.Assert(atoms != null); 79Debug.Assert(tr.Settings == null, "XmlReader created with XmlReader.Create should always expand entities."); 181Debug.Assert( 219Debug.Assert(reader.NodeType == XmlNodeType.EntityReference); 221Debug.Assert(local[0] == '#' || local == "lt" || local == "gt" || local == "quot" || local == "apos"); 232Debug.Assert(reader.NodeType == XmlNodeType.Text || reader.NodeType == XmlNodeType.Whitespace || reader.NodeType == XmlNodeType.SignificantWhitespace); 235Debug.Assert(reader.NodeType == XmlNodeType.EndEntity); 247Debug.Assert(reader.NodeType == XmlNodeType.Attribute, "reader.NodeType == XmlNodeType.Attribute"); 287Debug.Assert(reader.NodeType == XmlNodeType.Text, "Unexpected node type inside attribute value"); 295Debug.Assert(reader.NodeType != XmlNodeType.EntityReference); 309Debug.Assert(nodeType == XmlNodeType.Element, "To call MoveToFirstChild() XsltI---- should be positioned on an Element."); 317Debug.Assert(nodeType != XmlNodeType.Element || IsEmptyElement, "On non-empty elements we should call MoveToFirstChild()"); 386Debug.Assert(nodeType == XmlNodeType.Text || nodeType == XmlNodeType.Whitespace || nodeType == XmlNodeType.SignificantWhitespace); 428Debug.Assert(reader.NodeType == XmlNodeType.Element); 454Debug.Assert(nodeType == XmlNodeType.Element, "For MoveToElement() we should be positioned on Element or Attribute"); 459Debug.Assert(nodeType == XmlNodeType.Element, "For MoveToLiteralAttribute() we should be positioned on Element or Attribute"); 470Debug.Assert(nodeType == XmlNodeType.Element, "For MoveToLiteralAttribute() we should be positioned on Element or Attribute"); 481Debug.Assert(attributes != null && attributes[attNum].name == attName, "Attribute numbering error."); 491Debug.Assert(attributes != null && attributes[attNum].name == attName, "Attribute numbering error."); 509Debug.Assert(nodeType == XmlNodeType.Element || nodeType == XmlNodeType.EndElement, "Input is positioned on element or attribute"); 539Debug.Assert(nodeType != XmlNodeType.Element || attributesRead, "Should first read attributes"); 545Debug.Assert(nodeType != XmlNodeType.Element || attributesRead, "Should first read attributes"); 552Debug.Assert(nodeType != XmlNodeType.Element || attributesRead, "Should first read attributes"); 563Debug.Assert(IsKeyword(atoms.Version)); 618Debug.Assert(NodeType == XmlNodeType.Element); 619Debug.Assert(attributes.Length <= xsltAttributeNumber.Length); 649Debug.Assert(SS, "First we parse xsl:stylesheet element"); 722Debug.Assert(NodeType == XmlNodeType.Element); 785Debug.Assert(NodeType == XmlNodeType.Element && IsXsltNamespace()); 807Debug.Assert(extensions ? IsKeyword(atoms.ExtensionElementPrefixes) : IsKeyword(atoms.ExcludeResultPrefixes)); 845Debug.Assert(IsKeyword(atoms.XPathDefaultNamespace)); 854Debug.Assert(IsKeyword(atoms.DefaultCollation)); 931Debug.Assert(prefix != null); 934Debug.Assert(Ref.Equal(atoms.NameTable.Get(nsUri), nsUri), "Namespaces must be atomized"); 1001Debug.Assert(input.NodeType == XmlNodeType.EndElement); 1004Debug.Assert(input.NodeType == XmlNodeType.Element || input.NodeType == XmlNodeType.Attribute);
System\Xml\Xsl\Xslt\XsltLoader.cs (44)
50Debug.Assert(compiler != null); 83Debug.Fail("Should never get here"); 87Debug.Assert(compiler.Root != null); 154Debug.Assert(compiler.Version != 0, "Version should be already decided at this point"); 205Debug.Assert(!documentUriInUse.Contains(baseUri), "Circular references must be checked while processing xsl:include and xsl:import"); 258Debug.Assert(input.NodeType == XmlNodeType.Element); 276Debug.Assert(!input.IsXsltNamespace()); 277Debug.Assert(curTemplate == null); 292Debug.Fail("AddTemplate() returned false for simplified stylesheet"); 305Debug.Assert(input.IsXsltNamespace() && (input.IsKeyword(atoms.Stylesheet) || input.IsKeyword(atoms.Transform))); 380Debug.Assert(input.NodeType == XmlNodeType.Text); 677Debug.Assert(attSet != null); 687Debug.Assert(attSet.CycleCheck == CycleCheck.Processing); 688Debug.Assert(attSet.Content[0].SourceLine != null); 787Debug.Assert(NumCharAttrs == DefaultValues.Length); 799Debug.Assert(dummy, "One of the atts should have lineInfo. if both are defualt they can't conflict."); 817Debug.Assert(name.Equals(format.Name)); 877Debug.Assert(setName != null, "Required attribute always != null"); 913Debug.Assert(input.NodeType == XmlNodeType.Text); 923Debug.Assert(curTemplate == null); 924Debug.Assert(input.CanHaveApplyImports == false); 940Debug.Assert(curTemplate == null); 1155Debug.Assert( 1208Debug.Assert(href != null); 1341Debug.Assert(input.NodeType == XmlNodeType.Text); 1378Debug.Assert(input.NodeType == XmlNodeType.Text); 1563Debug.Assert(input.NodeType == XmlNodeType.Text); 1758Debug.Assert(nodeType != XslNodeType.Unknown); 1865Debug.Assert(input.NodeType == XmlNodeType.Element); 2310Debug.Assert(input.NodeType == XmlNodeType.Element); 2345Debug.Assert(content != null && withParam != null); 2346Debug.Assert(withParam.NodeType == XslNodeType.WithParam); 2356Debug.Assert(content != null); 2363Debug.Assert(content != null); 2557Debug.Assert(input.IsRequiredAttribute(attNum), "It happened that @name as NCName is always required attribute"); 2630Debug.Assert(input.LocalName == "use-attribute-sets", "we are positioned on this attribute"); 2631Debug.Assert(list != null && list.Count == 0, "It happened that we always add use-attribute-sets first. Otherwise we can't call list.Clear()"); 2679Debug.Assert(!input.IsRequiredAttribute(attNum), "All Yes/No attributes are optional."); 2695Debug.Assert(!input.IsRequiredAttribute(attNum), "All 'type' attributes are optional."); 2702Debug.Assert(!input.IsRequiredAttribute(attNum), "All 'validation' attributes are optional."); 2721Debug.Assert(!input.IsRequiredAttribute(attNum), "All 'input-type-validation' attributes are optional."); 2776Debug.Assert(node != null); 2782Debug.Assert(node != null); 2790Debug.Assert(to != null);
System\Xml\Xsl\Xslt\XsltQilFactory.cs (7)
31Debug.Assert(xt.IsSingleton && xt.IsStrict, "Xslt assumes that these types will always be singleton and strict"); 37Debug.Assert(IsDebug, "QName is reserved as the marker for missing values"); 40Debug.Assert(xt.IsNode, "Unexpected expression type: " + xt.ToString()); 47Debug.Assert(n != null && n.XmlType.IsSubtypeOf(T.QNameX), "Must be a singleton QName"); 118Debug.Assert(value != null && ( 136Debug.Assert(format != null); 148Debug.Assert(format != null);
System\Xml\Xsl\XsltOld\ActionFrame.cs (10)
89Debug.Assert(this.variables != null && index < this.variables.Length); 94Debug.Assert(this.variables != null && index < this.variables.Length); 102Debug.Assert(! this.withParams.Contains(name), "We should check duplicate params at compile time"); 119Debug.Assert(nodeSet != null); 124Debug.Assert(nodeSet != null); 129Debug.Assert(0 < sortarray.Count); 140Debug.Assert(proc.ActionStack.Peek() == this, "the trick we are doing with proc.Current will work only if this is topmost frame"); 165Debug.Assert(parent != null); 196Debug.Assert(this.action is ContainerAction); 309Debug.Assert(index > 0, "MoveNext() wasn't called");
System\Xml\Xsl\XsltOld\ApplyImportsAction.cs (1)
29Debug.Assert(processor != null && frame != null);
System\Xml\Xsl\XsltOld\ApplyTemplatesAction.cs (8)
34Debug.Assert(s_BuiltInRule != null); 45Debug.Assert(mode != null); 61Debug.Assert(this.mode == null); 123Debug.Assert(processor != null && frame != null); 153Debug.Assert(frame.State == ProcessNextNode); 154Debug.Assert(frame.NewNodeSet != null); 166Debug.Assert(frame.State == PositionAdvanced); 178Debug.Fail("Invalid ApplyTemplatesAction execution state");
System\Xml\Xsl\XsltOld\AttributeAction.cs (2)
102Debug.Assert(processor != null && frame != null); 143Debug.Fail("Invalid ElementAction execution state");
System\Xml\Xsl\XsltOld\AttributeSetAction.cs (1)
33Debug.Assert(this.name == null);
System\Xml\Xsl\XsltOld\Avt.cs (6)
22Debug.Assert(constAvt != null); 27Debug.Assert(eventList != null); 40Debug.Assert(constAvt != null); 44Debug.Assert(processor != null && frame != null); 57Debug.Assert(compiler != null); 58Debug.Assert(avtText != null);
System\Xml\Xsl\XsltOld\AvtEvent.cs (2)
20Debug.Assert(key != Compiler.InvalidQueryKey); 25Debug.Assert(key != Compiler.InvalidQueryKey);
System\Xml\Xsl\XsltOld\BeginEvent.cs (2)
28Debug.Assert(input != null); 29Debug.Assert(input.NodeType != XPathNodeType.Namespace);
System\Xml\Xsl\XsltOld\BuilderInfo.cs (1)
75Debug.Assert(info.NodeType != XmlNodeType.Text || XmlCharType.Instance.IsOnlyWhitespace(info.Value));
System\Xml\Xsl\XsltOld\CallTemplateAction.cs (3)
30Debug.Assert(this.name == null); 76Debug.Assert(processor != null && frame != null); 100Debug.Fail("Invalid CallTemplateAction execution state");
System\Xml\Xsl\XsltOld\CommentAction.cs (2)
26Debug.Assert(processor != null && frame != null); 48Debug.Fail("Invalid IfAction execution state");
System\Xml\Xsl\XsltOld\Compiler.cs (42)
106Debug.Assert(this.atoms != null); 125Debug.Assert(Document != null); 130Debug.Assert(Document != null); 135Debug.Assert(Document != null); 146Debug.Assert(this.rootAction == null); 148Debug.Assert(this.currentTemplate == null); 168Debug.Assert(input != null); 169Debug.Assert(xmlResolver != null); 171Debug.Assert(this.input == null && this.atoms == null); 182Debug.Assert(this.input != null && this.atoms != null); 211Debug.Assert(this.rootAction != null); 212Debug.Assert(this.stylesheet != null); 213Debug.Assert(this.queryStore != null); 214Debug.Assert(this.input == null && this.atoms == null); 302Debug.Assert(this.rootAction != null); 306Debug.Assert(this.currentTemplate != null); 307Debug.Assert(variable.VarType == VariableType.LocalVariable || variable.VarType == VariableType.LocalParameter || variable.VarType == VariableType.WithParameter); 420Debug.Assert(value != null); 421Debug.Assert((object)value == (object)Input.Value); // this is always true. Why we passing value to this function. 492Debug.Assert(!this.documentURIs.Contains(href), "Circular references must be checked while processing xsl:include and xsl:import"); 497Debug.Assert(this.documentURIs.Contains(href), "Attempt to remove href that was not added"); 508Debug.Assert(this.xmlResolver != null); 519Debug.Assert(this.xmlResolver != null); 539Debug.Assert(newInput != null); 551Debug.Assert(this.input != null); 552Debug.Assert(this.input.Atoms == this.atoms); 580Debug.Assert(this.stylesheets != null); 587Debug.Assert(this.stylesheet == this.stylesheets.Peek()); 598Debug.Assert(this.stylesheet == this.stylesheets.Peek()); 607Debug.Assert(this.stylesheet == this.stylesheets.Peek()); 612Debug.Assert(this.currentTemplate != null); 619Debug.Assert(this.currentTemplate != null); 635Debug.Assert(this.queryStore != null); 828Debug.Assert( 848Debug.Assert(avt.Length != start, "Empty string not supposed here"); 849Debug.Assert(lex.Length == 0 , "Builder shoud to be reset here"); 880Debug.Assert(avt.Length != start, "Empty string not supposed here"); 881Debug.Assert(lex.Length == 0 , "Builder shoud to be reset here"); 882Debug.Assert(avt[start] == '{' , "We calling getXPathLex() only after we realy meet {"); 926Debug.Assert(start <= avt.Length); 947Debug.Assert(avtText != null); 965Debug.Assert(!constant || list.Count <= 1, "We can't have more then 1 text event if now {avt} found");
System\Xml\Xsl\XsltOld\ContainerAction.cs (9)
145Debug.Assert(compiler.Input.NodeType == XPathNodeType.Element); 196Debug.Assert(uri != null); 562Debug.Assert(Ref.Equal(input.NamespaceURI, input.Atoms.UriXsl)); 627Debug.Assert(action != null); 658Debug.Assert(false, "Unexpected node type."); 711Debug.Assert((object) this == (object) compiler.RootAction); 794Debug.Assert(processor != null && frame != null); 812Debug.Fail("Invalid Container action execution state"); 818Debug.Assert(actionIndex == 0 || this.containedActions != null);
System\Xml\Xsl\XsltOld\CopyAction.cs (2)
54Debug.Assert(processor != null && frame != null); 108Debug.Fail("Invalid CopyAction execution state");
System\Xml\Xsl\XsltOld\CopyAttributesAction.cs (13)
24Debug.Assert(s_Action != null); 29Debug.Assert(processor != null && frame != null); 43Debug.Assert(frame.State == BeginEvent); 44Debug.Assert(frame.Node.NodeType == XPathNodeType.Attribute); 54Debug.Assert(frame.State == TextEvent); 55Debug.Assert(frame.Node.NodeType == XPathNodeType.Attribute); 65Debug.Assert(frame.State == EndEvent); 66Debug.Assert(frame.Node.NodeType == XPathNodeType.Attribute); 76Debug.Assert(frame.State == Advance); 77Debug.Assert(frame.Node.NodeType == XPathNodeType.Attribute); 94Debug.Assert(node.NodeType == XPathNodeType.Attribute); 99Debug.Assert(node.NodeType == XPathNodeType.Attribute); 104Debug.Assert(node.NodeType == XPathNodeType.Attribute);
System\Xml\Xsl\XsltOld\CopyCodeAction.cs (7)
31Debug.Assert(copyEvents != null); 43Debug.Assert(processor != null && frame != null); 44Debug.Assert(this.copyEvents != null && this.copyEvents.Count > 0); 53Debug.Assert(frame.State == Outputting); 56Debug.Assert(frame.Counter < this.copyEvents.Count); 71Debug.Fail("Invalid CopyCodeAction execution state"); 77Debug.Assert(frame.Counter < this.copyEvents.Count);
System\Xml\Xsl\XsltOld\CopyNamespacesAction.cs (8)
24Debug.Assert(s_Action != null); 29Debug.Assert(processor != null && frame != null); 43Debug.Assert(frame.State == BeginEvent); 44Debug.Assert(frame.Node.NodeType == XPathNodeType.Namespace); 54Debug.Assert(frame.State == EndEvent); 55Debug.Assert(frame.Node.NodeType == XPathNodeType.Namespace); 65Debug.Assert(frame.State == Advance); 66Debug.Assert(frame.Node.NodeType == XPathNodeType.Namespace);
System\Xml\Xsl\XsltOld\CopyNodesetAction.cs (5)
26Debug.Assert(s_Action != null); 31Debug.Assert(processor != null && frame != null); 44Debug.Assert(frame.State == BeginEvent); 54Debug.Assert(frame.State == Contents); 90Debug.Assert(frame.State == EndEvent);
System\Xml\Xsl\XsltOld\CopyOfAction.cs (4)
42Debug.Assert(processor != null && frame != null); 46Debug.Assert(frame.NodeSet != null); 75Debug.Assert(frame.StoredOutput != null); 81Debug.Assert(frame.State == NodeSetCopied);
System\Xml\Xsl\XsltOld\DbgCompiler.cs (7)
62Debug.Assert(this.Debugger != null); 71Debug.Assert(this.Debugger != null); 80Debug.Assert(this.Debugger != null); 86Debug.Assert(variable.VarKey != -1, "Variable was already placed and it should replace prev var."); 104Debug.Assert(0 <= count, "This scope can't have more variables than we have in total"); 105Debug.Assert(count <= this.localVars.Count, "This scope can't have more variables than we have in total"); 553Debug.Assert(compiler.Debugger != null);
System\Xml\Xsl\XsltOld\DocumentScope.cs (4)
28Debug.Assert(prefix != null && prefix.Length > 0); 32Debug.Assert(scope.Uri != null); 41Debug.Assert(prefix != null && prefix.Length > 0); 45Debug.Assert(scope.Uri != null);
System\Xml\Xsl\XsltOld\ElementAction.cs (3)
64Debug.Assert(this.empty == false); 91Debug.Assert(processor != null && frame != null); 133Debug.Fail("Invalid ElementAction execution state");
System\Xml\Xsl\XsltOld\EndEvent.cs (1)
19Debug.Assert(nodeType != XPathNodeType.Namespace);
System\Xml\Xsl\XsltOld\Event.cs (2)
21Debug.Assert(processor.Debugger != null, "We don't generate calls this function if ! debugger"); 22Debug.Assert(DbgData.StyleSheet != null, "We call this function from *EventDbg only");
System\Xml\Xsl\XsltOld\ForeachAction.cs (4)
51Debug.Assert(processor != null && frame != null); 65Debug.Assert(processor.SortArray.Count != 0); 72Debug.Assert(frame.State == ProcessNextNode); 73Debug.Assert(frame.NewNodeSet != null);
System\Xml\Xsl\XsltOld\IfAction.cs (4)
58Debug.Assert(processor != null && frame != null); 63Debug.Assert(this.testKey != Compiler.InvalidQueryKey); 77Debug.Assert(frame.Container != null); 85Debug.Fail("Invalid IfAction execution state");
System\Xml\Xsl\XsltOld\InputScope.cs (1)
85Debug.Assert(variable != null);
System\Xml\Xsl\XsltOld\InputScopeManager.cs (16)
31Debug.Assert(this.scopeStack != null); 32Debug.Assert(this.scopeStack.Parent != null); 54Debug.Assert(this.scopeStack != null, "Push/Pop disbalance"); 67Debug.Assert(this.scopeStack != null, "PushScope wasn't called"); 68Debug.Assert(prefix != null); 69Debug.Assert(nspace != null); 84Debug.Assert(this.scopeStack != null, "PushScope wasn't called"); 85Debug.Assert(!string.IsNullOrEmpty(prefix)); 103Debug.Assert(prefix != null); 111Debug.Assert(prefix != null); 119Debug.Assert(this.scopeStack != null, "PushScope wasn't called"); 120Debug.Assert(nsList != null); 127Debug.Assert(this.scopeStack != null, "PushScope wasn't called"); 137Debug.Assert(this.scopeStack != null, "PushScope wasn't called"); 138Debug.Assert(nsList != null); 145Debug.Assert(this.scopeStack != null, "PushScope wasn't called");
System\Xml\Xsl\XsltOld\MessageAction.cs (3)
43Debug.Assert(processor != null && frame != null); 54Debug.Assert(recOutput != null); 64Debug.Fail("Invalid MessageAction execution state");
System\Xml\Xsl\XsltOld\NamespaceEvent.cs (4)
20Debug.Assert(input != null); 21Debug.Assert(input.NodeType == XPathNodeType.Namespace); 41Debug.Assert(res); // Namespace node as any other attribute can't fail because it doesn't signal record change 43Debug.Assert(res);
System\Xml\Xsl\XsltOld\NavigatorInput.cs (2)
179Debug.Assert(navigator.NameTable != null); 201Debug.Assert(_Navigator != null);
System\Xml\Xsl\XsltOld\NavigatorOutput.cs (3)
33Debug.Assert(record != null); 42Debug.Assert(record.AttributeList[attrib] is BuilderInfo); 86Debug.Fail("Invalid NodeType on output: " + mainNode.NodeType);
System\Xml\Xsl\XsltOld\NewInstructionAction.cs (2)
47Debug.Assert(processor != null && frame != null); 65Debug.Fail("Invalid Container action execution state");
System\Xml\Xsl\XsltOld\NumberAction.cs (14)
81Debug.Assert(dblVal >= 1); 234Debug.Assert( 302Debug.Assert(nav.NodeType != XPathNodeType.Attribute && nav.NodeType != XPathNodeType.Namespace); 303Debug.Assert(MatchCountKey(processor, contextNode, nav)); 313Debug.Fail("We implementing preceding-sibling::node() and some how miss context node 'nav'"); 326Debug.Assert(!(value is int)); 344Debug.Assert(processor != null && frame != null); 348Debug.Assert(frame != null); 349Debug.Assert(frame.NodeSet != null); 388Debug.Assert(frame.StoredOutput != null); 396Debug.Fail("Invalid Number Action execution state"); 449Debug.Assert(prefix == null || prefix.isSeparator); 466Debug.Assert(thisSeparator.isSeparator); 471Debug.Assert(!thisFormat.isSeparator);
System\Xml\Xsl\XsltOld\OutKeywords.cs (1)
20Debug.Assert(nameTable != null);
System\Xml\Xsl\XsltOld\OutputScope.cs (1)
72Debug.Assert(urn != null);
System\Xml\Xsl\XsltOld\OutputScopeManager.cs (14)
30Debug.Assert(this.elementScopesStack.Peek() != null); // We adding rootElementScope to garantee this 44Debug.Assert(nameTable != null); 45Debug.Assert(atoms != null); 63Debug.Assert(prefix != null); 64Debug.Assert(nspace != null); 73Debug.Assert(name != null); 74Debug.Assert(nspace != null); 75Debug.Assert(prefix != null); 84Debug.Assert(elementScope != null); 91Debug.Assert(elementScope != null); // We adding rootElementScope to garantee this 104Debug.Assert(prefix != null); 119Debug.Assert(this.elementScopesStack[i] is OutputScope); 134Debug.Assert(nspace != null); 136Debug.Assert(this.elementScopesStack[i] is OutputScope);
System\Xml\Xsl\XsltOld\PrefixQname.cs (1)
32Debug.Assert(qname != null);
System\Xml\Xsl\XsltOld\ProcessingInstructionAction.cs (3)
65Debug.Assert(processor != null && frame != null); 87Debug.Assert(frame.StoredOutput != null); 105Debug.Fail("Invalid ElementAction execution state");
System\Xml\Xsl\XsltOld\Processor.cs (44)
127Debug.Assert(this.execResult == ExecResult.Continue); 138Debug.Assert(this.resolver != null, "Constructor should create it if null passed"); 145Debug.Assert(this.sortArray != null, "InitSortArray() wasn't called"); 186Debug.Assert(this.sortArray != null, "InitSortArray() wasn't called"); 398Debug.Assert(this.actionStack != null); 404Debug.Assert(this.builder != null); 432Debug.Assert(frame != null); 456Debug.Assert(this.templateLookup != null); 462Debug.Assert(key != Compiler.InvalidQueryKey); 467Debug.Assert(key != Compiler.InvalidQueryKey); 480Debug.Assert(key != Compiler.InvalidQueryKey); 550Debug.Assert(nav.NodeType == XPathNodeType.Element); 651Debug.Assert(this.builder != null); 659Debug.Assert(this.xsm != null); 671Debug.Assert(StateMachine.StateOnly(stateOutlook) == this.xsm.State); 672Debug.Assert(ExecutionResult == ExecResult.Continue); 676Debug.Assert(StateMachine.StateOnly(stateOutlook) == this.xsm.State); 688Debug.Fail("Unexpected result of RecordBuilder.BeginEvent()"); 698Debug.Assert(this.xsm != null); 709Debug.Assert(StateMachine.StateOnly(stateOutlook) == this.xsm.State); 710Debug.Assert(ExecutionResult == ExecResult.Continue); 714Debug.Assert(StateMachine.StateOnly(stateOutlook) == this.xsm.State); 724Debug.Fail("Unexpected result of RecordBuilder.TextEvent()"); 730Debug.Assert(this.xsm != null); 742Debug.Assert(StateMachine.StateOnly(stateOutlook) == this.xsm.State); 746Debug.Assert(StateMachine.StateOnly(stateOutlook) == this.xsm.State, 756Debug.Fail("Unexpected result of RecordBuilder.TextEvent()"); 782Debug.Fail("Invalid XPathNodeType in CopyBeginEvent"); 809Debug.Fail("Invalid XPathNodeType in CopyTextEvent"); 837Debug.Fail("Invalid XPathNodeType in CopyEndEvent"); 845Debug.Assert(navigator != null); 864Debug.Assert(output != null); 874Debug.Assert(this.builder != null); 915Debug.Assert(saveStackSize == this.actionStack.Length); 917Debug.Assert(result != null, "Variable was just calculated and result can't be null"); 925Debug.Assert(1 < actionStack.Length); 936Debug.Assert(2 < actionStack.Length); 949Debug.Assert(this.Debugger != null, "We don't generate calls this function if ! debugger"); 959Debug.Assert(this.Debugger != null, "We don't generate calls this function if ! debugger"); 964Debug.Assert(this.Debugger != null, "We don't generate calls this function if ! debugger"); 966Debug.Assert(dbgFrame != null, "PushDebuggerStack() wasn't ever called"); 972Debug.Assert(this.Debugger != null, "We don't generate calls this function if ! debugger"); 973Debug.Assert(2 <= this.debuggerStack.Length); 978Debug.Assert(this.Debugger != null, "We don't generate calls this function if ! debugger");
System\Xml\Xsl\XsltOld\ReaderOutput.cs (29)
48Debug.Assert(processor != null); 49Debug.Assert(processor.NameTable != null); 164Debug.Assert(ordinal >= 0); 168Debug.Assert(ordinal == -1); 176Debug.Assert(ordinal >= 0); 180Debug.Assert(ordinal == -1); 205Debug.Assert(ordinal >= 0); 210Debug.Assert(ordinal == -1); 218Debug.Assert(ordinal >= 0); 223Debug.Assert(ordinal == -1); 237Debug.Assert(this.attributeCount == 0); 265Debug.Assert(this.processor != null || this.state == ReadState.Closed); 293Debug.Assert(this.Value.Length != 0, "It whould be Whitespace in this case"); 306Debug.Assert(this.processor.ExecutionDone); 378Debug.Assert(this.builder != null); 382Debug.Assert(NodeType == XmlNodeType.EndElement); 410Debug.Assert(this.builder != null); 439Debug.Assert(this.nameTable != null); 454Debug.Assert(NodeType != XmlNodeType.EntityReference); 512Debug.Assert(0 <= attrib && attrib < this.attributeCount); 513Debug.Assert(0 <= attrib && attrib < this.attributeList.Count); 514Debug.Assert(this.attributeList[attrib] is BuilderInfo); 525Debug.Assert(this.attributeList[attrib] is BuilderInfo); 539Debug.Assert(this.attributeList[index] is BuilderInfo); 558Debug.Assert(this.attributeList[index] is BuilderInfo); 580Debug.Assert(this.currentInfo != null); 581Debug.Assert(this.attributeCount == 0 || this.attributeList != null); 582Debug.Assert((this.currentIndex == -1) == (this.currentInfo == this.mainNode)); 583Debug.Assert((this.currentIndex == -1) || (this.currentInfo == this.attributeValue || this.attributeList[this.currentIndex] is BuilderInfo && this.attributeList[this.currentIndex] == this.currentInfo));
System\Xml\Xsl\XsltOld\RecordBuilder.cs (24)
59Debug.Assert(output != null); 105Debug.Assert(this.recordState != HaveRecord); 125Debug.Assert(this.recordState == NoRecord || (state & StateMachine.BeginRecord) == 0); 173Debug.Assert(this.recordState == NoRecord || (state & StateMachine.BeginRecord) == 0); 233Debug.Assert(this.attributeCount <= this.attributeList.Count); 236Debug.Assert(this.attributeList[attrib] != null && this.attributeList[attrib] is BuilderInfo); 256Debug.Assert(this.attributeCount == 0); 269Debug.Assert(this.attributeCount == 0); 281Debug.Assert(this.attributeCount == this.attributeList.Count); 294Debug.Assert(this.attributeList[attrib] != null && this.attributeList[attrib] is BuilderInfo); 365Debug.Assert(this.recordState == NoRecord || this.recordState == SomeRecord); 388Debug.Assert(this.recordState == NoRecord || this.recordState == SomeRecord); 403Debug.Assert(this.recordState == NoRecord || this.recordState == SomeRecord); 418Debug.Assert(this.mainNode != null); 427Debug.Assert(this.mainNode.NodeType == XmlNodeType.Element); 430Debug.Assert(this.attributeList[attr] is BuilderInfo); 447Debug.Assert(this.mainNode.NodeType == XmlNodeType.Element); 485Debug.Assert(this.attributeList[attr] is BuilderInfo); 525Debug.Assert(this.mainNode.NodeType == XmlNodeType.Comment); 526Debug.Assert((object) this.currentInfo == (object) this.mainNode); 568Debug.Assert(this.mainNode.NodeType == XmlNodeType.ProcessingInstruction || this.mainNode.NodeType == XmlNodeType.XmlDeclaration); 630Debug.Assert(this.namespaceCount == this.namespaceList.Count); 639Debug.Assert(this.namespaceList[index] != null && this.namespaceList[index] is BuilderInfo); 665Debug.Assert(prefix != null && prefix.Length > 0);
System\Xml\Xsl\XsltOld\RootAction.cs (6)
173Debug.Assert(mark == null); 226Debug.Assert(processor != null && frame != null); 241Debug.Assert(frame.State == QueryInitialized); 243Debug.Assert(Processor.IsRoot(frame.Node)); 255Debug.Assert(frame.State == RootProcessed); 259Debug.Fail("Invalid RootAction execution state");
System\Xml\Xsl\XsltOld\SequentialOutput.cs (22)
111Debug.Assert(record.MainNode.NodeType == XmlNodeType.Element); 155Debug.Assert(! this.isHtmlOutput || mainNode.Prefix != null, "Html can't have abreviated elements"); 197Debug.Assert(i < node.TextInfoCount, "disableEscaping marker can't be last TextInfo record"); 212Debug.Assert(this.outputDoctype == true, "It supposed to check this condition before actual call"); 213Debug.Assert(this.output.DoctypeSystem != null || (this.isHtmlOutput && this.output.DoctypePublic != null), "We set outputDoctype == true only if"); 241Debug.Assert(this.outputXmlDecl == true, "It supposed to check this condition before actual call"); 242Debug.Assert(this.isXmlOutput && ! this.output.OmitXmlDeclaration, "We set outputXmlDecl == true only if"); 361Debug.Assert(this.outputCache[record] is BuilderInfo); 387Debug.Fail("Should never get here"); 425Debug.Fail("Should never get here"); 433Debug.Fail("Should never get here"); 454Debug.Fail("Should never get here"); 479Debug.Assert(value != null); 484Debug.Assert(value != null); 511Debug.Assert(value != null); 512Debug.Assert(this.isHtmlOutput); 558Debug.Assert(value != null); 559Debug.Assert(find.Length == replace.Length); 583Debug.Assert(0 <= i, "find char wasn't realy find"); 600Debug.Assert(value != null); 605Debug.Assert(count <= list.Count); 607Debug.Assert(list[attrib] is BuilderInfo);
System\Xml\Xsl\XsltOld\SortAction.cs (2)
146Debug.Assert(processor != null && frame != null); 147Debug.Assert(frame.State == Initialized);
System\Xml\Xsl\XsltOld\StateMachine.cs (4)
96Debug.Assert(newState != Assrt); 102Debug.Assert(newState != Assrt); 112Debug.Assert(newState != Assrt); 118Debug.Assert(newState != Assrt);
System\Xml\Xsl\XsltOld\Stylesheet.cs (20)
128Debug.Assert(attributeSet.Name != null); 132Debug.Assert(this.attributeSetTable != null); 150Debug.Assert(this.templateNameTable != null); 166Debug.Assert(this.modeManagers != null); 180Debug.Assert(this.templates == null); 184Debug.Assert(manager != null); 195Debug.Assert(enumerator.Value is TemplateManager); 203Debug.Assert(this.imports[importIndex] is Stylesheet); 205Debug.Assert(stylesheet != null); 246Debug.Assert(processor != null && navigator != null); 247Debug.Assert(mode != null); 257Debug.Assert(manager.Mode.Equals(mode)); 282Debug.Assert(this.imports[importIndex] is Stylesheet); 284Debug.Assert(stylesheet != null); 302Debug.Assert(processor != null && navigator != null); 303Debug.Assert(this.templates == null && this.modeManagers == null || this.templates == this.modeManagers[XmlQualifiedName.Empty]); 345Debug.Assert(this.imports[importIndex] is Stylesheet); 347Debug.Assert(stylesheet != null); 373Debug.Assert(this.imports[importIndex] is Stylesheet); 375Debug.Assert(stylesheet != null);
System\Xml\Xsl\XsltOld\TemplateAction.cs (8)
45Debug.Assert(this.templateId == 0); 85Debug.Assert(this.matchKey == Compiler.InvalidQueryKey); 89Debug.Assert(this.name == null); 93Debug.Assert(Double.IsNaN(this.priority)); 100Debug.Assert(this.mode == null); 127Debug.Assert(!(union.qy2 is UnionExpr), "only qy1 can be union"); 202Debug.Assert(processor != null && frame != null); 221Debug.Fail("Invalid Container action execution state");
System\Xml\Xsl\XsltOld\TemplateLookupAction.cs (7)
25Debug.Assert(processor != null && frame != null); 26Debug.Assert(frame.State == Initialized); 56Debug.Assert(node != null); 92Debug.Assert(processor != null && frame != null); 93Debug.Assert(frame.State == Initialized); 94Debug.Assert(processor.Debugger != null); 101Debug.Assert(this.mode != Compiler.BuiltInMode);
System\Xml\Xsl\XsltOld\Templatemanager.cs (8)
23Debug.Assert(x != null && x is TemplateAction); 24Debug.Assert(y != null && y is TemplateAction); 29Debug.Assert(! Double.IsNaN(tx.Priority)); 30Debug.Assert(! Double.IsNaN(ty.Priority)); 33Debug.Assert(tx.TemplateId != ty.TemplateId || tx == ty); 54Debug.Assert(template != null); 55Debug.Assert( 79Debug.Assert(this.templates != null);
System\Xml\Xsl\XsltOld\TextAction.cs (2)
64Debug.Assert(processor != null && frame != null); 74Debug.Fail("Invalid execution state in TextAction");
System\Xml\Xsl\XsltOld\TextEvent.cs (2)
21Debug.Assert(text != null); 27Debug.Assert(input.NodeType == XPathNodeType.Text || input.NodeType == XPathNodeType.SignificantWhitespace);
System\Xml\Xsl\XsltOld\UseAttributesetsAction.cs (3)
27Debug.Assert(Ref.Equal(compiler.Input.LocalName, compiler.Atoms.UseAttributeSets)); 30Debug.Assert(this.useAttributeSets == null); 76Debug.Fail("Invalid Container action execution state");
System\Xml\Xsl\XsltOld\ValueOfAction.cs (11)
24Debug.Assert(s_BuiltInRule != null); 52Debug.Assert(processor != null && frame != null); 56Debug.Assert(frame != null); 57Debug.Assert(frame.NodeSet != null); 71Debug.Assert(frame.StoredOutput != null); 77Debug.Fail("Invalid ValueOfAction execution state"); 86Debug.Assert(processor != null && frame != null); 90Debug.Assert(frame != null); 91Debug.Assert(frame.NodeSet != null); 105Debug.Assert(frame.StoredOutput != null); 111Debug.Fail("Invalid BuiltInRuleTextAction execution state");
System\Xml\Xsl\XsltOld\VariableAction.cs (5)
86Debug.Assert(this.name == null && this.nameStr == null); 101Debug.Assert(processor != null && frame != null && frame.State != ValueCalculated); 145Debug.Assert(recOutput is NavigatorOutput); 150Debug.Assert(value != null); 156Debug.Fail("Invalid execution state inside VariableAction.Execute");
System\Xml\Xsl\XsltOld\WithParamAction.cs (3)
33Debug.Assert(processor != null && frame != null); 56Debug.Assert(recOutput is NavigatorOutput); 61Debug.Fail("Invalid execution state inside VariableAction.Execute");
System\Xml\Xsl\XsltOld\WriterOutput.cs (4)
50Debug.Assert(false, "XSLT never gives us CDATA"); 79Debug.Fail("Invalid NodeType on output: " + mainNode.NodeType); 93Debug.Assert(list.Count >= count); 95Debug.Assert(list[attrib] is BuilderInfo);
System\Xml\Xsl\XsltOld\XsltCompileContext.cs (11)
214Debug.Assert(thisUri != null && baseUri != null); 278Debug.Assert( 289Debug.Assert( 551Debug.Assert(it != null); 613Debug.Assert(false, "unexpected XPath type"); 755Debug.Assert(resultCollection.Count != 0); 756Debug.Assert(newList.Count != 0); 759Debug.Assert(resultCollection[0] is XPathNavigator); 791Debug.Assert(extension != null); 792Debug.Assert(method != null); 819Debug.Assert(args.Length <= this.Minargs, "We cheking this on resolve time");
System\Xml\Xsl\XsltOld\XsltOutput.cs (2)
128Debug.Assert(this.encoding != null); 186Debug.Assert(false);
System.Drawing (191)
commonui\System\Drawing\Advanced\Font.cs (9)
59Debug.Assert(this.nativeFont == IntPtr.Zero, "nativeFont already initialized, this will generate a handle leak."); 60Debug.Assert(this.fontFamily != null, "fontFamily not initialized."); 89Debug.Assert(info != null, "Didn't expect a null parameter"); 117Debug.Fail("Unknown serialization item for font: " + sie.Name); 304Debug.Assert(this.nativeFont == IntPtr.Zero, "GDI+ native font already initialized, this will generate a handle leak" ); 305Debug.Assert(nativeFont != IntPtr.Zero, "nativeFont is null"); 532Debug.Assert( this.nativeFont != IntPtr.Zero, "this.nativeFont == IntPtr.Zero." ); 546Debug.Assert(this.fontFamily != null, "fontFamily should never be null"); 600Debug.Fail( "Exception thrown during Dispose: " + ex.ToString() );
commonui\System\Drawing\Advanced\FontCollection.cs (1)
75Debug.Assert(numSought == numFound, "GDI+ can't give a straight answer about how many fonts there are");
commonui\System\Drawing\Advanced\FontFamily.cs (3)
49Debug.Assert( this.nativeFamily == IntPtr.Zero, "Setting GDI+ native font family when already initialized." ); 50Debug.Assert( family != IntPtr.Zero, "Setting GDI+ native font family to null." ); 292Debug.Fail("Exception thrown during Dispose: " + ex.ToString());
commonui\System\Drawing\Advanced\Gdiplus.cs (15)
124Debug.WriteLineIf(GdiPlusInitialization.TraceVerbose, "Releasing TLS data"); 138Debug.Assert(initToken == IntPtr.Zero, "GdiplusInitialization: Initialize should not be called more than once in the same domain!"); 139Debug.WriteLineIf(GdiPlusInitialization.TraceVerbose, "Initialize GDI+ [" + AppDomain.CurrentDomain.FriendlyName + "]"); 140Debug.Indent(); 153Debug.Unindent(); 174Debug.WriteLineIf(GdiPlusInitialization.TraceVerbose, "Shutdown GDI+ [" + AppDomain.CurrentDomain.FriendlyName + "]"); 175Debug.Indent(); 178Debug.WriteLineIf(GdiPlusInitialization.TraceVerbose, "Not already shutdown"); 211Debug.Unindent(); 222Debug.WriteLineIf(GdiPlusInitialization.TraceVerbose, "Process exited"); 3165Debug.Assert(status != Ok, "Throwing an exception for an 'Ok' return code"); 3186Debug.Fail("We should be special casing FontFamilyNotFound so we can provide the font name"); 3190Debug.Fail("We should be special casing FontStyleNotFound so we can provide the font name"); 3194Debug.Fail("We should be special casing NotTrueTypeFont so we can provide the font name"); 4405Debug.Assert( lf != null, "lf is null" );
commonui\System\Drawing\Advanced\GraphicsPath.cs (1)
233Debug.Fail( "Exception thrown during Dispose: " + ex.ToString() );
commonui\System\Drawing\Advanced\GraphicsPathIterator.cs (1)
80Debug.Fail( "Exception thrown during Dispose: " + ex.ToString() );
commonui\System\Drawing\Advanced\HatchBrush.cs (1)
68Debug.Assert( nativeBrush != IntPtr.Zero, "Initializing native brush with null." );
commonui\System\Drawing\Advanced\ImageAttributes.cs (1)
117Debug.Fail( "Exception thrown during Dispose: " + ex.ToString() );
commonui\System\Drawing\Advanced\ImageFormatConverter.cs (1)
144Debug.Assert(prop.GetValue(null, tempIndex) != null, "Property " + prop.Name + " returned NULL");
commonui\System\Drawing\Advanced\LinearGradientBrush.cs (1)
264Debug.Assert( nativeBrush != IntPtr.Zero, "Initializing native brush with null." );
commonui\System\Drawing\Advanced\PathGradientBrush.cs (1)
178Debug.Assert( nativeBrush != IntPtr.Zero, "Initializing native brush with null." );
commonui\System\Drawing\Advanced\PrivateFontCollection.cs (1)
80Debug.Fail( "Exception thrown during Dispose: " + ex.ToString() );
commonui\System\Drawing\Advanced\SafeCustomLineCapHandle.cs (2)
42Debug.Fail("Exception thrown during ReleaseHandle: " + ex.ToString()); 47Debug.Assert(status == SafeNativeMethods.Gdip.Ok, "GDI+ returned an error status: " + status.ToString(CultureInfo.InvariantCulture));
commonui\System\Drawing\Advanced\StringFormat.cs (8)
197Debug.Fail( "Exception thrown during Dispose: " + ex.ToString() ); 241Debug.Assert(nativeFormat != IntPtr.Zero, "NativeFormat is null!"); 273Debug.Assert(nativeFormat != IntPtr.Zero, "NativeFormat is null!"); 288Debug.Assert(nativeFormat != IntPtr.Zero, "NativeFormat is null!"); 304Debug.Assert(nativeFormat != IntPtr.Zero, "NativeFormat is null!"); 317Debug.Assert(nativeFormat != IntPtr.Zero, "NativeFormat is null!"); 334Debug.Assert(nativeFormat != IntPtr.Zero, "NativeFormat is null!"); 349Debug.Assert(nativeFormat != IntPtr.Zero, "NativeFormat is null!");
commonui\System\Drawing\Advanced\SystemColorTracker.cs (6)
39Debug.Assert(list != null, "List is null"); 40Debug.Assert(list.Length > 0, "INITIAL_SIZE was initialized after list"); 61Debug.Assert(list[index].Target == null, "Trying to reuse a weak reference that isn't broken yet: list[" + index + "], length =" + list.Length); 99Debug.Assert(count >= 0 && count <= list.Length, "count not a legal index into list"); 127Debug.Fail("SystemColorTracker is using way more memory than expected."); 137Debug.Assert(list[i] != null, "null value in active part of list");
commonui\System\Drawing\Advanced\TextureBrush.cs (1)
294Debug.Assert( nativeBrush != IntPtr.Zero, "Initializing native brush with null." );
commonui\System\Drawing\Brush.cs (3)
58Debug.Assert( brush != IntPtr.Zero, "WARNING: Assigning null to the GDI+ native brush object."); 59Debug.Assert( this.nativeBrush == IntPtr.Zero, "WARNING: Initialized GDI+ native brush object being assigned a new value."); 114Debug.Fail( "Exception thrown during Dispose: " + ex.ToString() );
commonui\System\Drawing\BufferedGraphics.cs (1)
104Debug.Assert(bufferedGraphicsSurface != null, "The BufferedGraphicsSurface is null!");
commonui\System\Drawing\BufferedGraphicsContext.cs (22)
117Debug.WriteLineIf(DoubleBuffering.TraceWarning, "Too big of buffer requested (" + targetRectangle.Width + " x " + targetRectangle.Height + ") ... allocating temp buffer manager"); 132Debug.WriteLineIf(DoubleBuffering.TraceWarning, "Too big of buffer requested (" + targetRectangle.Width + " x " + targetRectangle.Height + ") ... allocating temp buffer manager"); 153Debug.WriteLineIf(DoubleBuffering.TraceWarning, "Attempt to have two buffers for a buffer manager... allocating temp buffer manager"); 335Debug.WriteLineIf(DoubleBuffering.TraceVerbose, "8 bit or less..."); 342Debug.WriteLineIf(DoubleBuffering.TraceVerbose, "using halftone palette..."); 347Debug.WriteLineIf(DoubleBuffering.TraceVerbose, "using custom palette..."); 360Debug.WriteLineIf(DoubleBuffering.TraceWarning, "bFillColorTable: MyGetSystemPaletteEntries failed\n"); 385Debug.WriteLineIf(DoubleBuffering.TraceInfo, "allocating new bitmap: " + width + " x " + height); 393Debug.WriteLineIf(DoubleBuffering.TraceInfo, " new size : " + optWidth + " x " + optHeight); 403Debug.WriteLineIf(DoubleBuffering.TraceInfo, " Create compatGraphics"); 529Debug.WriteLineIf(DoubleBuffering.TraceVerbose, "restoring bitmap to DC"); 535Debug.WriteLineIf(DoubleBuffering.TraceVerbose, "delete compat DC"); 549Debug.Assert(oldBitmap == IntPtr.Zero); 550Debug.WriteLineIf(DoubleBuffering.TraceVerbose, "delete dib"); 562Debug.WriteLineIf(DoubleBuffering.TraceInfo, "Dispose(" + disposing + ") {"); 563Debug.Indent(); 576Debug.WriteLineIf(DoubleBuffering.TraceVerbose, "Disposing compatGraphics"); 582Debug.Fail("Never let a graphics buffer finalize!"); 589Debug.WriteLineIf(DoubleBuffering.TraceVerbose, "Disposing buffer"); 596Debug.Unindent(); 597Debug.WriteLineIf(DoubleBuffering.TraceInfo, "}"); 650Debug.Assert(buffer == this.buffer, "Tried to release a bogus buffer");
commonui\System\Drawing\Color.cs (1)
1493Debug.Assert(false, "Could not find known color '" + ((KnownColor) knownColor) + "' in the KnownColorTable");
commonui\System\Drawing\ColorConverter.cs (1)
317Debug.Assert(member != null, "Could not convert color to member. Did someone change method name / signature and not update Colorconverter?");
commonui\System\Drawing\Design\ToolboxItem.cs (2)
828Debug.WriteLine("Persisting: " + GetType().Name); 829Debug.WriteLine("\tDisplay Name: " + DisplayName);
commonui\System\Drawing\FontConverter.cs (2)
329Debug.Assert(name != null && size != null && units != null && 638Debug.Assert(name != null, "Expected an actual font name to match in FontNameConverter::MatchFontName.");
commonui\System\Drawing\Graphics.cs (10)
149Debug.Assert(hdc != IntPtr.Zero, "Must pass in a valid DC"); 174Debug.Assert(hdc != IntPtr.Zero, "Must pass in a valid DC"); 175Debug.Assert(hdevice != IntPtr.Zero, "Must pass in a valid device"); 259Debug.Assert( this.nativeGraphics != IntPtr.Zero, "this.nativeGraphics == IntPtr.Zero." ); 330Debug.Assert( hdc == this.nativeHdc, "Invalid hdc."); 417Debug.Fail("Exception thrown during disposing: \r\n" + ex.ToString()); 691Debug.Assert( this.printingHelper == null, "WARNING: Overwritting the printing helper reference!" ); 4392Debug.Assert(context != null && context.State != 0, "GraphicsContext object is null or not valid."); 4406Debug.Assert(this.previousContext != null, "Trying to restore a context when the stack is empty"); 4418Debug.Fail("Warning: context state not found!");
commonui\System\Drawing\Icon.cs (6)
102Debug.Assert(f != null, "File.OpenRead returned null instead of throwing an exception"); 660Debug.Assert((icondirEntrySize * (idCount - 1) + icondirSize) <= iconData.Length, "Illegal number of ICONDIRENTRIES"); 736Debug.Assert(bestImageOffset >= 0 && bestBytesInRes >= 0 && (bestImageOffset + bestBytesInRes) <= iconData.Length, "Illegal offset/length for the Icon data"); 901Debug.Assert(sourceData.Height == targetData.Height, "Unexpected height. How did this happen?"); 967Debug.Assert(bestImageOffset >= 0 && (bestImageOffset + bestBytesInRes) <= iconData.Length, "Illegal offset/length for the Icon data"); 1101Debug.Assert(bitmap != null, "Bitmap cannot be null");
commonui\System\Drawing\Image.cs (8)
104Debug.Fail("failure: " + e.ToString()); 107Debug.Fail("failure: " + e.ToString()); 110Debug.Fail("failure: " + e.ToString()); 113Debug.Fail("failure: " + e.ToString()); 116Debug.Fail("failure: " + e.ToString()); 119Debug.Fail("failure: " + e.ToString()); 383Debug.Fail( "Exception thrown during Dispose: " + ex.ToString() ); 1079Debug.Assert(count >= 0, "FrameDimensionsList returns bad count");
commonui\System\Drawing\ImageAnimator.cs (3)
213Debug.Assert(threadWriterLockWaitCount >= 0, "threadWriterLockWaitCount less than zero."); 298Debug.Assert(threadWriterLockWaitCount >= 0, "threadWriterLockWaitCount less than zero."); 334Debug.Assert(imageInfoList != null, "Null images list");
commonui\System\Drawing\ImageConverter.cs (1)
183Debug.Assert( rawData != null, "rawData is null." );
commonui\System\Drawing\ImageInfo.cs (1)
50Debug.Assert(values.Length == 4 * FrameCount, "PropertyItem has invalid value byte array");
commonui\System\Drawing\Pen.cs (1)
223Debug.Fail( "Exception thrown during Dispose: " + ex.ToString() );
commonui\System\Drawing\Printing\DefaultPrintController.cs (5)
50Debug.Assert(dc == null && graphics == null, "PrintController methods called in the wrong order?"); 91Debug.Assert(dc != null && graphics == null, "PrintController methods called in the wrong order?"); 105Debug.Assert(result == dc.Hdc, "ResetDC didn't return the same handle I gave it"); 152Debug.Assert(dc != null && graphics != null, "PrintController methods called in the wrong order?"); 181Debug.Assert(dc != null && graphics == null, "PrintController methods called in the wrong order?");
commonui\System\Drawing\Printing\PageSettings.cs (1)
53Debug.Assert(printerSettings != null, "printerSettings == null");
commonui\System\Drawing\Printing\PreviewPrintController.cs (4)
59Debug.Assert(dc == null && graphics == null, "PrintController methods called in the wrong order?"); 93Debug.Assert(dc != null && graphics == null, "PrintController methods called in the wrong order?"); 167Debug.Assert(dc != null && graphics != null, "PrintController methods called in the wrong order?"); 185Debug.Assert(dc != null && graphics == null, "PrintController methods called in the wrong order?");
commonui\System\Drawing\Printing\PrintController.cs (2)
260Debug.Assert((modeHandle != null), "modeHandle is null. Someone must have forgot to call base.StartPrint"); 310Debug.Assert((modeHandle != null), "modeHandle is null. Someone must have forgot to call base.StartPrint");
commonui\System\Drawing\Printing\PrintDocument.cs (6)
149Debug.Fail("Can't find System.Windows.Forms.PrintControllerWithStatusDialog, proceeding with StandardPrintController"); 152Debug.Fail("Can't find System.Windows.Forms.PrintControllerWithStatusDialog, proceeding with StandardPrintController"); 155Debug.Fail("Can't find System.Windows.Forms.PrintControllerWithStatusDialog, proceeding with StandardPrintController"); 158Debug.Fail("Can't find System.Windows.Forms.PrintControllerWithStatusDialog, proceeding with StandardPrintController"); 161Debug.Fail("Can't find System.Windows.Forms.PrintControllerWithStatusDialog, proceeding with StandardPrintController"); 164Debug.Fail("Can't find System.Windows.Forms.PrintControllerWithStatusDialog, proceeding with StandardPrintController");
commonui\System\Drawing\Printing\PrinterSettings.cs (4)
1163Debug.Fail("Invalid field in GetModeField"); 1191Debug.Assert(FastDeviceCapabilities(SafeNativeMethods.DC_PAPERS, IntPtr.Zero, -1, printerName) == count, 1196Debug.Assert(FastDeviceCapabilities(SafeNativeMethods.DC_PAPERSIZE, IntPtr.Zero, -1, printerName) == count, 1237Debug.Assert(FastDeviceCapabilities(SafeNativeMethods.DC_BINS, IntPtr.Zero, -1, printerName) == count,
commonui\System\Drawing\Printing\PrinterUnitConvert.cs (1)
123Debug.Fail("Unknown PrinterUnit " + unit);
commonui\System\Drawing\Region.cs (1)
229Debug.Fail( "Exception thrown during Dispose: " + ex.ToString() );
commonui\System\Drawing\SolidBrush.cs (1)
67Debug.Assert( nativeBrush != IntPtr.Zero, "Initializing native brush with null." );
commonui\System\Drawing\SystemBrushes.cs (1)
382Debug.Assert(idx >= 0 && idx < systemBrushes.Length, "System colors have been added but our system color array has not been expanded.");
commonui\System\Drawing\SystemFonts.cs (2)
335Debug.Assert(defaultFont == null); 402Debug.Assert(defaultFont != null, "defaultFont wasn't set!");
commonui\System\Drawing\SystemPens.cs (1)
382Debug.Assert(idx >= 0 && idx < systemPens.Length, "System colors have been added but our system color array has not been expanded.");
commonui\System\Drawing\ToolboxBitmapAttribute.cs (3)
346Debug.Fail("Failed to load toolbox image '" + imageFile + "':\r\n" + e.ToString()); 457Debug.Fail("Failed to load toolbox image for null type:\r\n" + e.ToString()); 460Debug.Fail("Failed to load toolbox image for '" + t.FullName + "':\r\n" + e.ToString());
misc\ClientUtils.cs (3)
86System.Diagnostics.Debug.Assert(maxNumberOfBitsOn >=0 && maxNumberOfBitsOn<32, "expect this to be greater than zero and less than 32"); 134System.Diagnostics.Debug.Assert(Enum.GetValues(enumValue.GetType()).Length == enumValues.Length, "Not all the enum members were passed in."); 456Debug.Assert(obj != null, "Unexpected null object!");
misc\DebugHandleTracker.cs (18)
92Debug.WriteLine("------------Begin--CheckLeaks--------------------"); 98Debug.WriteLine("-------------End--CheckLeaks---------------------"); 145Debug.WriteLine("*************************************************"); 146Debug.WriteLine("While removing, couldn't find handle: " + Convert.ToString(unchecked((int)handle), 16)); 147Debug.WriteLine("Handle Type : " + handleName); 148Debug.WriteLine(Environment.StackTrace); 149Debug.WriteLine("-------------------------------------------------"); 183Debug.WriteLine("-------------------------------------------------"); 184Debug.WriteLine("Handle Allocating: " + Convert.ToString(unchecked((int)handle), 16)); 185Debug.WriteLine("Handle Type : " + name); 187Debug.WriteLine(Environment.StackTrace); 192Debug.Assert(entry.handle != handle, "Duplicate handle of type " + name); 215Debug.WriteLine("\r\nHandle leaks detected for handles of type " + name + ":"); 218Debug.WriteLine(e.ToString(this)); 261Debug.WriteLine("-------------------------------------------------"); 262Debug.WriteLine("Handle Releaseing: " + Convert.ToString(unchecked((int)handle), 16)); 263Debug.WriteLine("Handle Type : " + name); 265Debug.WriteLine(Environment.StackTrace);
misc\DpiHelper.cs (2)
146System.Diagnostics.Debug.WriteLine(" 'DpiAwarenessValue' is set to 'false', value = " + value); 149System.Diagnostics.Debug.WriteLine("Either 'DpiAwarenessValue' is not set or 'DpiAwarenessValue' set is invalid in app.config, value set = " + value);
misc\GDI\DeviceContext.cs (11)
149Debug.Assert(!this.disposed, "Accessing a disposed DC, forcing recreation of HDC - this will generate a Handle leak!"); 164Debug.Assert( this.hDC != IntPtr.Zero, "Attempt to use deleted HDC - DC type: " + this.dcType ); 180Debug.Assert(this.hDC != IntPtr.Zero, "Cannot get initial state without a valid HDC"); 195Debug.Assert(currentPen == hCurrentPen, "DeviceContext thinks a different pen is selected than the HDC"); 203Debug.Assert(currentBrush == hCurrentBrush, "DeviceContext thinks a different brush is selected than the HDC"); 211Debug.Assert(currentBmp == hCurrentBmp, "DeviceContext thinks a different brush is selected than the HDC"); 323Debug.Assert( hdc != IntPtr.Zero, "hdc == 0" ); 372Debug.Assert( disposing, "WARNING: Finalizing a Display DeviceContext.\r\nReleaseDC may fail when not called from the same thread GetDC was called from." ); 433Debug.Assert( this.dcType == DeviceContextType.Display, "Calling GetDC from a non display/window device." ); 521Debug.Assert(contextStack != null, "Someone is calling RestoreHdc() before SaveHdc()"); 630Debug.Assert(clip.HRegion != IntPtr.Zero);
misc\GDI\NativeMethods.cs (1)
319Debug.Assert( lf != null, "lf is null" );
misc\GDI\UnsafeNativeMethods.cs (3)
191Debug.Assert(hRgnDest.Wrapper != null && hRgnDest.Handle != IntPtr.Zero, "Destination region is invalid"); 192Debug.Assert(hRgnSrc1.Wrapper != null && hRgnSrc1.Handle != IntPtr.Zero, "Source region 1 is invalid"); 193Debug.Assert(hRgnSrc2.Wrapper != null && hRgnSrc2.Handle != IntPtr.Zero, "Source region 2 is invalid");
misc\GDI\WindowsGraphics.cs (4)
67Debug.Assert( dc != null, "null dc!"); 120Debug.Assert( hDc != IntPtr.Zero, "null hDc" ); 164Debug.Assert( g != null, "null Graphics object." ); 294Debug.Fail("Exception thrown during disposing: \r\n" + ex.ToString());
misc\GDI\WindowsRegion.cs (1)
134Debug.Assert(nativeHandle == IntPtr.Zero, "nativeHandle should be null, we're leaking handle");
misc\HandleCollector.cs (1)
252System.Diagnostics.Debug.Fail("Handle collector underflow for type '" + name + "'");
System.IdentityModel (1)
System\IdentityModel\Tokens\EncryptedSecurityTokenHandler.cs (1)
251Debug.WriteLine(text.Substring(0, 40));
System.Management (1)
managementpath.cs (1)
672Debug.Assert(nsPath != null);
System.Messaging (2)
System\Messaging\Message.cs (1)
2232Debug.Assert(bodySize <= bodyArray.Length, "Allocated body array size is bigger than BODY_SIZE property");
System\Messaging\MessageQueue.cs (1)
3984Debug.Assert(this.owner.OutstandingAsyncRequests.Contains(this));
System.Runtime.Remoting (24)
channels\core\corechannel.cs (1)
988Debug.Assert(s!=null, "Resource string lookup failed. Resource name was: \""+key+"\"");
metadata\wsdlparser.cs (8)
4453Debug.Assert(ns.StartsWith("System", StringComparison.Ordinal), "Invalid System type"); 5199Debug.Assert(ns.StartsWith("System", StringComparison.Ordinal), "Invalid System type"); 5472Debug.Assert(false, "GetMethodFlags called on a SimpleSchemaType"); 5504Debug.Assert(bAnonymous == false || _bSUDSType == false); 6404Debug.Assert(false, "!UrtType.None"); 6591Debug.Assert(LookupSimpleType(type.Name) == null, 6601Debug.Assert(LookupComplexType(type.Name) == null, 6878Debug.Assert(!IsEmpty, "Empty namespace " + Name + " being printed");
metadata\wsdlwriter.cs (15)
518Debug.Assert(LookupNamespace(name, assem) == null, "Duplicate Type found"); 1315Debug.Assert(bAnonymous == true, "PhonySchemaType should always be printed as anonymous types"); 1423Debug.Assert(_iFaces == null, "variable set"); 1430Debug.Assert(_methods == null, "variable set"); 1438Debug.Assert(_fields == null, "variable set"); 1477Debug.Assert(xns != null, "Namespace should have been found"); 1521Debug.Assert(xns != null, "SchemaType should have been found"); 1544Debug.Assert(methodXNS != null, "Namespace is null"); 1640Debug.Assert(!field.IsStatic, "Static field"); 2000Debug.Assert(xns != null, "SchemaType should have been found"); 2532Debug.Assert(false, "Static Field"); 2721Debug.Assert(_phonySchemaTypes.Count == 0, "PhonyTypes present"); 2755Debug.Assert(LookupRealSchemaType(rsType.Name) == null, "Duplicate Type found"); 2765Debug.Assert(LookupArraySchemaType(asType.Name) == null, "Duplicate Type found"); 2774Debug.Assert(LookupSimpleSchemaType(ssType.Type.Name) == null, "Duplicate Type found");
System.Security (64)
system\security\cryptography\pkcs\envelopedpkcs7.cs (2)
995Debug.Assert(false); 1036Debug.Assert(index == totalSize / (uint)Marshal.SizeOf(typeof(IntPtr)));
system\security\cryptography\pkcs\pkcsutils.cs (1)
560Debug.Assert(certificates.Count == 1);
system\security\cryptography\pkcs\signerinfo.cs (4)
47Debug.Assert(signedCms != null && pbCmsgSignerInfo != null && !pbCmsgSignerInfo.IsInvalid); 61Debug.Assert(signedCms != null && encodedSignerInfo != null && encodedSignerInfo.Length > 0); 285Debug.Assert(signer != null); 795Debug.Assert(m_signerInfos[index] != null);
system\security\cryptography\xml\signedxml.cs (4)
539System.Diagnostics.Debug.Assert(cloneElem != null); 916System.Diagnostics.Debug.Assert(a != null); 917System.Diagnostics.Debug.Assert(b != null); 918System.Diagnostics.Debug.Assert(count > 0);
system\security\cryptography\xml\SignedXmlDebugLog.cs (52)
210Debug.Assert(key != null, "key != null"); 252Debug.Assert(o != null, "o != null"); 263Debug.Assert(oid != null, "oid != null"); 278Debug.Assert(signedXml != null, "signedXml != null"); 279Debug.Assert(canonicalizationTransform != null, "canonicalizationTransform != null"); 310Debug.Assert(signedXml != null, "signedXml != null"); 311Debug.Assert(formatValidator != null, "formatValidator != null"); 331Debug.Assert(signedXml != null, "signedXml != null"); 332Debug.Assert(signedInfo != null, " signedInfo != null"); 348Debug.Assert(signedXml != null, "signedXml != null"); 375Debug.Assert(signedXml != null, "signedXml != null"); 402Debug.Assert(signedXml != null, "signedXml != null"); 403Debug.Assert(canonicalizationTransform != null, "canonicalizationTransform != null"); 424Debug.Assert(signedXml != null, "signedXml != null"); 440Debug.Assert(signedXml != null, "signedXml != null"); 441Debug.Assert(validAlgorithms != null, "validAlgorithms != null"); 476Debug.Assert(signedXml != null, "signedXml != null"); 477Debug.Assert(validC14nAlgorithms != null, "validC14nAlgorithms != null"); 478Debug.Assert(validTransformAlgorithms != null, "validTransformAlgorithms != null"); 513Debug.Assert(signedXml != null, "signedXml != null"); 594Debug.Assert(signedXml != null, "signedXml != null"); 595Debug.Assert(signatureDescription != null, "signatureDescription != null"); 596Debug.Assert(hash != null, "hash != null"); 597Debug.Assert(asymmetricSignatureFormatter != null, "asymmetricSignatureFormatter != null"); 622Debug.Assert(signedXml != null, "signedXml != null"); 623Debug.Assert(key != null, "key != null"); 643Debug.Assert(signedXml != null, "signedXml != null"); 644Debug.Assert(reference != null, "reference != null"); 690Debug.Assert(signedXml != null, "signedXml != null"); 691Debug.Assert(key != null, "key != null"); 714Debug.Assert(signedXml != null, "signedXml != null"); 715Debug.Assert(certificate != null, "certificate != null"); 737Debug.Assert(signedXml != null, "signedXml != null"); 738Debug.Assert(reference != null, "reference != null"); 766Debug.Assert(signedXml != null, "signedXml != null"); 767Debug.Assert(reference != null, "reference != null"); 768Debug.Assert(actualHash != null, "actualHash != null"); 769Debug.Assert(expectedHash != null, "expectedHash != null"); 807Debug.Assert(signedXml != null, "signedXml != null"); 808Debug.Assert(signatureDescription != null, "signatureDescription != null"); 809Debug.Assert(hashAlgorithm != null, "hashAlgorithm != null"); 810Debug.Assert(asymmetricSignatureDeformatter != null, "asymmetricSignatureDeformatter != null"); 850Debug.Assert(signedXml != null, "signedXml != null"); 851Debug.Assert(mac != null, "mac != null"); 883Debug.Assert(signedXml != null, "signedXml != null"); 884Debug.Assert(certificate != null, "certificate != null"); 885Debug.Assert(chain != null, "chain != null"); 966Debug.Assert(signedXml != null, "signedXml != null"); 967Debug.Assert(reference != null, "reference != null"); 993Debug.Assert(source != null, "source != null"); 994Debug.Assert(!String.IsNullOrEmpty(data), "!String.IsNullOrEmpty(data)"); 995Debug.Assert(InformationLoggingEnabled, "InformationLoggingEnabled");
system\security\cryptography\xml\utils.cs (1)
106Debug.Assert(IsNamespaceNode(a) || IsXmlNamespaceNode(a));
System.ServiceModel (20)
System\ServiceModel\Channels\SharedConnectionListener.cs (19)
75Debug.Print("SharedConnectionListener.BeginAccept() connectionQueue.PendingCount: " + connectionQueue.PendingCount); 301Debug.Print("SharedConnectionListener.Dispose()"); 350Debug.Print("SharedListenerProxy.Open() isReconnecting: " + isReconnecting); 539Debug.Print("SharedListenerProxy.Unregister()"); 553Debug.Print("SharedListenerProxy.LookupListenerSid() listenerUniqueSid: " + listenerUniqueSid); 566Debug.Print("SharedListenerProxy.LookupListenerSid() listenerPid: " + listenerPid); 575Debug.Print("SharedListenerProxy.LookupListenerSid() listenerUserSid: " + listenerUserSid); 591Debug.Print("SharedListenerProxy.LookupListenerSid() listenerUniqueSid: " + listenerUniqueSid); 632Debug.Print("SharedListenerProxy.Register() Register returned status: " + status); 661Debug.Print("SharedListenerProxy.HandleAllowDupHandlePermission() myPid: " + myPid); 663Debug.Print("SharedListenerProxy.HandleAllowDupHandlePermission() notNecessary(ServiceRunningAsLocalSystem): " + notNecessary); 679Debug.Print("SharedListenerProxy.HandleAllowDupHandlePermission() myPid: " + myPid + " myUserSid: " + myUserSid.Value); 681Debug.Print("SharedListenerProxy.HandleAllowDupHandlePermission() notNecessary(RunningUnderTheSameAccount): " + notNecessary); 1148Debug.Print("ListenerServiceHelper.HandleServiceStart() service serviceName: " + serviceName + " is in status serviceStatus: " + serviceStatus); 1164Debug.Print("ListenerServiceHelper.HandleServiceStart() failed when reading the shared memory sharedMemoryName: " + sharedMemoryName + " exception: " + exception); 1216Debug.Print("ListenerServiceHelper.HandleServiceStart() service serviceName: " + serviceName + " is in status serviceStatus: " + serviceStatus); 1223Debug.Print("ListenerServiceHelper.HandleServiceStart() final, service serviceName: " + serviceName + " is in status serviceStatus: " + serviceStatus); 1241Debug.Print("ListenerServiceHelper.HandleServiceStart() final, failed when reading the shared memory sharedMemoryName: " + sharedMemoryName + " exception: " + exception); 1249Debug.Print("ListenerServiceHelper.ExitServiceStatus() pollMin: " + pollMin + " pollMax: " + pollMax + " exit serviceStatus: " + status);
System\ServiceModel\Channels\UnsafeNativeMethods.cs (1)
1151System.Diagnostics.Debug.Assert(hModule != IntPtr.Zero, "GetModuleHandle failed. Dll isn't loaded?");
System.ServiceModel.Activation (10)
System\ServiceModel\Activation\HostedNamedPipeTransportManager.cs (1)
132Debug.Print("HostedNamedPipeTransportManager.OnVia() address: " + address + " calling EnsureServiceAvailable()");
System\ServiceModel\Activation\HostedTcpTransportManager.cs (1)
58Debug.Print("HostedTcpTransportManager.OnVia() address: " + address + " calling EnsureServiceAvailable()");
System\ServiceModel\Activation\HostedTransportConfigurationManager.cs (2)
215Debug.Print("HostedTransportConfigurationManager.AddHostedTransportConfigurationIis7() found TransportConfigurationTypes for protocol: " + protocol + " name: " + element.TransportConfigurationType); 230Debug.Print("HostedTransportConfigurationManager.AddHostedTransportConfigurationIis7() caught exception: " + exception);
System\ServiceModel\Activation\HttpHostedTransportConfiguration.cs (1)
103Debug.Print(message);
System\ServiceModel\Activation\NamedPipeHostedTransportConfiguration.cs (2)
25Debug.Print("NamedPipeHostedTransportConfiguration.ctor() Creating the unique NamedPipeTransportManager with ListenUri:" + listenAddress.BaseAddress); 30Debug.Print("Registering the unique NamedPipeTransportManager with ListenUri:" + listenAddress.BaseAddress);
System\ServiceModel\Activation\TcpHostedTransportConfiguration.cs (2)
26Debug.Print("TcpHostedTransportConfiguration.ctor() Creating the unique TcpTransportManager with ListenUri:" + listenAddress.BaseAddress); 31Debug.Print("Registering the unique TcpTransportManager with ListenUri:" + listenAddress.BaseAddress);
System\ServiceModel\ServiceHostingEnvironment.cs (1)
1445Debug.Print(message);
System.ServiceModel.Internals (2)
System\Runtime\AssertHelper.cs (1)
40Debug.Assert(false, message);
System\Runtime\Interop\SafeEventLogWriteHandle.cs (1)
32Debug.Print("SafeEventLogWriteHandle::RegisterEventSource[" + uncServerName + ", " + sourceName + "] Failed. Last Error: " +
System.ServiceModel.WasHosting (16)
System\ServiceModel\WasHosting\BaseAppDomainProtocolHandler.cs (7)
66Debug.Print("BaseAppDomainProtocolHandler.StartListenerChannel()"); 78Debug.Print("BaseAppDomainProtocolHandler.StartListenerChannel() GetBlob() contains " + listenerChannelDataLength + " bytes"); 82Debug.Print("BaseAppDomainProtocolHandler.StartListenerChannel() calling OnStart()"); 92Debug.Print("BaseAppDomainProtocolHandler.StartListenerChannel() called ReportStarted()"); 96Debug.Print("BaseAppDomainProtocolHandler.StartListenerChannel() failed in OnStart():\r\n" + exception); 114Debug.Print("BaseAppDomainProtocolHandler.StopProtocol() immediate: " + immediate + " calling ReportStopped()"); 122Debug.Print("BaseAppDomainProtocolHandler.StopListenerChannel() listenerChannelId: " + listenerChannelId + " immediate: " + immediate + " calling ReportStopped()");
System\ServiceModel\WasHosting\BaseProcessProtocolHandler.cs (5)
56Debug.Print("BaseProcessProtocolHandler.StartListenerChannel() GetBlob() contains " + listenerChannelDataLength + " bytes"); 59Debug.Print("BaseProcessProtocolHandler.StartListenerChannel() listenerChannelContext.ListenerChannelId: " + listenerChannelContext.ListenerChannelId); 71Debug.Print("BaseProcessProtocolHandler.StartListenerChannel() calling StartAppDomainProtocolListenerChannel(appKey:" + listenerChannelContext.AppKey + " protocolId:" + protocolId + ")"); 89Debug.Print("BaseProcessProtocolHandler.StopProtocol(protocolId:" + protocolId + ", immediate:" + immediate + ")"); 94Debug.Print("BaseProcessProtocolHandler.StopListenerChannel(protocolId:" + protocolId + ", listenerChannelId:" + listenerChannelId + ", immediate:" + immediate + ")");
System\ServiceModel\WasHosting\MetabaseSettingsIis7.cs (4)
135Debug.Print("MetabaseSettingsIis7.CreateTransportSettings() calling ServerManager.GetWebConfiguration() virtualPath: " + relativeVirtualPath); 326Debug.Print("MetabaseSettingsIis7.ctor() adding Protocol: " + protocol + " BindingInformation: " + bindingInformation); 472Debug.Print("MetabaseSettingsIis7.CreateTransportSettings() calling ServerManager.GetWebConfiguration() virtualPath: " + relativeVirtualPath); 659Debug.Print("MetabaseSettingsIis7V2.ctor() adding Protocol: " + protocol + " BindingInformation: " + bindingInformation);
System.Transactions (133)
System\Transactions\DurableEnlistmentState.cs (1)
372Debug.Assert( enlistment.PromotableSinglePhaseNotification != null );
System\Transactions\Enlistment.cs (7)
103Debug.Assert(this is RecoveringInternalEnlistment, "this is RecoveringInternalEnlistment"); 118Debug.Assert(this is PromotableInternalEnlistment, "this is PromotableInternalEnlistment"); 223Debug.Assert(this.transaction != null, "this.transaction != null"); 251Debug.Assert(false, "PromotableSinglePhaseNotification called for a non promotable enlistment."); 322Debug.Assert(this.Transaction.phase0Volatiles.preparedVolatileEnlistments <= 338Debug.Assert(false, "ResourceManagerIdentifier called for non durable enlistment"); 522Debug.Assert(this.transaction.phase1Volatiles.preparedVolatileEnlistments <=
System\Transactions\EnlistmentState.cs (8)
110Debug.Assert( false, string.Format( null, "Invalid Event for InternalEnlistment State; Current State: {0}", this.GetType() )); 117Debug.Assert( false, string.Format( null, "Invalid Event for InternalEnlistment State; Current State: {0}", this.GetType() )); 124Debug.Assert( false, string.Format( null, "Invalid Event for InternalEnlistment State; Current State: {0}", this.GetType() )); 131Debug.Assert( false, string.Format( null, "Invalid Event for InternalEnlistment State; Current State: {0}", this.GetType() )); 138Debug.Assert( false, string.Format( null, "Invalid Event for InternalEnlistment State; Current State: {0}", this.GetType() )); 145Debug.Assert( false, string.Format( null, "Invalid Event for InternalEnlistment State; Current State: {0}", this.GetType() )); 152Debug.Assert( false, string.Format( null, "Invalid Event for InternalEnlistment State; Current State: {0}", this.GetType() )); 159Debug.Assert( false, string.Format( null, "Invalid Event for InternalEnlistment State; Current State: {0}", this.GetType() ));
System\Transactions\InternalTransaction.cs (2)
161Debug.Assert( this.promotedTransaction == null, "A transaction can only be promoted once!" ); 421Debug.Assert( false, "InternalTransaction.DistributedTransactionOutcome - Unexpected TransactionStatus" );
System\Transactions\Oletx\HandleTable.cs (3)
28Debug.Assert(handle != IntPtr.Zero, "handle is invalid"); 37Debug.Assert(handle != IntPtr.Zero, "handle is invalid"); 58Debug.Assert(handle != 0, "invalid handle selected");
System\Transactions\Oletx\OletxCommittableTransaction.cs (1)
68Debug.Assert( ( 0 == this.disposed ), "OletxTransction object is disposed" );
System\Transactions\Oletx\OletxDependentTransaction.cs (1)
51Debug.Assert( ( 0 == this.disposed ), "OletxTransction object is disposed" );
System\Transactions\Oletx\OletxEnlistment.cs (3)
139Debug.Assert( ( null != prepareInfoByteArray ), 358Debug.Assert(this.proxyPrepareInfoByteArray == null, "Unexpected value in this.proxyPrepareInfoByteArray"); 1446Debug.Assert( false, string.Format( null, "this.prepareInfoByteArray == null in RecoveryInformation()" ));
System\Transactions\Oletx\OletxResourceManager.cs (6)
62Debug.Assert( null != transactionManager, "Argument is null" ); 177Debug.Assert( null == value, "set_ResourceManagerShim, value not null" ); 312Debug.Assert( null != oletxTransaction, "Argument is null" ); 313Debug.Assert( null != enlistmentNotification, "Argument is null" ); 761Debug.Assert( null != localResourceManagerShim, "ReenlistThread - localResourceManagerShim is null" ); 766Debug.Assert( false, string.Format( null, "this.prepareInfoByteArray == null in RecoveryInformation()" ));
System\Transactions\Oletx\OleTxTransaction.cs (12)
197Debug.Assert( null != returnValue, "OletxTransaction.GetRealObject - GetTxFromPropToken returned null" ); 276Debug.Assert( ( 0 == this.disposed ), "OletxTransction object is disposed" ); 300Debug.Assert( null != singlePhaseNotification, "Argument is null" ); 301Debug.Assert( ( 0 == this.disposed ), "OletxTransction object is disposed" ); 336Debug.Assert( null != enlistmentNotification, "Argument is null" ); 337Debug.Assert( ( 0 == this.disposed ), "OletxTransction object is disposed" ); 374Debug.Assert( ( 0 == this.disposed ), "OletxTransction object is disposed" ); 419Debug.Assert( ( 0 == this.disposed ), "OletxTransction object is disposed" ); 500Debug.Assert( ( 0 == this.disposed ), "OletxTransction object is disposed" ); 965Debug.Assert( ( null == this.phase1EnlistVolatilementContainer ), 1158Debug.Assert( ( null == this.phase1EnlistVolatilementContainer ), 1357Debug.Assert( 0 <= localCount, "RealOletxTransction.undisposedOletxTransationCount < 0" );
System\Transactions\Oletx\OletxVolatileEnlistment.cs (32)
61Debug.Assert( null != realOletxTransaction, "Argument is null" ); 113Debug.Assert( null != enlistment, "Argument is null" ); 160Debug.Assert( 0 <= this.incompleteDependentClones, "OletxPhase0VolatileEnlistmentContainer.DependentCloneCompleted - incompleteDependentClones < 0" ); 261Debug.Assert( 0 <= outstandingNotifications, "OletxPhase0VolatileEnlistmentContainer.DecrementOutstandingNotifications - outstandingNotifications < 0" ); 346Debug.Assert( false, "OletxPhase0VolatileEnlistmentContainer.OutcomeFromTransaction, outcome is not Commited or Aborted or InDoubt" ); 357Debug.Assert( ( 0 == phase ) && ( 0 == this.outstandingNotifications ) ); 374Debug.Assert( false, "OletxPhase1VolatileEnlistmentContainer.Committed, enlistmentList element is not an OletxVolatileEnlistment." ); 407Debug.Assert( false, "OletxPhase1VolatileEnlistmentContainer.Aborted, enlistmentList element is not an OletxVolatileEnlistment." ); 441Debug.Assert( false, "OletxPhase1VolatileEnlistmentContainer.InDoubt, enlistmentList element is not an OletxVolatileEnlistment." ); 544Debug.Assert( false, "OletxPhase0VolatileEnlistmentContainer.Phase0Request, phase != -1" ); 570Debug.Assert( false, "OletxPhase0VolatileEnlistmentContainer.Phase0Request, enlistmentList element is not an OletxVolatileEnlistment."); 575Debug.Assert( enlistment.enlistDuringPrepareRequired, "OletxPhase0VolatileEnlistmentContainer.Phase0Request, enlistmentList element not marked as EnlistmentDuringPrepareRequired." ); 576Debug.Assert( !abortHint, "OletxPhase0VolatileEnlistmentContainer.Phase0Request, abortingHint is true just before sending Prepares." ); 605Debug.Assert( null != realOletxTransaction, "Argument is null" ); 630Debug.Assert( null != enlistment, "Argument is null" ); 683Debug.Assert( 0 <= this.outstandingNotifications, "OletxPhase1VolatileEnlistmentContainer.DependentCloneCompleted - DependentCloneCompleted < 0" ); 817Debug.Assert( 0 <= this.outstandingNotifications, "OletxPhase1VolatileEnlistmentContainer.DecrementOutstandingNotifications - outstandingNotifications < 0" ); 927Debug.Assert( false, "OletxPhase1VolatileEnlistmentContainer.OutcomeFromTransaction, outcome is not Aborted or InDoubt" ); 967Debug.Assert( false, "OletxPhase1VolatileEnlistmentContainer.Committed, enlistmentList element is not an OletxVolatileEnlistment." ); 998Debug.Assert( false, "OletxPhase1VolatileEnlistmentContainer.Aborted, enlistmentList element is not an OletxVolatileEnlistment." ); 1030Debug.Assert( false, "OletxPhase1VolatileEnlistmentContainer.InDoubt, enlistmentList element is not an OletxVolatileEnlistment." ); 1101Debug.Assert( false, "OletxPhase1VolatileEnlistmentContainer.VoteRequest, enlistmentList element is not an OletxVolatileEnlistment." ); 1220Debug.Assert( false, "OletxVolatileEnlistment.Prepare, no enlistmentNotification member." ); 1258Debug.Assert( false, "OletxVolatileEnlistment.Prepare, invalid state." ); 1308Debug.Assert( false, "OletxVolatileEnlistment.Commit, no enlistmentNotification member." ); 1325Debug.Assert( false, "OletxVolatileEnlistment.Commit, invalid state." ); 1396Debug.Assert( false, "OletxVolatileEnlistment.Rollback, invalid state." ); 1450Debug.Assert( false, "OletxVolatileEnlistment.InDoubt, no enlistmentNotification member." ); 1471Debug.Assert( false, "OletxVolatileEnlistment.InDoubt, invalid state." ); 1567Debug.Assert( false, "OletxVolatileEnlistment.Prepared, no container member." ); 1608Debug.Assert( false, "OletxVolatileEnlistment.Prepared, invalid pending outcome value." ); 1666Debug.Assert( false, "OletxVolatileEnlistment.ForceRollback, no container member." );
System\Transactions\Trace\PlainXmlWriter.cs (3)
116Debug.Assert( localName != null && localName.Length > 0 ); 133Debug.Assert(!this.writingAttribute); 143Debug.Assert(this.writingAttribute);
System\Transactions\Transaction.cs (2)
824Debug.Assert(this.internalTransaction.State != null); 862Debug.Assert(this.internalTransaction.State != null);
System\Transactions\TransactionInterop.cs (1)
61System.Diagnostics.Debug.Assert( oletxTx != null, "transaction.Promote returned null instead of throwing." );
System\Transactions\TransactionScope.cs (3)
651Debug.Assert( rollbackTransaction != null ); 901Debug.Assert( rollbackTransaction != null ); 913Debug.Assert( null != this.dependentTransaction, "null != this.dependentTransaction" );
System\Transactions\TransactionState.cs (46)
768Debug.Assert( tx.State != this, "Changing to the same state." ); 794Debug.Assert( false, string.Format( null, "Invalid Event for State; Current State: {0}", this.GetType() )); 923Debug.Assert( false, string.Format( null, "Invalid Event for State; Current State: {0}", this.GetType() )); 935Debug.Assert( false, string.Format( null, "Invalid Event for State; Current State: {0}", this.GetType() )); 947Debug.Assert( false, string.Format( null, "Invalid Event for State; Current State: {0}", this.GetType() )); 959Debug.Assert( false, string.Format( null, "Invalid Event for State; Current State: {0}", this.GetType() )); 971Debug.Assert( false, string.Format( null, "Invalid Event for State; Current State: {0}", this.GetType() )); 983Debug.Assert( false, string.Format( null, "Invalid Event for State; Current State: {0}", this.GetType() )); 995Debug.Assert( false, string.Format( null, "Invalid Event for State; Current State: {0}", this.GetType() )); 1007Debug.Assert( false, string.Format( null, "Invalid Event for State; Current State: {0}", this.GetType() )); 1019Debug.Assert( false, string.Format( null, "Invalid Event for State; Current State: {0}", this.GetType() )); 1036Debug.Assert( false, string.Format( null, "Invalid Event for State; Current State: {0}", this.GetType() )); 1043Debug.Assert( false, string.Format( null, "Invalid Event for State; Current State: {0}", this.GetType() )); 1050Debug.Assert( false, string.Format( null, "Invalid Event for State; Current State: {0}", this.GetType() )); 1257Debug.Assert( tx.phase0Volatiles.dependentClones >= 0 ); 1260Debug.Assert( tx.phase0Volatiles.preparedVolatileEnlistments <= 1279Debug.Assert( tx.phase1Volatiles.dependentClones >= 0 ); 1452Debug.Assert(tx.promoterType != Guid.Empty, "InternalTransaction.PromoterType was not set in PSPEInitialize"); 1502Debug.Assert( tx.promoter != null, "Transaction Promoter is Null entering SubordinateActive" ); 1769Debug.Assert(tx.promoterType != Guid.Empty, "InternalTransaction.PromoterType was not set in Phase0PSPEInitialize"); 1974Debug.Assert( tx.phase1Volatiles.volatileEnlistmentCount == 1, 2413Debug.Assert( tx.PromotedTransaction != null, "Promoted state not valid for transaction." ); 2445Debug.Assert( tx.PromotedTransaction != null, "Promoted state not valid for transaction." ); 2478Debug.Assert( tx.PromotedTransaction != null, "Promoted state not valid for transaction." ); 2522Debug.Assert( tx.PromotedTransaction != null, "Promoted state not valid for transaction." ); 2560Debug.Assert( tx.PromotedTransaction != null, "Promoted state not valid for transaction." ); 2643Debug.Assert( tx.phase0Volatiles.preparedVolatileEnlistments <= 2657Debug.Assert( tx.phase0WaveDependentCloneCount >= 0 ); 2695Debug.Assert( tx.phase1Volatiles.dependentClones >= 0 ); 2702Debug.Assert( 0 <= tx.abortingDependentCloneCount ); 2777Debug.Assert( tx.PromotedTransaction != null, "Promoted state not valid for transaction." ); 2874Debug.Assert(tx.promotedToken != null, "InternalTransaction.promotedToken is null in TransactionStateDelegatedNonMSDTCBase or one of its derived classes."); 2917Debug.Assert((tx.promoterType == Guid.Empty) || (tx.promoterType == TransactionInterop.PromoterTypeDtc), "Promoted to MSTC but PromoterType is not TransactionInterop.PromoterTypeDtc"); 3315Debug.Assert( tx.phase0Volatiles.VolatileDemux != null, "Volatile Demux must exist for VolatilePrepareDone when promoted." ); 3431Debug.Assert( tx.phase1Volatiles.VolatileDemux != null, "Volatile Demux must exist for VolatilePrepareDone when promoted." ); 3592Debug.Assert( tx.phase1Volatiles.VolatileDemux != null, "Volatile Demux must exist." ); 3657Debug.Assert( tx.PromotedTransaction != null, "Promoted state not valid for transaction." ); 4322Debug.Assert(tx.durableEnlistment != null, "PromotedNonMSDTC state is not valid for transaction"); 4366Debug.Assert(tx.phase0Volatiles.preparedVolatileEnlistments <= 4385Debug.Assert(tx.phase1Volatiles.dependentClones >= 0); 4469Debug.Assert(tx.promotedToken != null, "InternalTransaction.promotedToken is null in TransactionStateDelegatedNonMSDTCBase or one of its derived classes."); 5132Debug.Assert((distributedTx == null), string.Format(null, "PSPEPromote for non-MSDTC promotion returned a distributed transaction.")); 5133Debug.Assert((tx.promotedToken != null), string.Format(null, "PSPEPromote for non-MSDTC promotion did not set InternalTransaction.PromotedToken.")); 5220Debug.Assert( tx.State == _TransactionStateActive, "PSPEPromote called from state other than TransactionStateActive" ); 5247Debug.Assert( tx.State == _TransactionStatePhase0, "Phase0PSPEInitialize called from state other than _TransactionStatePhase0" ); 5271Debug.Assert( returnState == _TransactionStateDelegated ||
System\Transactions\TransactionTable.cs (1)
701Debug.Assert( transactionCount == this.index, "Index changed timing out transactions" );
System\Transactions\VolatileEnlistmentMultiplexing.cs (1)
541Debug.Assert( this.volatileDemux == null, "volatileDemux can only be set once." );
System.Web (91)
Abstractions\HttpFileCollectionWrapper.cs (1)
95Debug.Assert(files != null);
Compilation\CodeDOMUtility.cs (11)
22using Debug = System.Diagnostics.Debug; 50if (WebFormsCompilation.Enabled) Debug.WriteLine("simple string"); 54if (WebFormsCompilation.Enabled) Debug.WriteLine("primitive"); 62if (WebFormsCompilation.Enabled) Debug.WriteLine("primitive to object"); 66if (WebFormsCompilation.Enabled) Debug.WriteLine("array"); 81if (WebFormsCompilation.Enabled) Debug.WriteLine("other"); 99if (WebFormsCompilation.Enabled) Debug.WriteLine("has converter with instance descriptor"); 104if (WebFormsCompilation.Enabled) Debug.WriteLine("persistinfo is a field ref"); 111if (WebFormsCompilation.Enabled) Debug.WriteLine("persistinfo is a property ref"); 132if (WebFormsCompilation.Enabled) Debug.WriteLine("persistinfo is a method invoke"); 148if (WebFormsCompilation.Enabled) Debug.WriteLine("persistinfo is a constructor call");
Compilation\DataBindingExpressionBuilder.cs (1)
149Debug.Fail("This should never be called");
Configuration\HttpCapabilitiesEvaluator.cs (1)
267Debug.Assert(UserAgentCacheKeyLength != 0);
Configuration\SessionStateSection.cs (1)
506Debug.Assert(value is SessionStateSection);
Configuration\SqlCacheDependencyDatabase.cs (1)
90Debug.Assert(value is SqlCacheDependencyDatabase);
Configuration\SqlCacheDependencySection.cs (1)
97Debug.Assert(value is SqlCacheDependencySection);
Configuration\StrongNameUtility.cs (2)
37Debug.Assert(keyBlob != IntPtr.Zero); 40Debug.Assert(generatedSize > 0 && generatedSize <= Int32.MaxValue);
DataAccess\ADConnectionHelper.cs (2)
21Debug.Assert ((objectDN != null) && (objectDN.Length != 0)); 47Debug.Assert (entry != null);
Routing\ParsedRoute.cs (9)
11Debug.Assert(pathSegments != null); 265Debug.Fail("Invalid path subsegment type"); 284Debug.Fail("Invalid path segment type"); 363Debug.Fail("Invalid path subsegment type"); 369Debug.Fail("Invalid path segment type"); 453Debug.Assert(i == (PathSegments.Count - 1), "If we're processing a catch-all, we should be on the last route segment."); 464Debug.Fail("Invalid path segment type"); 585Debug.Fail("Invalid path segment type"); 601Debug.Fail("indexOfLastSegementUsed should always be 0 from the check above");
Routing\RouteParser.cs (6)
86Debug.Assert(urlParts.Count == pathSegments.Count, "The number of string segments should be the same as the number of path segments"); 167Debug.Assert(exception == null, "This only gets called after the path has been validated, so there should never be an exception here"); 199Debug.Assert(url[indexOfNextSeparator] == '/', "The separator char itself should always be a '/'."); 210Debug.Assert(pathSegments != null, "The value should always come from SplitUrl(), and that function should never return null."); 242Debug.Assert(isCurrentPartSeparator != isPreviousPartSeparator.Value, "This assert should only happen if both the current and previous parts are non-separators. This should never happen because consecutive non-separators are always parsed as a single part."); 322Debug.Fail("Invalid path subsegment type");
Security\ADMembershipUser.cs (2)
184Debug.Assert(sidBinaryForm != null); 187Debug.Assert((providerUserKey != null) && (providerUserKey is SecurityIdentifier));
Security\AntiXss\CodeCharts\CodeChartHelper.cs (1)
15Debug.Assert(min <= max);
Security\AntiXss\Utf16StringReader.cs (3)
53Debug.Assert(input != null); 68Debug.Assert(Char.IsHighSurrogate(leadingSurrogate), "'leadingSurrogate' was not a high surrogate."); 69Debug.Assert(Char.IsLowSurrogate(trailingSurrogate), "'trailingSurrogate' was not a low surrogate.");
SiteMapNodeCollection.cs (1)
84Debug.Assert(!(this is ReadOnlySiteMapNodeCollection), "List should not be called on ReadOnlySiteMapNodeCollection.");
UI\ControlValuePropertyAttribute.cs (1)
50System.Diagnostics.Debug.Fail("ControlValuePropertyAttribute: Default value of type " + type.FullName + " threw converting from the string '" + defaultValue + "'.");
UI\DataSourceSelectArguments.cs (1)
202Debug.Assert(unsupportedCapabilities == 0, "unknown capability not supported");
UI\DesignTimeTemplateParser.cs (1)
80System.Diagnostics.Debug.Assert(controlBuilder.CurrentFilterResolutionService == null);
UI\WebControls\AccessDataSource.cs (1)
128Debug.Assert(fileCache != null, "Cache object should be a FileDataSourceCache");
UI\WebControls\FileUpload.cs (1)
212Debug.Assert(result != null);
UI\WebControls\MethodParametersDictionary.cs (2)
50Debug.Assert(savedState is Pair); 58Debug.Assert(!InnerDictionary.ContainsKey(key), "The collection was not empty when loading the viewstate");
UI\WebControls\Parameter.cs (1)
280Debug.Fail("Should never reach this point.");
UI\WebControls\PasswordRecovery.cs (2)
1868Debug.Assert(answerTextBox != null, "AnswerTextBox cannot be null for the DefaultTemplate"); 2067Debug.Assert(userNameTextBox != null, "UserNameTextBox cannot be null for the DefaultTemplate");
UI\WebControls\XmlDataSourceView.cs (1)
68Debug.Assert(nodes != null, "Did not expect null node list");
UI\WebParts\AppearanceEditorPart.cs (2)
68Debug.Assert(webPart != null); 273Debug.Assert(webPart != null);
UI\WebParts\BehaviorEditorPart.cs (2)
101Debug.Assert(webPart != null); 410Debug.Assert(webPart != null);
UI\WebParts\EditorPart.cs (3)
154Debug.Assert(propertyDisplayNames.Length == propertyEditors.Length); 155Debug.Assert(propertyDisplayNames.Length == errorMessages.Length); 156Debug.Assert(propertyDescriptions == null || (propertyDescriptions.Length == propertyDisplayNames.Length));
UI\WebParts\LayoutEditorPart.cs (2)
230Debug.Assert(webPart != null); 242Debug.Assert(manager != null);
UI\WebParts\PageCatalogPart.cs (1)
92Debug.Assert(WebPartManager != null);
UI\WebParts\PropertyGridEditorPart.cs (6)
19using Debug = System.Diagnostics.Debug; 100Debug.Assert(editableObject != null); 108Debug.Assert(count > 0); 248Debug.Assert(editableObject != null); 314Debug.Assert(propertyDisplayNames.Length == editorControls.Length && propertyDisplayNames.Length == _errorMessages.Length); 322Debug.Assert(editableObject != null);
UI\WebParts\ProxyWebPartManager.cs (1)
116Debug.Assert(page != null);
UI\WebParts\RowToFieldTransformer.cs (4)
43Debug.Assert(_callback != null); 100Debug.Assert(owner != null); 119Debug.Assert(WizardSteps.Count == 0); 153Debug.Assert(_fieldName != null);
UI\WebParts\RowToParametersTransformer.cs (6)
99Debug.Assert(_callback != null); 217Debug.Assert(owner != null); 235Debug.Assert(WizardSteps.Count == 0); 325Debug.Assert(WizardSteps.Count > 0); 334Debug.Assert(_consumerFieldNames != null); 335Debug.Assert(oldProviderNamesLength == 2 * _consumerFieldNames.Length);
UI\WebParts\TransformerConfigurationWizardBase.cs (1)
141Debug.Assert(WizardSteps.Count > 0);
UI\WebParts\WebPartCollection.cs (1)
38Debug.Assert(value != null);
UI\WebParts\WebPartConnection.cs (5)
252Debug.Assert(_webPartManager != null); 258Debug.Assert(providerWebPart != null); 262Debug.Assert(consumerWebPart != null); 269Debug.Assert(providerConnectionPoint != null); 278Debug.Assert(consumerConnectionPoint != null);
UI\WebParts\WebPartTracker.cs (1)
61Debug.Assert(Count >= 1);
UI\WebParts\WebPartTransformerAttribute.cs (1)
85Debug.Assert(attributes.Length == 0 || attributes.Length == 1);
UI\WebParts\WebPartUtil.cs (1)
28Debug.Assert(constructor != null);
System.Web.DataVisualization (7)
Common\Annotation\AnnotationBase.cs (1)
3302Debug.Assert(axisName != null, "GetAxisByName: handed a null axis name");
Common\ChartTypes\ErrorBarChart.cs (1)
1787System.Diagnostics.Debug.Fail("Unknown ErrorBarType=" + errorBarType.ToString());
Common\Formulas\FormulaHelpers.cs (1)
112Debug.Fail(String.Format(CultureInfo.InvariantCulture, "{0} case is not defined", formula));
Common\General\AxisScale.cs (1)
1196System.Diagnostics.Debug.Assert(this._intervalsStore.Count == 5, "Fail in interval store count");
Common\General\Chart.cs (1)
3527Debug.Assert(url != null, "LoadTemplateData: handed a null url string");
WebForm\General\ChartHttpHandler.cs (2)
1356Debug.Fail("Unknown ImageOwnerKeyType."); 1787System.Diagnostics.Debug.Assert(!String.IsNullOrEmpty(keyFormat));
System.Web.DynamicData (54)
DynamicData\ControlFilterExpression.cs (2)
123Debug.Assert(names.Count == columns.Count); 137Debug.Assert(target != null);
DynamicData\DynamicControl.cs (1)
187Debug.Assert(FieldTemplate == null);
DynamicData\DynamicControlParameter.cs (2)
36Debug.Assert(dataSource != null); 135Debug.Assert(column.ForeignKeyNames.Count == parentTable.PrimaryKeyColumns.Count);
DynamicData\DynamicDataExtensions.cs (1)
105Debug.Assert(context != null);
DynamicData\DynamicDataManager.cs (1)
191Debug.Assert(baseDataBoundControl != null, "NULL!");
DynamicData\DynamicDataRoute.cs (1)
57Debug.Assert(Model != null);
DynamicData\DynamicDataRouteHandler.cs (4)
151Debug.Assert(httpContext != null); 184Debug.Assert(httpContext != null); 198Debug.Assert(httpContext != null); 206Debug.Assert(requestContext.HttpContext.Items[s_requestContextKey] == null);
DynamicData\DynamicField.cs (1)
248Debug.Assert(control != null);
DynamicData\DynamicFilter.cs (2)
125Debug.Assert(dataSource != null); 142Debug.Assert(_dataSource != null);
DynamicData\DynamicHyperLink.cs (2)
166Debug.Assert(dataItem != null, "DataItem is null"); 253Debug.Assert(!String.IsNullOrEmpty(tableName));
DynamicData\DynamicRouteExpression.cs (1)
38Debug.Assert(DataSource != null);
DynamicData\EntityTemplateFactory.cs (1)
125Debug.Assert(model != null);
DynamicData\FieldTemplateFactory.cs (1)
303Debug.Assert(false);
DynamicData\FieldTemplateUserControl.cs (3)
236Debug.Assert(Mode == DataBoundControlMode.Insert); 312Debug.Assert(enumType != null); 479Debug.Assert(errorMessage != null);
DynamicData\FilterFactory.cs (3)
36Debug.Assert(model != null); 63Debug.Assert(filterTemplatePath != null); 73Debug.Assert(column != null);
DynamicData\FilterUserControlBase.cs (1)
76Debug.Assert(keyStrings.Length == keyNames.Length);
DynamicData\MetaChildrenColumn.cs (1)
112Debug.Assert(fkColumn.ForeignKeyNames.Count == pkValues.Count);
DynamicData\MetaColumn.cs (1)
544Debug.Assert(column != null);
DynamicData\MetaForeignKeyColumn.cs (1)
84Debug.Assert(fkValues.Length == ForeignKeyNames.Count);
DynamicData\MetaModel.cs (6)
582Debug.Assert(contextType != null); 583Debug.Assert(tableName != null); 616Debug.Assert(contextType != null); 617Debug.Assert(model != null); 629Debug.Assert(entityType != null); 630Debug.Assert(table != null);
DynamicData\MetaTable.cs (4)
379Debug.Assert(false); 792Debug.Assert(column != null); 893Debug.Assert(rowCollection.Count == 1); 988Debug.Assert(table != null);
DynamicData\ModelProviders\DLinqAssociationProvider.cs (1)
22Debug.Assert(Direction != AssociationDirection.ManyToMany, "Many to Many is not supported by Linq to SQL");
DynamicData\ModelProviders\EFColumnProvider.cs (1)
113Debug.Assert(false, String.Format(CultureInfo.CurrentCulture, "Unknown EdmType {0}.", edmType.GetType().FullName));
DynamicData\ModelProviders\EFDataModelProvider.cs (1)
87Debug.Assert(result != null, String.Format(CultureInfo.CurrentCulture, "Cannot map EdmType '{0}' to matching CLR Type", entityType));
DynamicData\QueryableFilterRepeater.cs (1)
100Debug.Assert(_dataSource != null);
DynamicData\QueryableFilterUserControl.cs (2)
51Debug.Assert(enumType != null); 125Debug.Assert(_context != null);
DynamicData\Util\DefaultValueMapping.cs (2)
21Debug.Assert(defaultValues != null); 28Debug.Assert(_defaultValues != null);
DynamicData\Util\MetaTableHelper.cs (1)
113Debug.Assert(model != null);
DynamicData\Util\Misc.cs (3)
143Debug.Assert(enumType != null); 144Debug.Assert(enumType.IsEnum); 280Debug.Assert(control != null, "control should not be null");
DynamicData\Util\RouteParametersHelper.cs (1)
34Debug.Assert(fkColumn.ForeignKeyNames.Count == fkColumn.ParentTable.PrimaryKeyColumns.Count);
DynamicData\Util\TemplateFactory.cs (1)
30Debug.Assert(!String.IsNullOrEmpty(defaultLocation));
System.Web.Entity (47)
System\Data\WebControls\EntityDataSource.cs (1)
1102Debug.Assert(Page != null);
System\Data\WebControls\EntityDataSourceColumn.cs (2)
199Debug.Assert(EntityDataSourceUtil.IsScalar(keyMember.TypeUsage.EdmType), "Expected primitive or enum type for key members."); 434Debug.Assert(relationshipManager != null, "Coldn't retrieve a RelationshipManager");
System\Data\WebControls\EntityDataSourceQueryBuilder.cs (3)
62Debug.Assert(_resultType != null, "ResultType is only valid after Build()"); 70Debug.Assert(_count.HasValue, "Count is not valid until after Build. And only then if computeCount is true"); 264Debug.Assert(!String.IsNullOrEmpty(_selectExpression), "Select expression should not be of zero length.");
System\Data\WebControls\EntityDataSourceReferenceGroup.cs (1)
134Debug.Assert(relationshipManager != null, "couldn't get a relationship manager");
System\Data\WebControls\EntityDataSourceUtil.cs (17)
151Debug.Assert(null != entityWrapper, "entityWrapper should not be null"); 248Debug.Assert(null != type, "type required"); 261Debug.Assert(null != type, "type required"); 262Debug.Assert(null != name, "name required"); 290Debug.Assert(!String.IsNullOrEmpty(columnName), "columnName must be given"); 466Debug.Assert(firstType != null, "firstType should not be not null"); 483Debug.Assert(null != type, "type required"); 489Debug.Assert(null != type, "type required"); 556Debug.Assert(types != null && types.Length == 1, "Nullable did not have a single generic type."); 614Debug.Assert(typeof(DbGeography).IsAssignableFrom(typeof(T)) || typeof(DbGeometry).IsAssignableFrom(typeof(T)), "This method should be called only for spatial type"); 615Debug.Assert(createSpatialTypeInstanceFunc != null, "createSpatialTypeInstanceFunc != null"); 616Debug.Assert(stringValue != null, "stringValue != null"); 650Debug.Assert(stringValue != null, "stringValue != null"); 702Debug.Assert(EntityDataSourceUtil.IsScalar(memberType) || 728Debug.Assert( 758Debug.Assert(associationSet.AssociationSetEnds.Count == 2, "non binary association?"); 1078Debug.Assert(e != null, "Unexpected null exception!");
System\Data\WebControls\EntityDataSourceView.cs (15)
119Debug.Assert(context != null); 120Debug.Assert(entitySet != null); 121Debug.Assert(mode != ManagerMode.None); 122Debug.Assert(_collectionMode == ManagerMode.None || _collectionMode == mode, "Cannot reset a collection working in a different mode."); 134Debug.Assert(entity != null); 135Debug.Assert(Mode != ManagerMode.None); 294Debug.Assert(newQueryBuilderCreateMethod != null, "Unable to bind to EntityDataSourceObjectQueryBuilder<T>.Create (static, non-visible) method"); 299Debug.Assert(_collectionManager.FlattenedEntityCollection != null); 359Debug.Assert(null != EntitySet, "Can't be updatable with a null EntitySet"); 398Debug.Assert( 445Debug.Assert(EntityOSpaceType != null, "EntitySet is not null, EntityOSpaceType should also be defined."); 858Debug.Assert(pd != null, "PropertyDescriptor is null"); 1556Debug.Assert(null != _ctx, "The context hasn't yet been constructed"); 1725Debug.Assert(value != null, "Value should not be null at this point."); 1767Debug.Assert(asmPublicKeyToken != null);
System\Data\WebControls\EntityDataSourceViewSchema.cs (1)
106Debug.Assert(typeArguments.Length == 1, "should only have one type argument from Nullable<> condition.");
System\Data\WebControls\OrderByBuilder.cs (3)
47Debug.Assert(null != tu, "Type Usage cannot be null"); 65Debug.Assert(String.IsNullOrEmpty(_orderBy), "If AutoGenerateOrderByClause is true, then OrderBy cannot be set. This should have been caught by a runtime error check"); 85Debug.Assert(!_autoGenerateOrderByClause, "If OrderBy is set, AutoGenerateOrderBy must be false. This should have been caught by a runtime error check");
System\Data\WebControls\WebControlParameterProxy.cs (4)
28Debug.Assert(null != entityDataSource); 29Debug.Assert(!String.IsNullOrEmpty(propertyName)); 38Debug.Assert(null != entityDataSource); 100Debug.Assert(this.TypeCode != TypeCode.Empty || this.DbType != DbType.Object, "Need to have TypeCode or DbType to get a ClrType");
System.Web.Entity.Design (50)
System\Data\WebControls\Design\EntityConnectionStringBuilderItem.cs (2)
24Debug.Assert(connectionStringBuilder != null, "null connectionStringBuilder"); 32Debug.Assert(!String.IsNullOrEmpty(unknownConnectionString), "null or empty unknownConnectionString");
System\Data\WebControls\Design\EntityDataSourceConfigureObjectContext.cs (8)
139Debug.Assert(_containerNames != null, "_containerNames have already been initialized and should not be null"); 162Debug.Assert(addIfNotFound == false || containerToSelect != null, "expected a non-null EntityDataSourceContainerNameItem"); 180Debug.Assert(_selectedContainerName != null, "wizard data should not be saved if container name is empty"); 195Debug.Assert(connStrBuilderItem != null, "expected GetEntityConnectionStringBuilder to always return non-null"); 201Debug.Assert(connStrBuilderItem != null, "expected a non-null connStrBuilderItem for the named connection because it should have added it if it didn't exist"); 218Debug.Assert(_namedConnections != null, "_namedConnections should have already been initialized and should not be null"); 219Debug.Assert(newBuilderItem != null && newBuilderItem.IsNamedConnection, "expected non-null newBuilderItem"); 288Debug.Assert(_selectedConnectionStringBuilder != null, "wizard data should not be saved if connection string is empty");
System\Data\WebControls\Design\EntityDataSourceConfigureObjectContextPanel.cs (3)
252Debug.Assert(!isNamedConnection ? _connectionStringRadioButton.Checked : true, "only expecting either named connection or connection string radio button options"); 307Debug.Assert(_configureObjectContext.CanEnableNext, "OnNext called when CanEnableNext is false"); 328Debug.Assert(connStrBuilderItem != null, "expected non-null connStrBuilderItem");
System\Data\WebControls\Design\EntityDataSourceContainerNameItem.cs (2)
23Debug.Assert(entityContainer != null, "null entityContainer"); 29Debug.Assert(!String.IsNullOrEmpty(unknownContainerName), "null or empty unknownContainerName");
System\Data\WebControls\Design\EntityDataSourceDataSelection.cs (6)
135Debug.Assert(entitySetToSelect != null, "expected a non-null EntityDataSourceEntitySetNameItem"); 271Debug.Assert(typeToSelect != null, "expected a non-null string for EntityTypeFilter"); 305Debug.Assert(_selectedEntityTypeFilter != null, "_selectedEntityTypeFilter should never be null"); 344Debug.Assert(_selectedEntityTypeProperties != null && _selectedEntityTypeProperties.Count > 0, "expected non-null _selectedEntityTypeProperties with at least one value"); 349Debug.Assert(_selectedEntityTypeProperties.Count == 1, "'Select All (Entity Value)' should be the only property selected"); 511Debug.Assert(_selectedEntityTypeProperties != null, "expected _entityTypeProperties to be non-null if _select is null");
System\Data\WebControls\Design\EntityDataSourceDataSelectionPanel.cs (3)
282Debug.Assert(entityTypeProperties != null && entityTypeProperties.Count > 0, "unexpected null or empty entityTypeProperties"); 283Debug.Assert(selectedEntityTypeProperties != null && selectedEntityTypeProperties.Count > 0, "unexpected null or empty selectedEntityTypeProperties"); 312Debug.Assert(selectedEntityTypeFilter != null, "cannot select null from EntityTypeFilter combobox");
System\Data\WebControls\Design\EntityDataSourceDesignerHelper.cs (18)
78Debug.Assert(entityDataSource != null, "null entityDataSource"); 99Debug.Assert(_owner != null, "expected non-null owner"); 100Debug.Assert(_webApplication != null, "expected non-null web application service"); 120Debug.Fail("Failed to find System.Web.Entity assembly."); 475Debug.Assert(connStrBuilder != null, "expected non-null connStrBuilder"); 498Debug.Assert(connStrBuilder != null, "expected non-null connStrBuilder"); 524Debug.Assert(!String.IsNullOrEmpty(originalMetadata), "originalMetadata should have aleady been verified to be non-null or empty"); 608Debug.Assert(edmItemCollection != null && storeItemCollection != null, "edm and store ItemCollection should be populated already"); 688Debug.Assert(_interactiveMode == true, "resource cache should only explicitly be loaded in interactive mode"); 703Debug.Assert(warnings != null && warnings.Count > 0, "expected non-null and non-empty warnings"); 720Debug.Assert(namedConnStrBuilder != null && !String.IsNullOrEmpty(namedConnStrBuilder.Name), "expected non-null connStrBuilder for a named connection"); 794Debug.Assert(connStrBuilder != null, "expected non-null connStrBuilder"); 849Debug.Assert(dataDirectoryPaths != null, "null dataDirectoryPaths"); 1126Debug.Assert(_entityConnection != null, "_entityConnection should have been initialized"); 1178Debug.Assert(originalParameters != null && newParameters != null, "parameter collections on the data source should never be null"); 1179Debug.Assert(newParameters.Count == 0, "new parameter collection should not contain any parameters yet"); 1385Debug.Assert(properties.Count > 0, "expected entity to have at least one property"); 1454Debug.Assert(firstType != null, "firstType should not be not null");
System\Data\WebControls\Design\EntityDataSourceStatementEditor.cs (6)
35Debug.Assert(designerHost != null, "Did not get DesignerHost service."); 101Debug.Fail("Unknown property name in EntityDataSourceStatementEditor: " + propertyName); 117Debug.Fail("Unknown property name in EntityDataSourceStatementEditor: " + propertyName); 136Debug.Fail("Unknown property name in EntityDataSourceStatementEditor: " + propertyName); 155Debug.Fail("Unknown property name in EntityDataSourceStatementEditor: " + propertyName); 178Debug.Fail("Unknown property name in EntityDataSourceStatementEditor: " + propertyName);
System\Data\WebControls\Design\Util\DesignerForm.cs (1)
42Debug.Assert(serviceProvider != null);
System\Data\WebControls\Design\Util\WizardPanel.cs (1)
79Debug.Assert(_parentWizard != null);
System.Web.Extensions (132)
Compilation\WCFBuildProvider.cs (4)
413Debug.Fail("Shouldn't be given a null virtual path"); 432Debug.Assert(virtualPath.StartsWith(webReferencesRootVirtualPath, StringComparison.OrdinalIgnoreCase), 439Debug.Assert(string.Equals(webReferencesRootVirtualPath, virtualPath, StringComparison.OrdinalIgnoreCase), 475Debug.Fail("Shouldn't get a null app virtual path from the app domain");
Compilation\WCFModel\DataSvcMapFile.cs (1)
43Debug.Assert(impl != null, "impl is null!");
Compilation\WCFModel\DataSvcMapFileLoader.cs (1)
32Debug.Assert(!string.IsNullOrEmpty(mapFilePath), "mapFilePath is null!");
Compilation\WCFModel\MapFileLoader.cs (1)
49Debug.Assert(mapFile != null, "mapFile is null!");
Compilation\WCFModel\MetadataFile.cs (3)
361Debug.Fail("Source ID shouldn't be a nagtive number"); 643Debug.Assert(fileType == MetadataType.Xml || fileType == MetadataType.Policy || fileType == MetadataType.Edmx); 712System.Diagnostics.Debug.Fail("Unknown Type?");
Compilation\WCFModel\MetadataSource.cs (2)
83Debug.Fail("Source ID shouldn't be a nagtive number"); 149Debug.Fail("Source ID shouldn't be a nagtive number");
Compilation\WCFModel\SchemaMerger.cs (2)
414Debug.Assert(differentItem1 == null && differentItem2 == null); 589Debug.Fail("Why we didn't get a property name with normal routine?");
Compilation\WCFModel\SvcMapFile.cs (1)
43Debug.Assert(impl != null, "impl is null!");
Compilation\WCFModel\SvcMapFileLoader.cs (1)
32Debug.Assert(!string.IsNullOrEmpty(mapFilePath), "mapFilePath is null!");
Compilation\WCFModel\VSWCFServiceContractGenerator.cs (18)
35using Debug = System.Diagnostics.Debug; 142System.Diagnostics.Debug.Assert(bindingCollection != null); 154System.Diagnostics.Debug.Assert(proxyGeneratedContractTypes != null); 168System.Diagnostics.Debug.Assert(proxyGenerationErrors != null); 182System.Diagnostics.Debug.Assert(importErrors != null); 196System.Diagnostics.Debug.Assert(contractCollection != null); 211System.Diagnostics.Debug.Assert(serviceEndpointList != null); 224System.Diagnostics.Debug.Assert(serviceEndpointToChannelEndpointElementMap != null); 250System.Diagnostics.Debug.Assert(targetCompileUnit != null); 1055Debug.Assert(originalNamespace.Length == 0 || originalNamespace.EndsWith(".", StringComparison.Ordinal)); 1056Debug.Assert(replacementNamespace.Length == 0 || replacementNamespace.EndsWith(".", StringComparison.Ordinal)); 1057Debug.Assert(typeName != null); 1107System.Diagnostics.Debug.Fail("Why are you asking if a NULL type is shareable?"); 1281System.Diagnostics.Debug.Fail("Unknown serializer"); 1388Debug.Assert(wsdlImportExtensions != null); 1536Debug.Assert(schemaList.ContainsKey(schema), "The schema list should not contain any of the schemas returned in the duplicateSchemas..."); 1640System.Diagnostics.Debug.Assert(bindingCollection != null, "The importer should never return a NULL binding collection!"); 1643System.Diagnostics.Debug.Assert(contractCollection != null, "The importer should never return a NULL contract collection!");
Handlers\ScriptResourceHandler.cs (6)
27using Debug = System.Diagnostics.Debug; 128Debug.Assert(!String.IsNullOrEmpty(assemblyName)); 169Debug.Assert(assemblyInfo != null, "Assembly info should not be null"); 432Debug.Assert(!String.IsNullOrEmpty(decryptedData[i + 1])); 467Debug.Assert(resourcesAndCultures.Length % 2 == 0, "The list of resource names and cultures must have an even number of parts separated by commas."); 744Debug.Assert(!singleAssemblyResource, "This should never happen since this is a path reference.");
HttpResponseInternalWrapper.cs (1)
19Debug.Assert(httpResponse != null);
Profile\ProfileService.cs (1)
29Debug.Assert(_javaScriptSerializer != null);
Script\Serialization\JavaScriptSerializer.cs (2)
213Debug.Assert(serializationFormat == SerializationFormat.JSON || serializationFormat == SerializationFormat.JavaScript); 472Debug.Assert(false);
Script\Services\ClientProxyGenerator.cs (1)
349Debug.Assert(enumNames.Length == enumValues.Length);
Script\Services\WebServiceData.cs (1)
292Debug.Assert(!_clientTypesProcessed, "ProcessClientTypes shouldn't be called after it has already been successfully run.");
Script\Services\WebServiceEnumData.cs (6)
56System.Diagnostics.Debug.Assert(names != null); 57System.Diagnostics.Debug.Assert(values != null); 58System.Diagnostics.Debug.Assert(names.Length == values.Length); 65System.Diagnostics.Debug.Assert(names != null); 66System.Diagnostics.Debug.Assert(values != null); 67System.Diagnostics.Debug.Assert(names.Length == values.Length);
Script\Services\WebServiceMethodData.cs (5)
96Debug.Assert(_webMethodAttribute != null); // If fails: WebserviceMethodData corrosponding to WCF is being used by ASMX JSON handler 103Debug.Assert(_webMethodAttribute != null); // If fails: WebserviceMethodData corrosponding to WCF is being used by ASMX JSON handler 110Debug.Assert(_methodInfo != null); // If fails: WebserviceMethodData corrosponding to WCF is being used by ASMX JSON handler 117Debug.Assert(_methodInfo != null); // If fails: WebserviceMethodData corrosponding to WCF is being used by ASMX JSON handler 181Debug.Assert(ParameterDataDictionary != null);
Script\Services\WebServiceTypeData.cs (6)
261Debug.Assert(nameAttribute != null); 262Debug.Assert(nameAttribute.Value != null); 266Debug.Assert(nsAttribute != null); 267Debug.Assert(nsAttribute.Value != null); 300Debug.Assert(enumFacet != null); 301Debug.Assert(enumFacet.Value != null);
UI\AssemblyCache.cs (3)
46Debug.Assert(assembly != null); 57Debug.Assert(!String.IsNullOrEmpty(assemblyName)); 78Debug.Assert(assembly != null);
UI\AuthenticationServiceManager.cs (1)
87Debug.Assert(sb != null);
UI\ClientScriptManagerWrapper.cs (1)
19Debug.Assert(clientScriptManager != null);
UI\CustomErrorsSectionWrapper.cs (1)
16Debug.Assert(customErrorsSection != null);
UI\HtmlFormWrapper.cs (1)
18Debug.Assert(form != null);
UI\PageRequestManager.cs (12)
83Debug.Assert(owner != null); 133Debug.Assert(!String.IsNullOrEmpty(type), "Type should always be specified"); 140Debug.Assert(type.IndexOf(LengthEncodeDelimiter) == -1, "Should not be a " + LengthEncodeDelimiter + " in type"); 141Debug.Assert(id.IndexOf(LengthEncodeDelimiter) == -1, "Should not be a " + LengthEncodeDelimiter + " in id"); 462Debug.Assert(ClientSupportsFocus, "If ClientSupportsFocus is false then we never should have set _requireFocusScript to true."); 495Debug.Assert(_owner.IsInAsyncPostBack); 496Debug.Assert(_updatePanelsToRefresh == null); 640Debug.Assert(updatePanel != null); 644Debug.Assert(!_allUpdatePanels.Contains(updatePanel), 651Debug.Assert(_owner.IsInAsyncPostBack, "Catch-up initialization should only be done in async posts."); 666Debug.Assert(_updatePanelWriter != null, "_updatePanelWriter should be set by RenderPageCallback before RenderFormCallback is called."); 916Debug.Assert(updatePanel != null);
UI\PageWrapper.cs (1)
20Debug.Assert(page != null);
UI\RegisteredArrayDeclaration.cs (1)
16Debug.Assert(arrayName != null);
UI\RegisteredDisposeScript.cs (3)
16Debug.Assert(control != null); 17Debug.Assert(disposeScript != null); 18Debug.Assert(parentUpdatePanel != null);
UI\RegisteredExpandoAttribute.cs (3)
27Debug.Assert(control != null); 28Debug.Assert(!String.IsNullOrEmpty(controlId)); 29Debug.Assert(!String.IsNullOrEmpty(name));
UI\RegisteredHiddenField.cs (2)
16Debug.Assert(control != null); 17Debug.Assert(hiddenFieldName != null);
UI\RegisteredScript.cs (6)
21Debug.Assert(control != null); 22Debug.Assert(type != null); 23Debug.Assert(!String.IsNullOrEmpty(url)); 39Debug.Assert(control != null); 40Debug.Assert( 43Debug.Assert(type != null);
UI\ResourceCategoryAttribute.cs (1)
35System.Diagnostics.Debug.Assert(localizedValue != null, "All WebForms category attributes should have localized strings. Category '" + value + "' not found.");
UI\ScriptBehaviorDescriptor.cs (1)
26Debug.Assert(!String.IsNullOrEmpty(ElementID), "Base ctor ensures ElementID is not null or empty");
UI\ScriptComponentDescriptor.cs (1)
154Debug.Assert(value != null);
UI\ScriptControlManager.cs (2)
17using Debug = System.Diagnostics.Debug; 209Debug.Assert(targetControls != null && targetControls.Count > 0);
UI\ScriptReference.cs (8)
18using Debug = System.Diagnostics.Debug; 47Debug.Assert(!String.IsNullOrEmpty(name), "The script's name must be specified."); 48Debug.Assert(clientUrlResolver != null && clientUrlResolver is ScriptManager, "The clientUrlResolver must be the ScriptManager."); 157Debug.Assert(!String.IsNullOrEmpty(resourceName)); 223Debug.Assert(scriptManager != null); 391Debug.Assert(!String.IsNullOrEmpty(EffectiveResourceName)); 477Debug.Fail("Invalid value for ScriptReference.EffectiveScriptMode"); 527Debug.Assert(debugName != null);
UI\ScriptReferenceBase.cs (2)
15using Debug = System.Diagnostics.Debug; 191Debug.Assert(pathOrName.EndsWith(".js", StringComparison.Ordinal));
UI\ScriptRegistrationManager.cs (6)
422Debug.Assert(writer != null, "Should always have a writer"); 452Debug.Assert(writer != null, "Should always have a writer"); 493Debug.Assert(writer != null, "Should always have a writer"); 583Debug.Assert(writer != null, "Should always have a writer"); 602Debug.Assert(writer != null, "Should always have a writer"); 617Debug.Assert(writer != null, "Should always have a writer");
UI\UpdatePanel.cs (6)
20using Debug = System.Diagnostics.Debug; 246Debug.Assert(singleChildCollection != null, "The Controls property did not return the expected control collection instance."); 258Debug.Assert(DesignMode, "ClearContent should only be used in DesignMode."); 397Debug.Assert(!DesignMode, "Shouldn't be in DesignMode"); 410Debug.Assert(!_rendered); 467Debug.Assert(Count == 0, "The collection must be empty if this is called");
UI\WebControls\Expressions\OfTypeExpression.cs (1)
74Debug.Assert(type != null);
UI\WebControls\Expressions\OrderByExpression.cs (2)
88Debug.Fail("shouldn't get here!"); 100Debug.Fail("shouldn't get here!");
UI\WebControls\Expressions\RangeExpression.cs (2)
108Debug.Fail("shouldn't get here!"); 123Debug.Fail("shouldn't get here!");
UI\WebControls\QueryableDataSourceHelper.cs (2)
174Debug.Assert((whereParameters != null) && (whereParameters.Count > 0)); 202Debug.Assert((orderByParameters != null) && (orderByParameters.Count > 0));
System.Web.Mobile (377)
Mobile\ConfigurationSectionHelper.cs (4)
53Debug.Assert(null != _currentNode); 132Debug.Assert(null != _currentNode); 145Debug.Assert(null != _currentNode); 154Debug.Assert(null != _currentNode);
Mobile\DeviceFilterDictionary.cs (1)
25Debug.Assert(name != null);
Mobile\DeviceFiltersSection.cs (1)
328Debug.Assert((value != null) && (value is DeviceFilterElement));
Mobile\UrlPath.cs (3)
58Debug.Assert(path[path.Length-1] != '/', "Path should not end with a /"); 226Debug.Assert(IsRooted(from)); 227Debug.Assert(IsRooted(to));
UI\MobileControls\Adapters\ChtmlCalendarAdapter.cs (4)
349Debug.Assert(NotSecondaryUI == NotSecondaryUIInit); 572Debug.Assert(false, "Unexpected Secondary UI Mode"); 591Debug.Assert(NotSecondaryUI == NotSecondaryUIInit); 923Debug.Assert(dateFrom <= dateTo, "Bad Date Range");
UI\MobileControls\Adapters\HtmlCalendarAdapter.cs (1)
60Debug.Assert(tagEndIndex >= 0);
UI\MobileControls\Adapters\HtmlFormAdapter.cs (1)
395Debug.Assert(queryString != null && queryString.Length > 0,
UI\MobileControls\Adapters\HtmlMobileTextWriter.cs (1)
519Debug.Assert(style != null, "writer style is null");
UI\MobileControls\Adapters\HtmlObjectListAdapter.cs (5)
74Debug.Assert(itemIndex >= 0, "itemIndex is negative"); 128Debug.Assert (Control.VisibleItemCount <= Control.Items.Count); 135Debug.Assert (Control.AllFields != null && Control.AllFields.Count > 0, 168Debug.Assert(fieldIndices != null, "fieldIndices is null"); 610Debug.Assert (visibleFieldsInListView >= 0, "visibleFieldsInListView is negative");
UI\MobileControls\Adapters\HtmlPageAdapter.cs (2)
101Debug.Assert(_renderableForms != null, "_renderableForms is null"); 144Debug.Assert(_renderableForms != null, "_renderableForms is null");
UI\MobileControls\Adapters\HtmlSelectionListAdapter.cs (1)
237Debug.Assert (String.IsNullOrEmpty(Control.Form.Action),
UI\MobileControls\Adapters\HtmlValidationSummaryAdapter.cs (1)
81Debug.Assert(errorMessage != null && errorMessage.Length > 0, "Bad Error Messages");
UI\MobileControls\Adapters\UpWmlMobileTextWriter.cs (2)
145Debug.Assert(!AnalyzeMode); 987Debug.Assert(AnalyzeMode);
UI\MobileControls\Adapters\WmlCalendarAdapter.cs (4)
336Debug.Assert(NotSecondaryUI == NotSecondaryUIInit); 554Debug.Assert(false, "Unexpected Secondary UI Mode"); 572Debug.Assert(NotSecondaryUI == NotSecondaryUIInit); 895Debug.Assert(dateFrom <= dateTo, "Bad Date Range");
UI\MobileControls\Adapters\WmlMobileTextWriter.cs (1)
1559Debug.Assert(_postBackEventTargetVarName.ToLower(CultureInfo.InvariantCulture) == _postBackEventTargetVarName &&
UI\MobileControls\Adapters\WmlPageAdapter.cs (2)
362Debug.Assert(_renderableForms != null, "_renderableForms is null"); 397Debug.Assert(_renderableForms != null, "_renderableForms is null");
UI\MobileControls\Adapters\WmlSelectionListAdapter.cs (1)
171Debug.Assert (String.IsNullOrEmpty(Control.Form.Action),
UI\MobileControls\Adapters\WmlValidationSummaryAdapter.cs (1)
81Debug.Assert(errorMessage != null && errorMessage.Length > 0, "Bad Error Messages");
UI\MobileControls\Adapters\XhtmlAdapters\XhtmlBasicCalendarAdapter.cs (4)
304Debug.Assert(NotSecondaryUI == NotSecondaryUIInit); 509Debug.Assert(false, "Unexpected Secondary UI Mode"); 527Debug.Assert(NotSecondaryUI == NotSecondaryUIInit); 819Debug.Assert(dateFrom <= dateTo, "Bad Date Range");
UI\MobileControls\Adapters\XhtmlAdapters\XhtmlBasicControlAdapter.cs (6)
223Debug.Assert (target.StartsWith (prefix, StringComparison.Ordinal)); 477Debug.Assert(!_physicalCssClassPushed, "These calls should not be nested."); 500Debug.Assert(!_physicalCssClassPushed, "These calls should not be nested."); 510Debug.Assert(_physicalCssClassPushed, "_physicalSpanClassOpen implies _physicalCssClassPushed"); 538Debug.Assert(!_physicalCssClassPushed, "These calls should not be nested."); 621Debug.Assert(!_physicalCssClassPushed, "These calls should not be nested.");
UI\MobileControls\Adapters\XhtmlAdapters\XhtmlBasicPageAdapter.cs (1)
327Debug.Assert (StyleSheetLocationAttributeValue != null);
UI\MobileControls\Adapters\XhtmlAdapters\XhtmlBasicValidationSummaryAdapter.cs (1)
68Debug.Assert(errorMessage != null && errorMessage.Length > 0, "Bad Error Messages");
UI\MobileControls\Adapters\XhtmlAdapters\XhtmlMobileTextWriter.cs (2)
315Debug.Fail ("Only call EnterStyleInternal when caching rendering"); 390Debug.Fail ("Only call when caching rendering");
UI\MobileControls\BaseValidator.cs (2)
221Debug.Assert(isValid, 340Debug.Assert(false, "Should never be called.");
UI\MobileControls\Command.cs (1)
51Debug.Assert(ImageUrl != null);
UI\MobileControls\CompileLiteralTextParser.cs (1)
51Debug.Assert(_tagInnerTextElements == null);
UI\MobileControls\CustomValidator.cs (1)
100Debug.Assert(e != null, "Unexpected null parameter!");
UI\MobileControls\Design\Adapters\DesignerAdapterUtil.cs (9)
48Debug.Assert(null != component); 90Debug.Assert(null != component); 159Debug.Assert (propertyName != null && 163Debug.Assert(prop != null); 180Debug.Assert (propertyName != null && 184Debug.Assert(prop != null); 263Debug.Assert(control != null, "control is null"); 301Debug.Assert(controlDesigner is MobileControlDesigner || 331Debug.Assert(control.Parent is MobileControl);
UI\MobileControls\Design\Adapters\MSHTMLHostUtil.cs (6)
61Debug.Assert(null != htmlDoc3); 65Debug.Assert(null != _htmlDivOuter && null != _htmlDivInner); 82Debug.Assert(null != _htmlDivOuter && null != _htmlDivInner); 85Debug.Assert(null != htmlElement2); 91Debug.Assert(null != _htmlDivOuter && null != _htmlDivInner); 94Debug.Assert(null != htmlElement2);
UI\MobileControls\Design\AdRotatorDesigner.cs (1)
35Debug.Assert(component is System.Web.UI.MobileControls.AdRotator,
UI\MobileControls\Design\AppliedDeviceFiltersDialog.cs (9)
256Debug.Fail(e.ToString()); 577Debug.Assert(_tbArgument.Text.Length == 0, 712Debug.Assert( 871Debug.Assert(!InExternalCacheEditMode, 890Debug.Assert(InExternalCacheEditMode, 903Debug.Assert(InExternalCacheEditMode, 917Debug.Assert(InExternalCacheEditMode, 1070Debug.Assert(value != null); 1115Debug.Assert(
UI\MobileControls\Design\AppliedDeviceFiltersEditor.cs (4)
29Debug.Assert(context.Instance is Control, "Expected control"); 46Debug.Assert(serviceProvider != null, 54Debug.Assert(designerHost != null, 59Debug.Assert(dsDesigner != null,
UI\MobileControls\Design\BaseTemplatedMobileComponentEditor.cs (2)
62Debug.Assert(obj is IComponent, "Expected obj to be an IComponent"); 71Debug.Assert(compDesigner is TemplatedControlDesigner,
UI\MobileControls\Design\BaseValidatorDesigner.cs (2)
53Debug.Assert(component is System.Web.UI.MobileControls.BaseValidator, 83Debug.Assert(_baseValidator.Text != null);
UI\MobileControls\Design\CalendarDataBindingHandler.cs (1)
27Debug.Assert(control is Calendar, "Expected a Calendar");
UI\MobileControls\Design\CalendarDesigner.cs (1)
53Debug.Assert(component is System.Web.UI.MobileControls.Calendar,
UI\MobileControls\Design\CommandCollectionEditor.cs (3)
54Debug.Assert(designerHost != null, "Did not get DesignerHost service."); 56Debug.Assert(context.Instance is ObjectList, "Expected objectlist"); 60Debug.Assert(_designer != null, "Did not get designer for component");
UI\MobileControls\Design\CommandDesigner.cs (2)
51Debug.Assert(component is System.Web.UI.MobileControls.Command, 71Debug.Assert(null != _command.Text);
UI\MobileControls\Design\Converters\ChoiceConverter.cs (6)
57Debug.Assert(componentSite != null, "Expected the component to be sited."); 59Debug.Assert(designerHost != null, "Expected a designer host."); 61Debug.Assert(designer != null, "Expected a designer for the stylesheet."); 62Debug.Assert(designer is StyleSheetDesigner, "Expected a StyleSheet designer."); 99Debug.Assert(deviceSpecific.Choices != null); 198Debug.Assert(name != null, "Expected an actual device filter name to match.");
UI\MobileControls\Design\Converters\DataFieldConverter.cs (3)
111Debug.Assert(pd != null, "Cannot get DataMember"); 123Debug.Assert(dataMember != null); 128Debug.Assert(dataMember != null);
UI\MobileControls\Design\Converters\DefaultCommandConverter.cs (1)
80Debug.Assert(objectList != null);
UI\MobileControls\Design\Converters\FontNameConverter.cs (1)
122Debug.Assert(name != null, "Expected an actual font name to match in FontNameConverter::MatchFontName.");
UI\MobileControls\Design\Converters\FormConverter.cs (7)
60Debug.Assert(list.Length > 0); 64Debug.Assert(obj is MobileControl); 90Debug.Assert(control != null, "Not a control"); 94Debug.Fail("Unrecognized object passed in"); 112Debug.Assert(container is IDesignerHost && 124Debug.Assert(site != null); 132Debug.Fail("container is null");
UI\MobileControls\Design\Converters\StyleReferenceConverter.cs (4)
62Debug.Fail("Unsupported objects passed in"); 77Debug.Assert(array.Length > 0); 83Debug.Fail("Unsupported type passed in"); 86Debug.Assert(null != styleSheet);
UI\MobileControls\Design\Converters\ValidatedMobileControlConverter.cs (3)
52Debug.Assert(controlList.Length > 0); 82Debug.Fail("Unsupported object passed in"); 96Debug.Assert(container != null);
UI\MobileControls\Design\DesignerCapabilities.cs (2)
138Debug.Assert(obj != null, 140Debug.Assert(obj is String,
UI\MobileControls\Design\DesignerForm.cs (2)
48Debug.Assert(serviceProvider != null); 58Debug.Assert(dialogFont != null, "Did not get a dialog font to use from IUIService");
UI\MobileControls\Design\DeviceFilterEditorDialog.cs (5)
353Debug.Assert(row1.Length == row2.Length); 494Debug.Fail(e.ToString()); 509Debug.Assert(site != null); 694Debug.Fail("Unknown sender."); 732Debug.Assert(DeviceFilter.Name == base.Text);
UI\MobileControls\Design\DeviceSpecificDesigner.cs (9)
74Debug.Assert(_parentContainer != null); 123Debug.Assert(host != null, "host is null in DeviceSpecificDesigner"); 142Debug.Assert(component is System.Web.UI.MobileControls.DeviceSpecific, 155Debug.Assert(null != _ds); 265Debug.Assert(_ds.Parent != null, "_ds.Parent is null"); 291Debug.Assert(host != null, "Did not get a valid IDesignerHost reference"); 293Debug.Assert(designer != null, "designer is null in DeviceSpecificDesigner"); 319Debug.Assert(index == 0); 328Debug.Assert(prop != null);
UI\MobileControls\Design\FieldCollectionEditor.cs (3)
54Debug.Assert(designerHost != null, "Did not get DesignerHost service."); 56Debug.Assert(context.Instance is ObjectList, "Expected objectlist"); 60Debug.Assert(_designer != null, "Did not get designer for component");
UI\MobileControls\Design\FormDesigner.cs (2)
138Debug.Assert(component is Form, 200Debug.Assert(prop != null);
UI\MobileControls\Design\ImageDesigner.cs (2)
48Debug.Assert(wfServices != null); 72Debug.Assert(component is System.Web.UI.MobileControls.Image,
UI\MobileControls\Design\ItemCollectionEditor.cs (3)
53Debug.Assert(designerHost != null, "Did not get DesignerHost service."); 56Debug.Assert(obj is List || obj is SelectionList, "Expected List or SelectionList"); 58Debug.Assert(designer != null, "Did not get designer for component");
UI\MobileControls\Design\LabelDesigner.cs (2)
54Debug.Assert(component is System.Web.UI.MobileControls.Label, 74Debug.Assert(null != _label.Text);
UI\MobileControls\Design\LinkDesigner.cs (2)
54Debug.Assert(component is System.Web.UI.MobileControls.Link, 74Debug.Assert(null != _link.Text);
UI\MobileControls\Design\ListComponentEditorPage.cs (3)
119Debug.Assert (component is ObjectList | component is List | 149Debug.Assert(null != e); 150Debug.Assert(e.CancelEdit == false);
UI\MobileControls\Design\ListDesigner.cs (6)
184Debug.Assert(_designerVerbs.Count == 2); 303Debug.Assert(items != null, "Items is null in LisControl"); 337Debug.Assert(_dummyDataTable != null && _dummyDataTable.Columns.Count > 1); 443Debug.Assert(index >= 0 & index <= _templateFrameNames.Length); 489Debug.Assert(component is System.Web.UI.MobileControls.List, 495Debug.Assert(_list.Items != null, "Items cannot be null.");
UI\MobileControls\Design\ListGeneralPage.cs (1)
85Debug.Assert(GetBaseControl() != null);
UI\MobileControls\Design\ListItemsPage.cs (3)
79Debug.Assert(GetBaseControl() != null); 254Debug.Assert(!_isBaseControlList); 352Debug.Assert(runtimeItem != null, "runtimeItem is null");
UI\MobileControls\Design\MobileComponentEditorPage.cs (5)
57Debug.Assert(_site != null, "Expected the component to be sited."); 74Debug.Assert(_helpService != null); 88Debug.Assert(selectedComponent is MobileControl); 103Debug.Assert(designerHost != null, "Expected a designer host."); 107Debug.Assert(_designer != null, "Expected a designer for the selected component");
UI\MobileControls\Design\MobileContainerDesigner.cs (14)
116Debug.Assert(_iWebFormsDocumentService != null); 149Debug.Assert(style != null); 269Debug.Assert(component is MobileControl, 307Debug.Assert(_cachedBehavior == null); 480Debug.Assert(htmlElement != null, 485Debug.Assert(refMgr != null, "Did not get back IWebFormReferenceManager service."); 488Debug.Assert(tagPrefix != null && tagPrefix.Length > 0, "TagPrefix is invalid"); 499Debug.Assert(null != htmlChild, "htmlChild is null"); 518Debug.Assert(substitutions == false, "substitutions is true"); 531Debug.Assert(substitutions == true, "substitutions is false"); 552Debug.Assert(Behavior != null && _behaviorAttributes != null); 572Debug.Assert (_behaviorAttributes != null); 594Debug.Assert (obj != null, "null object passed in!"); 595Debug.Assert (_behaviorAttributes != null);
UI\MobileControls\Design\MobileControlDesigner.cs (7)
152Debug.Assert(_host != null); 180Debug.Assert(_iWebFormsDocumentService != null); 295Debug.Fail(ex.ToString()); 442Debug.Assert(component is System.Web.UI.MobileControls.MobileControl, 505Debug.Assert(property != null, "Property is null: " + propertyName); 588Debug.Assert(_defaultDeviceSpecificIdentifier == deviceSpecificParentID); 595Debug.Assert(_defaultDeviceSpecificIdentifier == deviceSpecificParentID);
UI\MobileControls\Design\MobileControlPersister.cs (20)
58Debug.Assert(host != null, "Need an IDesignerHost to create declarative type names"); 64Debug.Assert(refMgr != null, "Did not get back IWebFormReferenceManager service from host."); 113Debug.Assert(typeof(ICollection).IsAssignableFrom(propDesc.PropertyType), 157Debug.Assert (pna != null, "PersistNameAttribute returns null!"); 385Debug.Fail("Cannot persist inner string property marked with PersistenceMode.InnerProperty"); 395Debug.Fail("Cannot persist template property " + propDescs[i].Name + " not marked with PersistenceMode.InnerProperty"); 417Debug.Fail("Cannot persist collection property " + propDescs[i].Name + " not marked with PersistenceMode.InnerProperty or PersistenceMode.InnerDefaultProperty"); 426Debug.Fail("Cannot persist complex property " + propDescs[i].Name + " not marked with PersistenceMode.InnerProperty"); 451Debug.Assert(propDesc.PropertyType == typeof(string), 453Debug.Assert((mode == PersistenceMode.InnerDefaultProperty) || (mode == PersistenceMode.EncodedInnerDefaultProperty), 617Debug.Assert (propName != null, 692Debug.Assert(typeof(ITemplate).IsAssignableFrom(propDesc.PropertyType), 710Debug.Assert(template is TemplateBuilder, "Unexpected ITemplate implementation."); 822Debug.Assert(baseComponent != null, "Control does not have its Page set!"); 833Debug.Assert(host != null, "Did not get a valid IDesignerHost reference. Expect persistence problems!"); 865Debug.Assert(host != null, "Did not get a valid IDesignerHost reference. Expect persistence problems!"); 876Debug.Assert((tagName != null) && (tagName.Length != 0)); 965Debug.Assert(((IDataBindingsAccessor)control).HasDataBindings == true); 969Debug.Assert(textBinding != null, "Did not get a Text databinding from DesignerDataBoundLiteralControl"); 979Debug.Assert(control.Text != null);
UI\MobileControls\Design\MobileTemplatedControlDesigner.cs (15)
217Debug.Assert(_host != null); 245Debug.Assert(_iWebFormsDocumentService != null); 315Debug.Assert(CurrentDeviceSpecific.Choices != null); 372Debug.Assert(_control is DeviceSpecific); 388Debug.Assert ( 402Debug.Assert(teService != null, 538Debug.Fail(ex.ToString()); 633Debug.Assert(AllowTemplateEditing); 679Debug.Assert(component is System.Web.UI.MobileControls.MobileControl || 711Debug.Assert(choice != null); 845Debug.Assert(Behavior != null); 854Debug.Assert(AllowTemplateEditing); 1016Debug.Assert(_defaultDeviceSpecificIdentifier == deviceSpecificParentID); 1023Debug.Assert(_defaultDeviceSpecificIdentifier == deviceSpecificParentID); 1035Debug.Assert(_control is DeviceSpecific);
UI\MobileControls\Design\MobileUITypeEditor.cs (3)
31Debug.Assert(designerHost != null, "Did not get DesignerHost service."); 33Debug.Assert(context.Instance is Control, "Expected Control"); 37Debug.Assert(designer != null, "Did not get designer for component");
UI\MobileControls\Design\ObjectListCommandsPage.cs (2)
284Debug.Assert(name != null, "invalid name for ObjectListCommand"); 285Debug.Assert(runtimeCommand != null, "null ObjectListCommand");
UI\MobileControls\Design\ObjectListDesigner.cs (3)
77Debug.Assert(component is System.Web.UI.MobileControls.ObjectList, 86Debug.Assert(index >= 0 & index <= _templateFrameNames.Length); 503Debug.Assert(_designerVerbs.Count == 2);
UI\MobileControls\Design\ObjectListFieldsPage.cs (3)
314Debug.Assert(fieldNode.RuntimeField != null); 353Debug.Assert(fieldID != null, "invalid ID for ObjectListField"); 354Debug.Assert(runtimeField != null, "null ObjectListField");
UI\MobileControls\Design\PanelDesigner.cs (1)
108Debug.Assert(component is Panel,
UI\MobileControls\Design\PhoneCallDesigner.cs (2)
55Debug.Assert(component is System.Web.UI.MobileControls.PhoneCall, 75Debug.Assert(_call.Text != null);
UI\MobileControls\Design\PropertyOverridesDialog.cs (9)
230Debug.Fail("Loaded duplicate choice: " + 353Debug.Assert(componentSite != null, "Expected the runtime control to be sited."); 465Debug.Assert(!InExternalCacheEditMode, 484Debug.Assert(InExternalCacheEditMode, 497Debug.Assert(InExternalCacheEditMode, 511Debug.Assert(InExternalCacheEditMode, 564Debug.Assert(deviceSpecificParentID == _currentDeviceSpecificID); 582Debug.Assert(_currentDeviceSpecificID != null); 818Debug.Assert(_site != null);
UI\MobileControls\Design\PropertyOverridesTypeEditor.cs (5)
29Debug.Assert(context.Instance is Control, "Expected control"); 46Debug.Assert(serviceProvider != null, 54Debug.Assert(designerHost != null, 59Debug.Assert(dsDesigner != null, 98Debug.Fail(e.ToString());
UI\MobileControls\Design\SelectionListDesigner.cs (2)
271Debug.Assert(items != null, "Items is null in LisControl"); 386Debug.Assert(component is System.Web.UI.MobileControls.SelectionList,
UI\MobileControls\Design\StylesEditorDialog.cs (12)
72Debug.Assert(_tvDefinedStyles != null); 77Debug.Assert(_tvDefinedStyles != null); 399Debug.Assert(_lvAvailableStyles.Items.Count > 0); 673Debug.Assert(null != e); 674Debug.Assert(e.CancelEdit == false); 762Debug.Assert(newStyle != null); 808Debug.Assert(direction == 1 || direction == -1); 811Debug.Assert(node != null); 851Debug.Assert(SelectedStyle != null); 1186Debug.Assert(property != null); 1223Debug.Assert(property != null); 1232Debug.Assert(styleSheet != null);
UI\MobileControls\Design\StyleSheetComponentEditor.cs (1)
33Debug.Assert(component is StyleSheet);
UI\MobileControls\Design\StyleSheetDesigner.cs (19)
147Debug.Assert(component is System.Web.UI.MobileControls.StyleSheet, 197Debug.Assert(_iWebFormsDocumentService != null); 208Debug.Assert(teService != null, 263Debug.Assert(RootControl != null); 281Debug.Assert(designer != null); 283Debug.Assert(ssd != null, "ssd is null in StyleSheetDesigner"); 292Debug.Assert(index >= 0 & index <= _templateFrameNames.Length); 407Debug.Assert(designer != null, "designer is null in StyleSheetDesigner"); 545Debug.Assert(errorMsg != null && errorIconUrl != null); 678Debug.Assert(style != null); 795Debug.Assert(null != style, "style is null in IDeviceSpecificDesigner.SetDeviceSpecific"); 870Debug.Assert(style != null); 877Debug.Assert(null != CurrentStyle); 943Debug.Fail(ex.ToString()); 1005Debug.Assert (_currentStyle != null); 1070Debug.Assert(Behavior != null, "Behavior is null"); 1125Debug.Assert(null != _styleSheet, "_styleSheet is null"); 1162Debug.Assert(_designerVerbs.Count == 2); 1203Debug.Fail(ex.ToString());
UI\MobileControls\Design\TableFieldsEditor.cs (3)
49Debug.Assert(context != null); 52Debug.Assert(objectList != null); 55Debug.Assert(designer != null);
UI\MobileControls\Design\TemplatingOptionsDialog.cs (7)
176Debug.Assert(_dsd != null); 226Debug.Assert(_cmbChoices.Items.Count > 0); 249Debug.Assert(null != container, "container is null"); 408Debug.Assert(ds.Choices != null); 485Debug.Assert(_ds != null); 486Debug.Assert(_cmbChoices.SelectedIndex >= 0); 502Debug.Assert(previousSchemaOccurrences > 0);
UI\MobileControls\Design\TextBoxDesigner.cs (1)
52Debug.Assert(component is System.Web.UI.MobileControls.TextBox,
UI\MobileControls\Design\TextViewDesigner.cs (2)
48Debug.Assert(component is System.Web.UI.MobileControls.TextView, 79Debug.Assert (_textView.Text != null);
UI\MobileControls\Design\Util\DesignerUtility.cs (1)
58Debug.Assert(choice != null);
UI\MobileControls\Design\Util\EditableTreeList.cs (4)
184Debug.Assert( 194Debug.Assert(direction == 1 || direction == -1); 196Debug.Assert( 201Debug.Assert(
UI\MobileControls\Design\Util\FileReader.cs (1)
48Debug.Fail("FileReader - Unable to read url '"
UI\MobileControls\Design\Util\HeaderLabel.cs (1)
38Debug.Assert(headerPanel != null,
UI\MobileControls\Design\Util\HeaderPanel.cs (1)
62Debug.Assert(offset == 0,
UI\MobileControls\Design\Util\ImageCreator.cs (1)
66Debug.Assert(showMessage || showTitle);
UI\MobileControls\Design\Util\MSHTMLHost.cs (9)
42Debug.Assert(tridentSite != null, 58Debug.Assert(Handle != IntPtr.Zero, 65Debug.WriteLine("Exception caught in MSHTMLHost::CreateTrident\n\t" + e.ToString()); 72Debug.Assert(tridentSite != null, 96Debug.Assert((parent != null) && (parent.Handle != IntPtr.Zero), 153Debug.Assert(pViewToActivate != null, 374Debug.Fail(e.ToString()); 384Debug.Assert(tridentOleObject != null, 394Debug.Fail(e.ToString());
UI\MobileControls\Design\Util\TemporaryBitmapFile.cs (2)
32Debug.Assert(bitmap != null, 89Debug.Assert(value != null,
UI\MobileControls\Design\Util\WbmpConverter.cs (2)
41Debug.Fail("Wbmp is not type 0. (Unsupported)"); 82Debug.Fail("Wbmp file appears to be corrupt.");
UI\MobileControls\Design\Util\WebConfigManager.cs (9)
39Debug.Assert(site != null); 90Debug.Fail(ex.ToString()); 163Debug.Assert(node != null); 212Debug.Assert(Document != null); 263Debug.Assert(_xmlNode.Attributes != null); 268Debug.Assert( 277Debug.Assert( 301Debug.Assert(_xmlNode != null); 311Debug.Assert(_xmlNode != null);
UI\MobileControls\Design\ValidationSummaryDesigner.cs (1)
52Debug.Assert(component is System.Web.UI.MobileControls.ValidationSummary,
UI\MobileControls\DeviceSpecific.cs (4)
58Debug.Assert(_owner != null, "Owner is null"); 65Debug.Assert((_owner == null || MobilePage == null || MobilePage.DesignMode), "Owner has already been set"); 160Debug.Assert(Owner is MobileControl); 199Debug.Assert(_closestTemplateControl != null);
UI\MobileControls\DeviceSpecificChoice.cs (1)
57Debug.Assert(_deviceFilter != null);
UI\MobileControls\IndividualDeviceConfig.cs (7)
116Debug.Assert(typeof(IPageAdapter).IsAssignableFrom(value)); 180Debug.Assert(factory != null); 207Debug.Assert(_parentConfigName == null); 300Debug.Assert(referrer != null); 311Debug.Assert(ParentConfigName.Length != 0 && ParentConfig == null); 337Debug.Assert(PageAdapterType != null); 338Debug.Assert(DeviceQualifiesPredicate != null);
UI\MobileControls\List.cs (1)
353Debug.Assert (Items.Count >= 0);
UI\MobileControls\ListDataHelper.cs (1)
163Debug.Assert (dataSource != null);
UI\MobileControls\MobileCategoryAttribute.cs (2)
50Debug.Assert(value != null); 76Debug.Assert(localizedValue != null,
UI\MobileControls\MobileControl.cs (3)
268Debug.Assert(this is ITemplateable); 326Debug.Assert(control == null || 666Debug.Assert(state != null);
UI\MobileControls\MobileControlsSection.cs (4)
452Debug.Assert( ( value != null ) && ( value is DeviceElement ) ); 694Debug.Assert( ( value != null ) && ( value is ControlElement ) ); 718Debug.Assert(targetType != null); 730Debug.Assert(data is string);
UI\MobileControls\MobileControlsSectionHelper.cs (1)
62Debug.Assert(!String.IsNullOrEmpty(device.PredicateMethod));
UI\MobileControls\MobilePage.cs (1)
320Debug.Assert(pageAdapter != null);
UI\MobileControls\ObjectList.cs (6)
318Debug.Assert (Items[selectedIndex].Selected); 460Debug.Assert(_tableFieldIndices != null, "_tableFieldIndices is null."); 719Debug.Assert (dataSource != null, "dataSource is null"); 1182Debug.Assert (virtualIndex >= 0, "virtualIndex < 0"); 1194Debug.Assert(ItemCount > 0 || Items.BaseIndex == 0); 1292Debug.Assert (Items != null, "get_Items should initialize Items collection.");
UI\MobileControls\ObjectListField.cs (1)
210Debug.Assert(SelfReference, "Shouldn't get this far if !SelfReference");
UI\MobileControls\ObjectListItemCollection.cs (1)
136Debug.Assert (changes.Length == 2);
UI\MobileControls\PagedControl.cs (1)
321Debug.Assert (state == null || state.GetType() == typeof(Pair),
UI\MobileControls\PhoneCall.cs (1)
153Debug.Assert(PhoneNumber != null);
UI\MobileControls\RangeValidator.cs (1)
177Debug.Assert(false, "Should never be called.");
UI\MobileControls\Style.cs (3)
284Debug.Assert(_referredStyle == null || 312Debug.Assert(stylesheet == StyleSheet.Default); 679Debug.Assert(Control == null);
UI\MobileControls\StyleSheet.cs (1)
138Debug.Assert(value.Name != null);
UI\MobileControls\TextView.cs (1)
449Debug.Assert(false);
UI\MobileControls\ValidationSummary.cs (3)
201Debug.Assert(val != null, "Null reference unexpected!"); 202Debug.Assert(val.ErrorMessage.Length != 0, "Programmatic error: error message here shouldn't be empty!"); 206Debug.Assert(count == iMessage, "Not all messages were found!");
System.Web.Services (24)
System\Web\Services\Description\ProtocolImporter.cs (1)
621Debug.Assert(parameterFlags.Length == parameterTypes.Length, "parameterFlags.Length != parameterTypes.Length");
System\Web\Services\Description\ServiceDescription.cs (2)
1183Debug.Assert(isInput == true, "Oneway flow cannot have an output message"); 1191Debug.Assert(false, "Unknown message flow");
System\Web\Services\Description\WebCodeGenerator.cs (4)
84Debug.Assert(codeNamespace != null, "Inalid (null) CodeNamespace"); 146Debug.Assert(parameterTypeNames.Length == parameterNames.Length, "invalid set of parameters"); 181Debug.Assert(parameterFlags.Length == parameterTypeNames.Length && parameterTypeNames.Length == parameterNames.Length, "invalid set of parameters"); 244Debug.Assert(propNames.Length == propValues.Length, "propNames.Length != propValues.Length");
System\Web\Services\Discovery\DiscoveryClientProtocol.cs (1)
362Debug.Assert(Documents[reference.Url] != null, "Couldn't deserialize file " + results.Results[i].Filename);
System\Web\Services\Discovery\DiscoveryRequestHandler.cs (2)
47if ( CompModSwitches.DynamicDiscoverySearcher.TraceVerbose ) Debug.WriteLine("DiscoveryRequestHandle: handling " + physicalPath); 97if ( CompModSwitches.DynamicDiscoverySearcher.TraceVerbose ) Debug.WriteLine( "*** DiscoveryRequestHandler.ProcessRequest() - startDir: " + searchStartUrlDir + " discoFileName :" + discoFileName);
System\Web\Services\Discovery\DynamicDiscoSearcher.cs (4)
55Debug.Assert( s != null, "null element in excluded list" ); 105if ( CompModSwitches.DynamicDiscoverySearcher.TraceVerbose ) Debug.WriteLine( "DynamicDiscoSearcher.ScanDirectory(): directory=" + directory); 142Debug.WriteLine( "= DynamicDiscoSearcher.ScanDirByPattern(): dir=" + dir + " Phys.dir=" + directory.Name); 152if ( CompModSwitches.DynamicDiscoverySearcher.TraceVerbose ) Debug.WriteLine( "=== DynamicDiscoSearcher.ScanDirByPattern(): file.Name=" + file.Name + " fileToSkipFirst=" + fileToSkipFirst);
System\Web\Services\Discovery\DynamicVirtualDiscoSearcher.cs (3)
69if ( CompModSwitches.DynamicDiscoverySearcher.TraceVerbose ) Debug.WriteLine( "DynamicVirtualDiscoSearcher.SearchSubDirectories(): nameAdsiDir=" + nameAdsiDir); 134if ( CompModSwitches.DynamicDiscoverySearcher.TraceVerbose ) Debug.WriteLine( "+++ DynamicVirtualDiscoSearcher.GetPhysicalDir(): dir=" + dir + " Exception=" + e.ToString() ); 164if ( CompModSwitches.DynamicDiscoverySearcher.TraceVerbose ) Debug.WriteLine("GetWebServerForUrl() bindingsEntry=" + bindingsEntry);
System\Web\Services\Protocols\ClientProtocol.cs (3)
241Debug.Assert(asyncResult.Request == null, "calling GetWebRequest twice for the same WebClientAsyncResult"); 602Debug.Assert(!isCompleted, "Complete called more than once."); 898Debug.Assert(userState != null, "We should not call OperationCompleted with null user token.");
System\Web\Services\Protocols\SoapServerProtocol.cs (1)
476Debug.Assert(isOneWay || (onewayInitException == null), "initException is meant to be used for oneWay methods only.");
System\Web\Services\Protocols\WebServiceHandler.cs (3)
45Debug.Flush(); 82if (CompModSwitches.Remote.TraceVerbose) Debug.WriteLine("Server Exception: " + e.ToString()); 84if (CompModSwitches.Remote.TraceVerbose) Debug.WriteLine("TargetInvocationException caught.");
System.Windows.Forms (3922)
misc\ClientUtils.cs (2)
86System.Diagnostics.Debug.Assert(maxNumberOfBitsOn >=0 && maxNumberOfBitsOn<32, "expect this to be greater than zero and less than 32"); 134System.Diagnostics.Debug.Assert(Enum.GetValues(enumValue.GetType()).Length == enumValues.Length, "Not all the enum members were passed in.");
misc\DebugHandleTracker.cs (18)
92Debug.WriteLine("------------Begin--CheckLeaks--------------------"); 98Debug.WriteLine("-------------End--CheckLeaks---------------------"); 145Debug.WriteLine("*************************************************"); 146Debug.WriteLine("While removing, couldn't find handle: " + Convert.ToString(unchecked((int)handle), 16)); 147Debug.WriteLine("Handle Type : " + handleName); 148Debug.WriteLine(Environment.StackTrace); 149Debug.WriteLine("-------------------------------------------------"); 183Debug.WriteLine("-------------------------------------------------"); 184Debug.WriteLine("Handle Allocating: " + Convert.ToString(unchecked((int)handle), 16)); 185Debug.WriteLine("Handle Type : " + name); 187Debug.WriteLine(Environment.StackTrace); 192Debug.Assert(entry.handle != handle, "Duplicate handle of type " + name); 215Debug.WriteLine("\r\nHandle leaks detected for handles of type " + name + ":"); 218Debug.WriteLine(e.ToString(this)); 261Debug.WriteLine("-------------------------------------------------"); 262Debug.WriteLine("Handle Releaseing: " + Convert.ToString(unchecked((int)handle), 16)); 263Debug.WriteLine("Handle Type : " + name); 265Debug.WriteLine(Environment.StackTrace);
misc\DpiHelper.cs (2)
146System.Diagnostics.Debug.WriteLine(" 'DpiAwarenessValue' is set to 'false', value = " + value); 149System.Diagnostics.Debug.WriteLine("Either 'DpiAwarenessValue' is not set or 'DpiAwarenessValue' set is invalid in app.config, value set = " + value);
misc\GDI\DeviceContext.cs (11)
149Debug.Assert(!this.disposed, "Accessing a disposed DC, forcing recreation of HDC - this will generate a Handle leak!"); 164Debug.Assert( this.hDC != IntPtr.Zero, "Attempt to use deleted HDC - DC type: " + this.dcType ); 180Debug.Assert(this.hDC != IntPtr.Zero, "Cannot get initial state without a valid HDC"); 195Debug.Assert(currentPen == hCurrentPen, "DeviceContext thinks a different pen is selected than the HDC"); 203Debug.Assert(currentBrush == hCurrentBrush, "DeviceContext thinks a different brush is selected than the HDC"); 211Debug.Assert(currentBmp == hCurrentBmp, "DeviceContext thinks a different brush is selected than the HDC"); 323Debug.Assert( hdc != IntPtr.Zero, "hdc == 0" ); 372Debug.Assert( disposing, "WARNING: Finalizing a Display DeviceContext.\r\nReleaseDC may fail when not called from the same thread GetDC was called from." ); 433Debug.Assert( this.dcType == DeviceContextType.Display, "Calling GetDC from a non display/window device." ); 521Debug.Assert(contextStack != null, "Someone is calling RestoreHdc() before SaveHdc()"); 630Debug.Assert(clip.HRegion != IntPtr.Zero);
misc\GDI\NativeMethods.cs (1)
319Debug.Assert( lf != null, "lf is null" );
misc\GDI\UnsafeNativeMethods.cs (3)
191Debug.Assert(hRgnDest.Wrapper != null && hRgnDest.Handle != IntPtr.Zero, "Destination region is invalid"); 192Debug.Assert(hRgnSrc1.Wrapper != null && hRgnSrc1.Handle != IntPtr.Zero, "Source region 1 is invalid"); 193Debug.Assert(hRgnSrc2.Wrapper != null && hRgnSrc2.Handle != IntPtr.Zero, "Source region 2 is invalid");
misc\GDI\WindowsBrush.cs (2)
129Debug.Assert(this.nativeHandle == IntPtr.Zero, "WindowsBrush object is immutable"); 130Debug.Assert(value != IntPtr.Zero, "WARNING: assigning IntPtr.Zero to the nativeHandle object.");
misc\GDI\WindowsFont.cs (5)
70Debug.Assert( hFont == IntPtr.Zero, "hFont is not null, this will generate a handle leak." ); 71Debug.Assert( this.logFont != null, "WindowsFont.logFont not initialized." ); 140Debug.Assert( size > 0.0f, "size has a negative value." ); 183Debug.Assert( lf != null, "lf is null" ); 314Debug.Assert( this.hFont != IntPtr.Zero, "Unexpected null hFont." );
misc\GDI\WindowsGraphics.cs (4)
67Debug.Assert( dc != null, "null dc!"); 120Debug.Assert( hDc != IntPtr.Zero, "null hDc" ); 164Debug.Assert( g != null, "null Graphics object." ); 294Debug.Fail("Exception thrown during disposing: \r\n" + ex.ToString());
misc\GDI\WindowsGraphics2.cs (8)
57Debug.Assert( Enum.IsDefined(typeof(TextPaddingOptions), this.paddingFlags)); 64Debug.Assert( Enum.IsDefined(typeof(TextPaddingOptions), value)); 208Debug.Assert( ((uint)flags & GdiUnsupportedFlagMask) == 0, "Some custom flags were left over and are not GDI compliant!" ); 209Debug.Assert( (flags & IntTextFormatFlags.CalculateRectangle) == 0, "CalculateRectangle flag is set, text won't be drawn" ); 442Debug.Assert( ((uint)flags & GdiUnsupportedFlagMask) == 0, "Some custom flags were left over and are not GDI compliant!" ); 540Debug.Assert( ((uint)flags & GdiUnsupportedFlagMask) == 0, "Some custom flags were left over and are not GDI compliant!" ); 586Debug.Assert( pen != null, "pen == null" ); 624Debug.Assert( brush != null, "brush == null" );
misc\GDI\WindowsGraphicsCacheManager.cs (2)
107Debug.Assert( measurementGraphics == null || measurementGraphics.DeviceContext != null, "TLS MeasurementGraphics was disposed somewhere, enable TRACK_HDC macro to determine who did it, recreating it for now ..." ); 162Debug.Assert(WindowsFontCache[index].Value.Hfont != IntPtr.Zero, "Cached WindowsFont was disposed, enable GDI_FINALIZATION_WATCH to track who did it!");
misc\GDI\WindowsPen.cs (1)
98Debug.Assert(windowsBrush != null, "null windowsBrush" );
misc\GDI\WindowsRegion.cs (1)
134Debug.Assert(nativeHandle == IntPtr.Zero, "nativeHandle should be null, we're leaking handle");
misc\GDI\WindowsSolidBrush.cs (1)
38Debug.Fail("CreateSolidBrush failed : " + DbgUtil.GetLastErrorStr());
misc\HandleCollector.cs (1)
252System.Diagnostics.Debug.Fail("Handle collector underflow for type '" + name + "'");
misc\ImageListUtils.cs (2)
30Debug.Fail("A property specified in the path is null or not yet instanciated at this time"); 35Debug.Fail("The path specified to the property is wrong");
winforms\Managed\System\Resources\ResXDataNode.cs (2)
531Debug.WriteLine("Converter for " + type.FullName + " doesn't support string conversion"); 545Debug.Assert(value is string, "Resource entries with no Type or MimeType must be encoded as strings");
winforms\Managed\System\Resources\ResXFileRef.cs (1)
308Debug.Assert(s != null, "Couldn't open " + fileName);
winforms\Managed\System\Resources\ResXResourceWriter.cs (4)
314Debug.Assert(fileName != null, "Nothing to output to"); 495Debug.WriteLineIf(ResValueProviderSwitch.TraceVerbose, " resx: adding resource " + name); 765Debug.WriteLineIf(ResValueProviderSwitch.TraceVerbose, "writing XML"); 770Debug.WriteLineIf(ResValueProviderSwitch.TraceVerbose, "done");
winforms\Managed\System\WinForms\AccessibleObject.cs (32)
402Debug.Assert(child != null, "GetChild(" + index.ToString(CultureInfo.InvariantCulture) + ") returned null!"); 464Debug.Assert(child != null, "GetChild(" + index.ToString(CultureInfo.InvariantCulture) + ") returned null!"); 501Debug.Assert(child != null, "GetChild(" + index.ToString(CultureInfo.InvariantCulture) + ") returned null!"); 1268Debug.WriteLineIf(CompModSwitches.MSAA.TraceInfo, "AccessibleObject.AccDoDefaultAction: this = " + 1311Debug.WriteLineIf(CompModSwitches.MSAA.TraceInfo, "AccessibleObject.AccHitTest: this = " + 1356Debug.WriteLineIf(CompModSwitches.MSAA.TraceInfo, "AccessibleObject.AccLocation: this = " + 1368Debug.WriteLineIf(CompModSwitches.MSAA.TraceInfo, "AccessibleObject.AccLocation: Returning " + 1384Debug.WriteLineIf(CompModSwitches.MSAA.TraceInfo, "AccessibleObject.AccLocation: Returning " + 1395Debug.WriteLineIf(CompModSwitches.MSAA.TraceInfo, "AccessibleObject.AccLocation: Setting " + 1427Debug.WriteLineIf(CompModSwitches.MSAA.TraceInfo, "AccessibleObject.AccNavigate: this = " + 1477Debug.WriteLineIf(CompModSwitches.MSAA.TraceInfo, "AccessibleObject.AccSelect: this = " + 1543Debug.WriteLineIf(CompModSwitches.MSAA.TraceInfo, "AccessibleObject.GetAccChild: this = " + 1556Debug.Assert(child != this, "An accessible object is returning itself as its own child. This can cause Accessibility client applications to hang."); 1595Debug.WriteLineIf(CompModSwitches.MSAA.TraceInfo, "AccessibleObject.accHildCount: this = " + this.ToString() + ", returning " + childCount.ToString(CultureInfo.InvariantCulture)); 1702Debug.WriteLineIf(CompModSwitches.MSAA.TraceInfo, "AccessibleObject.GetAccFocus: this = " + 1859Debug.WriteLineIf(CompModSwitches.MSAA.TraceInfo, "AccessibleObject.get_accName: this = " + this.ToString() + 1899Debug.WriteLineIf(CompModSwitches.MSAA.TraceInfo, "AccessibleObject.accParent: this = " + this.ToString()); 1904Debug.Assert(parent != this, "An accessible object is returning itself as its own parent. This can cause accessibility clients to hang."); 1955Debug.WriteLineIf(CompModSwitches.MSAA.TraceInfo, "AccessibleObject.GetAccSelection: this = " + 1991Debug.WriteLineIf(CompModSwitches.MSAA.TraceInfo, "AccessibleObject.GetAccState: this = " + 2407Debug.Assert(acc != null, "SystemIAccessible is null"); 2408Debug.Assert(en != null, "SystemIEnumVariant is null"); 2802Debug.Fail($"{nameof(this.ScrollIntoView)}() is not overriden"); 2813Debug.Assert(owner != null, "Cannot create EnumVariantObject with a null owner"); 2818Debug.Assert(owner != null, "Cannot create EnumVariantObject with a null owner"); 2875Debug.WriteLineIf(CompModSwitches.MSAA.TraceInfo, "EnumVariantObject: owner = " + owner.ToString() + ", n = " + n); 2877Debug.Indent(); 2891Debug.Unindent(); 2922Debug.WriteLineIf(CompModSwitches.MSAA.TraceInfo, "AccessibleObject.IEV.Next: Delegating to systemIEnumVariant"); 2946Debug.WriteLineIf(CompModSwitches.MSAA.TraceInfo, "AccessibleObject.IEV.Next: adding sys child " + currentChild + " of " + newOrder.Length); 2962Debug.WriteLineIf(CompModSwitches.MSAA.TraceInfo, "AccessibleObject.IEV.Next: adding own child " + currentChild + " of " + childCount); 2974Debug.WriteLineIf(CompModSwitches.MSAA.TraceInfo, "AccessibleObject.IEV.Next: no children to add");
winforms\Managed\System\WinForms\Application.cs (63)
340Debug.WriteLineIf(IntSecurity.SecurityDemand.TraceVerbose, "AffectThreadBehavior Demanded"); 386Debug.WriteLineIf(IntSecurity.SecurityDemand.TraceVerbose, "FileIO(" + executablePath + ") Demanded"); 623Debug.WriteLineIf(IntSecurity.SecurityDemand.TraceVerbose, "WindowAdornmentModification Demanded"); 648Debug.WriteLineIf(IntSecurity.SecurityDemand.TraceVerbose, "FileIO(" + startupPath + ") Demanded"); 861Debug.WriteLineIf(IntSecurity.SecurityDemand.TraceVerbose, "ManipulateWndProcAndHandles Demanded"); 975Debug.WriteLineIf(IntSecurity.SecurityDemand.TraceVerbose, "AffectThreadBehavior Demanded"); 1102Debug.WriteLineIf(IntSecurity.SecurityDemand.TraceVerbose, "AffectThreadBehavior Demanded"); 1155Debug.WriteLineIf(IntSecurity.SecurityDemand.TraceVerbose, "AffectThreadBehavior Demanded"); 1246Debug.Assert(cxt != null, "No thread context for handle. This is expected if you saw a previous assert about the handle being invalid."); 1308Debug.Assert(UnsafeNativeMethods.IsWindow(handle), "Handle being parked is not a valid window handle"); 1309Debug.Assert(((int)UnsafeNativeMethods.GetWindowLong(handle, NativeMethods.GWL_STYLE) & NativeMethods.WS_CHILD) != 0, "Only WS_CHILD windows should be parked."); 1405Debug.Assert(process != null); 1449Debug.Assert(arguments != null && arguments.Length > 0); 1575Debug.WriteLineIf(IntSecurity.SecurityDemand.TraceVerbose, "AffectThreadBehavior Demanded"); 1754Debug.WriteLineIf(CompModSwitches.MSOComponentManager.TraceInfo, "ComponentManager: Component registered. ID: " + cookieCounter.ToString(CultureInfo.InvariantCulture)); 1767Debug.WriteLineIf(CompModSwitches.MSOComponentManager.TraceInfo, "ComponentManager: Revoking component " + dwLocalComponentID.ToString(CultureInfo.InvariantCulture)); 1771Debug.WriteLineIf(CompModSwitches.MSOComponentManager.TraceInfo, "Compoenent not registered."); 1830Debug.WriteLineIf(CompModSwitches.MSOComponentManager.TraceInfo, "ComponentManager: Component activated. ID: " + dwLocalComponentID.ToString(CultureInfo.InvariantCulture)); 1834Debug.WriteLineIf(CompModSwitches.MSOComponentManager.TraceInfo, "*** Component not registered ***"); 1838Debug.WriteLineIf(CompModSwitches.MSOComponentManager.TraceInfo, "New active component is : " + entry.component.ToString()); 1930Debug.WriteLineIf(CompModSwitches.MSOComponentManager.TraceInfo, "ComponentManager: Component enter state. ID: " + dwLocalComponentID.ToString(CultureInfo.InvariantCulture) + " state: " + uStateID.ToString(CultureInfo.InvariantCulture)); 1934Debug.Indent(); 1939Debug.WriteLineIf(CompModSwitches.MSOComponentManager.TraceInfo, "Notifying " + entry.component.ToString()); 1943Debug.Unindent(); 1980Debug.WriteLineIf(CompModSwitches.MSOComponentManager.TraceInfo, "ComponentManager: Component exit state. ID: " + dwLocalComponentID.ToString(CultureInfo.InvariantCulture) + " state: " + uStateID.ToString(CultureInfo.InvariantCulture)); 1984Debug.Indent(); 1989Debug.WriteLineIf(CompModSwitches.MSOComponentManager.TraceInfo, "Notifying " + entry.component.ToString()); 1993Debug.Unindent(); 2079Debug.WriteLineIf(CompModSwitches.MSOComponentManager.TraceInfo, "ComponentManager : Pushing message loop " + reason.ToString(CultureInfo.InvariantCulture)); 2080Debug.Indent(); 2120Debug.WriteLineIf(CompModSwitches.MSOComponentManager.TraceInfo, "ComponentManager : Normal message loop termination"); 2205Debug.Unindent(); 2206Debug.WriteLineIf(CompModSwitches.MSOComponentManager.TraceInfo, "ComponentManager : message loop " + reason.ToString(CultureInfo.InvariantCulture) + " complete."); 2289Debug.Fail("Unknown dwgac in FGetActiveComponent"); 2422Debug.WriteLineIf(CompModSwitches.MSOComponentManager.TraceInfo, "Application.ComponentManager.Get:"); 2508Debug.WriteLineIf(CompModSwitches.MSOComponentManager.TraceInfo, "Using MSO Component manager"); 2537Debug.WriteLineIf(CompModSwitches.MSOComponentManager.TraceInfo, "Using our own component manager"); 2543Debug.WriteLineIf(CompModSwitches.MSOComponentManager.TraceInfo, "Registering MSO component with the component manager"); 2553Debug.Assert(componentID != INVALID_ID, "Our ID sentinel was returned as a valid ID"); 2559Debug.Assert(result, "Failed to register WindowsForms with the ComponentManager -- DoEvents and modal dialogs will be broken. size: " + info.cbSize); 2560Debug.WriteLineIf(CompModSwitches.MSOComponentManager.TraceInfo, "ComponentManager.FRegisterComponent returned " + result.ToString()); 2561Debug.WriteLineIf(CompModSwitches.MSOComponentManager.TraceInfo, "ComponentManager.FRegisterComponent assigned a componentID == [0x" + Convert.ToString(componentID, 16) + "]"); 2637Debug.Assert(parkingWindows.Count == 1, "parkingWindows count can not be > 1 for legacy OS/target framework versions"); 2752Debug.WriteLineIf(CompModSwitches.MSOComponentManager.TraceInfo, "ComponentManager : Entering modal state"); 2913Debug.WriteLineIf(CompModSwitches.MSOComponentManager.TraceInfo, "ComponentManager : Leaving modal state"); 2916Debug.Assert(threadWindows != null, "OnEnterState recursed, but it's not supposed to be reentrant"); 3301Debug.WriteLineIf(CompModSwitches.MSOComponentManager.TraceInfo, "ComponentManager : Attempting to terminate message loop"); 3357Debug.WriteLineIf(CompModSwitches.MSOComponentManager.TraceInfo, "ThreadContext.PushMessageLoop {"); 3358Debug.Indent(); 3422Debug.WriteLineIf(CompModSwitches.MSOComponentManager.TraceInfo, "[0x" + Convert.ToString(componentID, 16) + "] Notifying component manager that we are entering a modal loop"); 3451Debug.WriteLineIf(CompModSwitches.MSOComponentManager.TraceInfo, "[0x" + Convert.ToString(componentID, 16) + "] Calling ComponentManager.FPushMessageLoop..."); 3478Debug.WriteLineIf(CompModSwitches.MSOComponentManager.TraceInfo, "[0x" + Convert.ToString(componentID, 16) + "] ComponentManager.FPushMessageLoop returned " + result.ToString()); 3483Debug.WriteLineIf(CompModSwitches.MSOComponentManager.TraceInfo, "[0x" + Convert.ToString(componentID, 16) + "] Notifying component manager that we are exiting a modal loop"); 3513Debug.Unindent(); 3514Debug.WriteLineIf(CompModSwitches.MSOComponentManager.TraceInfo, "}"); 3827Debug.WriteLineIf(CompModSwitches.MSOComponentManager.TraceInfo, "ComponentManager : OnEnterState(" + uStateID + ", " + fEnter + ")"); 3865Debug.WriteLineIf(CompModSwitches.MSOComponentManager.TraceInfo, "ComponentManager : Our component is losing activation."); 3908Debug.WriteLineIf(CompModSwitches.MSOComponentManager.TraceInfo, "ComponentManager : OnActivationChange"); 3958Debug.WriteLineIf(CompModSwitches.MSOComponentManager.TraceInfo, "ComponentManager : Abnormal loop termination, no WM_QUIT received"); 4129Debug.Fail("How did parkingwindow childcount go negative???"); 4138Debug.Fail("How did parkingwindow childcount go negative???"); 4196Debug.Assert(UnsafeNativeMethods.GetParent(handle) != Handle, "Always set the handle's parent to someone else before calling UnparkHandle"); 4300Debug.WriteLineIf(CompModSwitches.MSOComponentManager.TraceInfo, "ComponentManager : Changing enabled on window: " + hWnd.ToString() + " : " + state.ToString());
winforms\Managed\System\WinForms\ArrangedElement.cs (2)
77Debug.Assert((value.Right >= 0 && value.Left >= 0 && value.Top >= 0 && value.Bottom >=0), "who's setting margin negative?"); 87Debug.Assert((value.Right >= 0 && value.Left >= 0 && value.Top >= 0 && value.Bottom >=0), "who's setting padding negative?");
winforms\Managed\System\WinForms\AxHost.cs (268)
1194Debug.Fail(t.ToString()); 1216Debug.Assert(o == null || o is ISelectionService, "service must implement ISelectionService"); 1369Debug.Fail("Failed to UiDeactivate: " + hr.ToString(CultureInfo.InvariantCulture)); 1415Debug.Assert(!Visible, "if we were visible we would not be needing a fake window..."); 1429Debug.Assert(!IsHandleCreated, "if we need a fake window, we can't have a real one"); 1457Debug.WriteLineIf(AxHTraceSwitch.TraceVerbose, "log pixels are: "+logPixelsX.ToString(CultureInfo.InvariantCulture)+" "+logPixelsY.ToString(CultureInfo.InvariantCulture)); 1504Debug.WriteLineIf(AxHTraceSwitch.TraceVerbose, "setting extent to "+width.ToString(CultureInfo.InvariantCulture)+" "+height.ToString(CultureInfo.InvariantCulture)); 1522Debug.Fail(e.ToString()); 1622Debug.WriteLineIf(AxHostSwitch.TraceVerbose, "The horrible control subclassed itself w/o calling the old wndproc..."); 1624Debug.Assert(!OwnWindow(), "why are we here if we own our window?"); 1665Debug.WriteLineIf(AxHTraceSwitch.TraceVerbose, "Recursively entering TransitionDownTo..."); 1675Debug.Fail("how did we ever get into the open state?"); 1680Debug.Assert(NativeMethods.Succeeded(hr), "Failed in UiDeactivate: " + hr.ToString(CultureInfo.InvariantCulture)); 1681Debug.WriteLineIf(AxHTraceSwitch.TraceVerbose && GetOcState() == OC_INPLACE, "failed transition"); 1692Debug.WriteLineIf(AxHTraceSwitch.TraceVerbose && GetOcState() == OC_RUNNING, "failed transition"); 1698Debug.Assert(GetOcState() == OC_LOADED," failed transition"); 1703Debug.Assert(GetOcState() == OC_PASSIVE," failed transition"); 1707Debug.Fail("bad state"); 1720Debug.WriteLineIf(AxHTraceSwitch.TraceVerbose, "Recursively entering TransitionUpTo..."); 1728Debug.WriteLineIf(AxHTraceSwitch.TraceVerbose, "Transitioning up from: " + GetOcState().ToString(CultureInfo.InvariantCulture) + " to: " + state.ToString(CultureInfo.InvariantCulture)); 1733Debug.Assert(GetOcState() == OC_LOADED, " failed transition"); 1738Debug.Assert(GetOcState() == OC_RUNNING, " failed transition"); 1748Debug.Assert(!axState[fOwnWindow], "If we are invis at runtime, we should never be going beynd OC_RUNNING"); 1791Debug.Assert(GetOcState() == OC_UIACTIVE, " failed transition"); 1795Debug.Fail("bad state"); 1819Debug.Fail(t.ToString()); 1839Debug.WriteLineIf(AxHTraceSwitch.TraceVerbose, "Exception calling InPlaceDeactivate: "+ e.ToString()); 1844Debug.WriteLineIf(AxHTraceSwitch.TraceVerbose, "calling uiActivate for "+this.ToString()); 1845Debug.Assert(GetOcState() >= OC_INPLACE, "we have to be in place in order to ui activate..."); 1846Debug.Assert(CanUIActivate, "we have to be able to uiactivate"); 1853Debug.Assert(axState[fFakingWindow], "have to be faking it in order to destroy it..."); 1868Debug.WriteLineIf(AxHTraceSwitch.TraceVerbose, "Naughty control didn't call showObject..."); 1879Debug.Fail("extremely naughty ctl is refusing to give us an hWnd... giving up..."); 1910Debug.WriteLineIf(AxHTraceSwitch.TraceVerbose, "Could not make ctl visible by using INPLACE. Will try SHOW"); 1921Debug.Assert(!axState[fFakingWindow], "if we were visible, we could not have had a fake window..."); 1944Debug.Fail(t.ToString()); 1956Debug.Assert(!axState[fOwnWindow], "can't own our window when hiding"); 1957Debug.Assert(IsHandleCreated, "gotta have a window to hide"); 1958Debug.Assert(GetOcState() >= OC_INPLACE, "have to be in place in order to hide."); 1962Debug.WriteLineIf(AxHTraceSwitch.TraceVerbose, "Naughty control inplace deactivated on a hide verb..."); 1963Debug.Assert(!IsHandleCreated, "if we are inplace deactivated we should not have a window."); 2027Debug.WriteLineIf(ControlKeyboardRouting.TraceVerbose, "AxHost.PreProcessMessage " + msg.ToString()); 2060Debug.WriteLineIf(ControlKeyboardRouting.TraceVerbose, "\t Message translated by control to " + msg); 2076Debug.WriteLineIf(ControlKeyboardRouting.TraceVerbose, "\t Message processed by site. Calling base.PreProcessMessage() " + msg); 2080Debug.WriteLineIf(ControlKeyboardRouting.TraceVerbose, "\t Message not processed by site. Returning false. " + msg); 2102Debug.WriteLineIf(ControlKeyboardRouting.TraceVerbose, "In AxHost.ProcessMnemonic: " + (int)charCode); 2125Debug.WriteLineIf(ControlKeyboardRouting.TraceVerbose, "\t Processed mnemonic " + msg); 2131Debug.Fail("error in processMnemonic"); 2132Debug.Fail(t.ToString()); 2170Debug.Assert(!axState[disposed], "we chould not be asking for the object when we are axState[disposed]..."); 2182Debug.Fail("Trying to reload with a OcxState that is of a different type."); 2235Debug.Assert(oldOcxState != null, "we got to have an old state which holds out scribble storage..."); 2239Debug.Fail("unknown storage type."); 2250Debug.WriteLineIf(AxHTraceSwitch.TraceVerbose, "Could not create new OCX State: " + e.ToString()); 2282Debug.WriteLineIf(IntSecurity.SecurityDemand.TraceVerbose, "GetParent Demanded"); 2348Debug.Assert(storageType != STG_UNKNOWN, "if we are loaded, out storage type must be set!"); 2370Debug.Fail("unknown storage type"); 2402Debug.WriteLineIf(AxHTraceSwitch.TraceVerbose, "asked for usermode"); 2405Debug.WriteLineIf(AxHTraceSwitch.TraceVerbose, "asked for autoclip"); 2408Debug.WriteLineIf(AxHTraceSwitch.TraceVerbose, "asked for message reflect"); 2411Debug.WriteLineIf(AxHTraceSwitch.TraceVerbose, "asked for uidead"); 2414Debug.WriteLineIf(AxHTraceSwitch.TraceVerbose, "asked for displayasdefault"); 2417Debug.WriteLineIf(AxHTraceSwitch.TraceVerbose, "asked for font"); 2423Debug.WriteLineIf(AxHTraceSwitch.TraceVerbose, "asked for showGrabHandles"); 2426Debug.WriteLineIf(AxHTraceSwitch.TraceVerbose, "asked for showHatching"); 2443Debug.WriteLineIf(AxHTraceSwitch.TraceVerbose, "asked for localeid"); 2446Debug.WriteLineIf(AxHTraceSwitch.TraceVerbose, "asked for right to left"); 2458Debug.WriteLineIf(AxHTraceSwitch.TraceVerbose, "unsupported ambient "+dispid.ToString(CultureInfo.InvariantCulture)); 2480Debug.WriteLineIf(AxHTraceSwitch.TraceVerbose, "freezing "+v.ToString()); 2486Debug.Fail(t.ToString()); 2495Debug.Fail(t.ToString()); 2499Debug.Assert(freezeCount >=0, "invalid freeze count!"); 2503Debug.WriteLineIf(AxHTraceSwitch.TraceVerbose, "calling uiDeactivate for "+this.ToString()); 2547Debug.WriteLineIf(AxHTraceSwitch.TraceVerbose, "Failed to get the license key: " + e.ToString()); 2551Debug.WriteLineIf(AxHTraceSwitch.TraceVerbose, "Failed to get the license key: " + t.ToString()); 2559Debug.WriteLineIf(AxHTraceSwitch.TraceVerbose, "Creating object without license: " + clsid.ToString()); 2561Debug.WriteLineIf(AxHTraceSwitch.TraceVerbose, "\t" + (ret != null).ToString()); 2568Debug.WriteLineIf(AxHTraceSwitch.TraceVerbose, "Creating object with license: " + clsid.ToString()); 2572Debug.WriteLineIf(AxHTraceSwitch.TraceVerbose, "\tClassFactory" + (icf2 != null).ToString()); 2574Debug.WriteLineIf(AxHTraceSwitch.TraceVerbose, "\t" + (instance != null).ToString()); 2578Debug.WriteLineIf(AxHTraceSwitch.TraceVerbose, "Failed to create with license: " + t.ToString()); 2588Debug.Assert(instance == null, "instance must be null"); 2594Debug.Assert(instance != null, "w/o an exception being thrown we must have an object..."); 2603Debug.WriteLineIf(AxHTraceSwitch.TraceVerbose, "created"); 2655Debug.Fail(t.ToString()); 2663Debug.Assert(selectionStyle >= 0 && selectionStyle <= 2, "Invalid selection style"); 2684Debug.WriteLineIf(AxHTraceSwitch.TraceVerbose, "invoking EditMode for "+this.ToString()); 2685Debug.Assert((flags & AxFlags.PreventEditMode) == 0, "edit mode should have been disabled"); 2695Debug.Fail(t.ToString()); 2849Debug.WriteLineIf(AxHTraceSwitch.TraceVerbose, "Returning stashed values for : " + "<null>"); 2863Debug.WriteLineIf(AxHTraceSwitch.TraceVerbose, "Returning stashed values for : " + attributes.Length); 2886Debug.Assert(baseProps[i] != null, "Null base prop at location: " + i.ToString(CultureInfo.InvariantCulture)); 2903Debug.WriteLineIf(AxPropTraceSwitch.TraceVerbose, "Added AxPropertyDescriptor for: " + propName); 2908Debug.WriteLineIf(AxPropTraceSwitch.TraceVerbose, "Added PropertyDescriptor for: " + propName); 2916Debug.Assert(propDesc != null, "Cannot find cached entry for: " + propName); 2919Debug.Fail("Duplicate property with same name: " + propName); 2920Debug.WriteLineIf(AxPropTraceSwitch.TraceVerbose, "Duplicate property with same name: " + propName); 2970Debug.WriteLineIf(AxHTraceSwitch.TraceVerbose, "Updating stashed values for : " + ((attributes != null) ? attributes.Length.ToString(CultureInfo.InvariantCulture) : "<null>")); 3008Debug.Assert(dispid != NativeMethods.ActiveX.DISPID_UNKNOWN, "Wrong dispid sent to GetPropertyDescriptorFromDispid"); 3099Debug.WriteLineIf(AxHTraceSwitch.TraceVerbose, "Error trying load depersist from IStorage: " + hr); 3117Debug.WriteLineIf(AxHTraceSwitch.TraceVerbose, "Exception thrown trying to IPersistStreamInit.InitNew(). Is this good?" + e1.ToString()); 3134Debug.WriteLineIf(AxHTraceSwitch.TraceVerbose, "Exception thrown trying to IPersistStorage.InitNew(). Is this good?" + e2.ToString()); 3139Debug.WriteLineIf(AxHTraceSwitch.TraceVerbose, this + " supports IPersistPropertyBag."); 3145Debug.WriteLineIf(AxHTraceSwitch.TraceVerbose, "Exception thrown trying to IPersistPropertyBag.InitNew(). Is this good?" + e1.ToString()); 3149Debug.Fail("no implemented persitance interfaces on object"); 3161Debug.WriteLineIf(AxHTraceSwitch.TraceVerbose, "Exception thrown trying to IPersistStream.DepersistFromIStream(). Is this good?" + e.ToString()); 3171Debug.WriteLineIf(AxHTraceSwitch.TraceVerbose, "Exception thrown trying to IPersistStreamInit.DepersistFromIStreamInit(). Is this good?" + e.ToString()); 3187Debug.WriteLineIf(AxHTraceSwitch.TraceVerbose, "Exception thrown trying to IPersistStorage.DepersistFromIStorage(). Is this good?" + e.ToString()); 3191Debug.Fail("unknown storage type."); 3201Debug.WriteLineIf(AxHTraceSwitch.TraceVerbose, "Exception thrown trying to IPersistPropertyBag.DepersistFromIPropertyBag(). Is this good?" + e.ToString()); 3230Debug.WriteLineIf(AxHTraceSwitch.TraceVerbose, "Creating sink for events..."); 3235Debug.Fail(t.ToString()); 3247Debug.Fail(t.ToString()); 3316Debug.Fail(t.ToString()); 3395Debug.Fail(t.ToString()); 3582Debug.Assert(IsHandleCreated, "we got to have a handle to be here..."); 3598Debug.WriteLineIf(AxHTraceSwitch.TraceVerbose, "attaching window for "+this.ToString()+" "+hwnd.ToString()); 3606Debug.WriteLineIf(AxHTraceSwitch.TraceVerbose, "SetBounds " + setExtent.ToString()); 3611Debug.WriteLineIf(AxHTraceSwitch.TraceVerbose, "OcxBounds " + ocxExtent.ToString()); 3813Debug.Fail("Attempted to disconnect ConnectionPointCookie from the finalizer with no SynchronizationContext."); 3827Debug.Fail("Attempted to disconnect ConnectionPointCookie from the wrong thread (finalizer)."); 3902Debug.Fail("Attempted to disconnect ConnectionPointCookie from the finalizer with no SynchronizationContext."); 3946Debug.Fail("Attempted to disconnect ConnectionPointCookie from the wrong thread (finalizer)."); 3960Debug.WriteLineIf(AxHTraceSwitch.TraceVerbose, "in GetObject"); 3978Debug.WriteLineIf(AxHTraceSwitch.TraceVerbose, "in EnumControls"); 4058Debug.WriteLineIf(AxHTraceSwitch.TraceVerbose, "in OnControlInfoChanged"); 4063Debug.WriteLineIf(AxHTraceSwitch.TraceVerbose, "in LockInPlaceActive"); 4068Debug.WriteLineIf(AxHTraceSwitch.TraceVerbose, "in GetExtendedControl " + host.ToString()); 4091Debug.WriteLineIf(AxHTraceSwitch.TraceVerbose,"\t dwFlags not supported: " + dwFlags); 4105Debug.WriteLineIf(AxHTraceSwitch.TraceVerbose, "\t dwFlags not supported: " + dwFlags); 4110Debug.WriteLineIf(AxHTraceSwitch.TraceVerbose, "\t dwFlags not supported: " + dwFlags); 4118Debug.Assert(!host.GetAxState(AxHost.siteProcessedInputKey), "Re-entering UnsafeNativeMethods.IOleControlSite.TranslateAccelerator!!!"); 4137Debug.WriteLineIf(AxHTraceSwitch.TraceVerbose, "in OnFocus " + ((fGotFocus == 0) ? "lost" : "gained")); 4152Debug.WriteLineIf(AxHTraceSwitch.TraceVerbose, "in SaveObject"); 4157Debug.WriteLineIf(CompModSwitches.ActiveX.TraceInfo, "AxSource:GetMoniker"); 4163Debug.WriteLineIf(AxHTraceSwitch.TraceVerbose, "in getContainer"); 4170Debug.WriteLineIf(AxHTraceSwitch.TraceVerbose, "in ShowObject"); 4172Debug.Fail("we can't be in showobject if we own our window..."); 4201Debug.WriteLineIf(AxHTraceSwitch.TraceVerbose, "Windowless control."); 4209Debug.WriteLineIf(AxHTraceSwitch.TraceVerbose, "in OnShowWindow"); 4214Debug.WriteLineIf(AxHTraceSwitch.TraceVerbose, "in RequestNewObjectLayout"); 4228Debug.WriteLineIf(AxHTraceSwitch.TraceVerbose, "in GetWindow"); 4233Debug.Fail(t.ToString()); 4242Debug.WriteLineIf(AxHTraceSwitch.TraceVerbose, "in ContextSensitiveHelp"); 4247Debug.WriteLineIf(AxHTraceSwitch.TraceVerbose, "in CanInPlaceActivate"); 4252Debug.WriteLineIf(AxHTraceSwitch.TraceVerbose, "in OnInPlaceActivate"); 4260Debug.WriteLineIf(AxHTraceSwitch.TraceVerbose, "in OnUIActivate for " + host.ToString()); 4284Debug.WriteLineIf(AxHTraceSwitch.TraceVerbose, "in Scroll"); 4287Debug.Fail(t.ToString()); 4294Debug.WriteLineIf(AxHTraceSwitch.TraceVerbose, "in OnUIDeactivate for " + host.ToString()); 4303Debug.WriteLineIf(AxHTraceSwitch.TraceVerbose, "in OnInPlaceDeactivate"); 4315Debug.WriteLineIf(AxHTraceSwitch.TraceVerbose, "in DiscardUndoState"); 4320Debug.WriteLineIf(AxHTraceSwitch.TraceVerbose, "in DeactivateAndUndo for "+host.ToString()); 4336Debug.WriteLineIf(AxHTraceSwitch.TraceVerbose, "in OnPosRectChange" + lprcPosRect.ToString()); 4341Debug.WriteLineIf(AxHTraceSwitch.TraceVerbose, "Control directly called OnPosRectChange... ignoring the new size"); 4359Debug.WriteLineIf(AxHTraceSwitch.TraceVerbose, "in OnChanged"); 4404Debug.Fail(t.ToString()); 4413Debug.WriteLineIf(AxHTraceSwitch.TraceVerbose, "in OnRequestEdit for "+host.ToString()); 4475Debug.WriteLineIf(AxHTraceSwitch.TraceVerbose, "Failed to QuickActivate: " + t.ToString()); 4496Debug.Fail(t.ToString()); 4622Debug.WriteLineIf(IntSecurity.SecurityDemand.TraceVerbose, "GetParent Demanded"); 4643Debug.WriteLineIf(AxHTraceSwitch.TraceVerbose, "calling upon "+f.ToString()+" to create a container"); 4654Debug.Assert(instance != null, "must have the ocx"); 4668Debug.Assert(instance != null, "must have the ocx"); 4673Debug.Fail("Invalid cast in GetInPlaceActiveObject: " + e.ToString()); 4681Debug.Assert(instance != null, "must have the ocx"); 4689Debug.Assert(instance != null, "must have the ocx"); 4863Debug.Fail("Invalid image type "+ type.ToString(CultureInfo.InvariantCulture)); 4931Debug.WriteLineIf(AxHTraceSwitch.TraceVerbose, "Failed to create IFrom from font: " + font.ToString()); 4955Debug.WriteLineIf(AxHTraceSwitch.TraceVerbose, "Could not create font." + e.Message); 5017Debug.WriteLineIf(AxHTraceSwitch.TraceVerbose, "Could not create font from: " + oleFont.Name + ". " + e.Message); 5151Debug.WriteLineIf(AxHTraceSwitch.TraceVerbose, "in Format"); 5275Debug.WriteLineIf(AxHTraceSwitch.TraceVerbose, "in constructor. Parent created : "+parent.Created.ToString()); 5354Debug.WriteLineIf(AxHTraceSwitch.TraceVerbose, "!parent || !belongs NYI"); 5360Debug.WriteLineIf(AxHTraceSwitch.TraceVerbose, "unable to find proxy, returning null"); 5369Debug.WriteLineIf(AxHTraceSwitch.TraceVerbose, "found proxy "+rval.ToString()); 5464Debug.Fail("onlyNext && onlyPrev are both set!"); 5469Debug.Fail("GC_WCH_FONLYNEXT or FONLYPREV used with CONTANER or CONATINED"); 5478Debug.Fail("Bad GC_WCH"); 5581Debug.Assert(parent.Site == null, "Parent is sited but we could not find IContainer!!!"); 5582Debug.WriteLineIf(AxHTraceSwitch.TraceVerbose, "Did not find a container in FillComponentsTable!!!"); 5657Debug.Assert(rval == null || assocContainer == null || (rval == assocContainer), 5798Debug.Fail("what pathological control is calling inplacedeactivate by itself?"); 5817Debug.WriteLineIf(AxHTraceSwitch.TraceVerbose, " our site owns deactivation "); 5819Debug.Assert(f != null, "a control has to be on a ContainerControl..."); 5848Debug.Assert(siteUIActive == null, "Object did not call OnUIDeactivate"); 5849Debug.WriteLineIf(AxHTraceSwitch.TraceVerbose, "active Object is now "+site.ToString()); 5852Debug.Assert(f != null, "a control has to be on a ContainerControl..."); 5886Debug.WriteLineIf(AxHTraceSwitch.TraceVerbose, "in controlCreated for "+invoker.ToString()+" fAC: "+formAlreadyCreated.ToString()); 5921Debug.WriteLineIf(AxHTraceSwitch.TraceVerbose, "in ParseDisplayName"); 5933Debug.WriteLineIf(AxHTraceSwitch.TraceVerbose, "in EnumObjects"); 5936Debug.Assert(parent != null, "gotta have it..."); 5955Debug.WriteLineIf(AxHTraceSwitch.TraceVerbose, "in LockContainer"); 5962Debug.WriteLineIf(AxHTraceSwitch.TraceVerbose, "in GetWindow"); 5967Debug.WriteLineIf(AxHTraceSwitch.TraceVerbose, "in ContextSensitiveHelp"); 5976Debug.WriteLineIf(AxHTraceSwitch.TraceVerbose, "in GetBorder"); 5985Debug.WriteLineIf(AxHTraceSwitch.TraceVerbose, "in RequestBorderSpace"); 5994Debug.WriteLineIf(AxHTraceSwitch.TraceVerbose, "in SetBorderSpace"); 6002Debug.Assert(ctlInEditMode == null || ctlInEditMode == ctl, "who is exiting edit mode?"); 6012Debug.WriteLineIf(AxHTraceSwitch.TraceVerbose, "in SetActiveObject " + ((pszObjName == null) ? "<null>" : pszObjName)); 6039Debug.Fail(t.ToString()); 6042Debug.Fail("control " + ctlInEditMode.ToString() + " did not reset its edit mode to null"); 6048Debug.WriteLineIf(AxHTraceSwitch.TraceVerbose, "control w/o a valid site called setactiveobject"); 6052Debug.WriteLineIf(AxHTraceSwitch.TraceVerbose, "resolved to " + ctl.ToString()); 6069Debug.WriteLineIf(AxHTraceSwitch.TraceVerbose, "in InsertMenus"); 6078Debug.WriteLineIf(AxHTraceSwitch.TraceVerbose, "in SetMenu"); 6087Debug.WriteLineIf(AxHTraceSwitch.TraceVerbose, "in RemoveMenus"); 6096Debug.WriteLineIf(AxHTraceSwitch.TraceVerbose, "in SetStatusText"); 6105Debug.WriteLineIf(AxHTraceSwitch.TraceVerbose, "in EnableModeless"); 6113Debug.WriteLineIf(AxHTraceSwitch.TraceVerbose, "in IOleInPlaceFrame.TranslateAccelerator"); 6139Debug.WriteLineIf(AxHTraceSwitch.TraceVerbose, "in EnumControls for proxy"); 6145Debug.WriteLineIf(AxHTraceSwitch.TraceVerbose, "in GetOleObject for proxy"); 6158Debug.WriteLineIf(AxHTraceSwitch.TraceVerbose, "in GetObject for proxy"); 6174Debug.WriteLineIf(AxHTraceSwitch.TraceVerbose, "in getAlign for proxy for "+ GetP().ToString()); 6183Debug.WriteLineIf(AxHTraceSwitch.TraceVerbose, "in setAlign for proxy for "+ GetP().ToString()+" "+ 6191Debug.WriteLineIf(AxHTraceSwitch.TraceVerbose, "in getBackColor for proxy for "+ GetP().ToString()); 6196Debug.WriteLineIf(AxHTraceSwitch.TraceVerbose, "in setBackColor for proxy for "+ GetP().ToString()+" "+ 6204Debug.WriteLineIf(AxHTraceSwitch.TraceVerbose, "in getEnabled for proxy for "+ GetP().ToString()); 6209Debug.WriteLineIf(AxHTraceSwitch.TraceVerbose, "in setEnabled for proxy for "+ GetP().ToString()+" "+value.ToString()); 6216Debug.WriteLineIf(AxHTraceSwitch.TraceVerbose, "in getForeColor for proxy for "+ GetP().ToString()); 6221Debug.WriteLineIf(AxHTraceSwitch.TraceVerbose, "in setForeColor for proxy for "+ GetP().ToString()+" "+ 6229Debug.WriteLineIf(AxHTraceSwitch.TraceVerbose, "in getHeight for proxy for "+ GetP().ToString()); 6234Debug.WriteLineIf(AxHTraceSwitch.TraceVerbose, "in setHeight for proxy for "+ GetP().ToString()+" "+ 6242Debug.WriteLineIf(AxHTraceSwitch.TraceVerbose, "in getLeft for proxy for "+ GetP().ToString()); 6247Debug.WriteLineIf(AxHTraceSwitch.TraceVerbose, "in setLeft for proxy for "+ GetP().ToString()+" "+ 6255Debug.WriteLineIf(AxHTraceSwitch.TraceVerbose, "in getParent for proxy for "+ GetP().ToString()); 6262Debug.WriteLineIf(AxHTraceSwitch.TraceVerbose, "in getTabIndex for proxy for "+ GetP().ToString()); 6267Debug.WriteLineIf(AxHTraceSwitch.TraceVerbose, "in setTabIndex for proxy for "+ GetP().ToString()+" "+ 6275Debug.WriteLineIf(AxHTraceSwitch.TraceVerbose, "in getTabStop for proxy for "+ GetP().ToString()); 6280Debug.WriteLineIf(AxHTraceSwitch.TraceVerbose, "in setTabStop for proxy for "+ GetP().ToString()+" "+value.ToString()); 6287Debug.WriteLineIf(AxHTraceSwitch.TraceVerbose, "in getTop for proxy for "+ GetP().ToString()); 6292Debug.WriteLineIf(AxHTraceSwitch.TraceVerbose, "in setTop for proxy for "+ GetP().ToString()+" "+ 6300Debug.WriteLineIf(AxHTraceSwitch.TraceVerbose, "in getVisible for proxy for "+ GetP().ToString()); 6305Debug.WriteLineIf(AxHTraceSwitch.TraceVerbose, "in setVisible for proxy for "+ GetP().ToString()+" "+value.ToString()); 6312Debug.WriteLineIf(AxHTraceSwitch.TraceVerbose, "in getWidth for proxy for "+ GetP().ToString()); 6317Debug.WriteLineIf(AxHTraceSwitch.TraceVerbose, "in setWidth for proxy for "+ GetP().ToString()+" "+ 6325Debug.WriteLineIf(AxHTraceSwitch.TraceVerbose, "in getName for proxy for "+ GetP().ToString()); 6332Debug.WriteLineIf(AxHTraceSwitch.TraceVerbose, "in getHwnd for proxy for "+ GetP().ToString()); 6339Debug.WriteLineIf(AxHTraceSwitch.TraceVerbose, "in getContainer for proxy for "+ GetP().ToString()); 6346Debug.WriteLineIf(AxHTraceSwitch.TraceVerbose, "in getText for proxy for "+ GetP().ToString()); 6351Debug.WriteLineIf(AxHTraceSwitch.TraceVerbose, "in setText for proxy for "+ GetP().ToString()); 6463Debug.WriteLineIf(AxHTraceSwitch.TraceVerbose, "In UnderlyingSystemType"); 6646Debug.Fail("failure: " + e.ToString()); 6651Debug.WriteLineIf(AxHTraceSwitch.TraceVerbose, "Loading up property bag from stream..."); 6660Debug.Fail("failure: " + e.ToString()); 6690Debug.Assert(storage == null, "but we already have a storage!!!"); 6717Debug.Fail(t.ToString()); 6743Debug.Assert(buffer != null, "gotta have the buffer already..."); 6782Debug.Assert(storage != null, "how can we not have a storage object?"); 6783Debug.Assert(iLockBytes != null, "how can we have a storage w/o ILockBytes?"); 6839Debug.Assert(length == 0, "if we have no data, then our length has to be 0"); 6862Debug.WriteLineIf(AxHTraceSwitch.TraceVerbose, "Failed to serialize the property bag into ResX : " + e.ToString()); 6883Debug.WriteLineIf(AxHTraceSwitch.TraceVerbose, "Reading property " + pszPropName + " from OCXState propertybag."); 6889Debug.WriteLineIf(AxHTraceSwitch.TraceVerbose, "\tValue=" + ((pVar == null) ? "<null>" : pVar.ToString())); 6900Debug.WriteLineIf(AxHTraceSwitch.TraceVerbose, "Writing property " + pszPropName + " [" + pVar + "] into OCXState propertybag."); 6902Debug.WriteLineIf(AxHTraceSwitch.TraceVerbose, "\t " + pVar.GetType().FullName + " is not serializable."); 6936Debug.WriteLineIf(AxHTraceSwitch.TraceVerbose, "in AxComponentEditor.EditComponent"); 6941Debug.Fail(t.ToString()); 6989Debug.WriteLineIf(AxPropTraceSwitch.TraceVerbose, "Making property: " + this.Name + " browsable because we found an property page."); 7090Debug.Fail(t.ToString()); 7109Debug.WriteLineIf(AxPropTraceSwitch.TraceVerbose, "Get failed for : " + Name + " with exception: " + e.Message + " .Making property non-browsable."); 7235Debug.Fail("An exception occurred inside IPerPropertyBrowsing::GetPredefinedStrings(dispid=" + 7293Debug.WriteLineIf(AxPropTraceSwitch.TraceVerbose, "Making property: " + this.Name + " browsable because we found an editor."); 7304Debug.WriteLineIf(AxPropTraceSwitch.TraceVerbose, "could not get the type editor for property: " + this.Name + " Exception: " + e); 7432Debug.Assert(cookieItems != null && nameItems != null, "An item array is null"); 7439Debug.Assert(cookieItems.Length == nameItems.Length, "Got uneven names and cookies"); 7446Debug.Fail("Bad IPerPropertyBrowsing item [" + i.ToString(CultureInfo.InvariantCulture) + "], name=" + (nameItems == null ? "(unknown)" : nameItems[i].ToString())); 7467Debug.Fail("Failed to build IPerPropertyBrowsing editor. " + ex.GetType().Name + ", " + ex.Message);
winforms\Managed\System\WinForms\Binding.cs (2)
202Debug.Assert(sender == control, "which other control can send us the Load event?"); 501Debug.Assert(sender == this.bindingManagerBase, "we should only receive notification from our binding manager base");
winforms\Managed\System\WinForms\BindingSource.cs (7)
720Debug.Assert(sender == this.currencyManager, "only receive notifications from the currency manager"); 906Debug.Assert(index >= 0, "BindingSource.ListItem_PropertyChanged - no current item."); 907Debug.Assert(index == ((IList) this).IndexOf(sender), "BindingSource.ListItem_PropertyChanged - unexpected current item."); 1305Debug.Fail("BindingSource.SetList() was called with illegal <null> list argument!"); 1391Debug.Assert(this.currentItemHookedForItemChange == null, "BindingSource trying to hook new current item before unhooking old current item!"); 1528Debug.Assert(dsInit != null, "BindingSource: ISupportInitializeNotification.Initialized event received, but current DataSource does not support ISupportInitializeNotification!"); 1529Debug.Assert(dsInit.IsInitialized, "BindingSource: DataSource sent ISupportInitializeNotification.Initialized event but before it had finished initializing.");
winforms\Managed\System\WinForms\BindToObject.cs (4)
35Debug.Assert(this.dataSource != null, "how can we determine if DataSource is initialized or not if we have no data source?"); 69Debug.Assert(sender == this.dataSource, "data source should not change"); 70Debug.Assert(this.dataSource is ISupportInitializeNotification, "data source should not change on the BindToObject"); 71Debug.Assert(this.waitingOnDataSource);
winforms\Managed\System\WinForms\Button.cs (1)
406Debug.Assert(!GetStyle(ControlStyles.UserPaint), "Shouldn't get BN_CLICKED when UserPaint");
winforms\Managed\System\WinForms\ButtonBase.cs (13)
170Debug.Assert(pd != null); 344Debug.Assert(image == null, "We expect to be returning null."); 821Debug.Assert(Enabled, "ButtonBase.OnMouseEnter should not be called if the button is disabled"); 872Debug.Assert(Enabled, "ButtonBase.OnMouseMove should not be called if the button is disabled"); 901Debug.Assert(Enabled, "ButtonBase.OnMouseDown should not be called if the button is disabled"); 942Debug.Assert(GetStyle(ControlStyles.UserPaint), "Shouldn't be in PaintControl when control is not UserPaint style"); 982Debug.Fail("Unsupported FlatStyle: '" + FlatStyle + '"'); 992Debug.Fail("Derived classes need to provide a meaningful implementation."); 997Debug.Fail("Derived classes need to provide a meaningful implementation."); 1002Debug.Fail("Derived classes need to provide a meaningful implementation."); 1010Debug.Fail("Adapter not expected to be null at this point"); 1018Debug.Fail( "Adapter not expected to be null at this point" ); 1071Debug.Assert(Enabled, "ButtonBase.OnKeyDown should not be called if the button is disabled");
winforms\Managed\System\WinForms\ButtonInternal\ButtonBaseAdapter.cs (3)
991Debug.Fail(SR.GetString(SR.InvalidArgument, "composition", composition.ToString())); 1018Debug.Fail(SR.GetString(SR.InvalidArgument, "composition", composition.ToString())); 1497Debug.Assert(options != null, "must have options");
winforms\Managed\System\WinForms\ButtonInternal\ButtonPopupAdapter.cs (3)
150Debug.Assert(layout.GetPreferredSizeCore(LayoutUtils.MaxSize) 169Debug.Assert(layout.borderSize + layout.paddingSize == 2, 186Debug.Assert(layout.borderSize + layout.paddingSize == 2,
winforms\Managed\System\WinForms\ButtonInternal\ButtonStandardAdapter.cs (1)
225Debug.Assert(layout.GetPreferredSizeCore(LayoutUtils.MaxSize) == PaintLayout(e, /* up = */ true).GetPreferredSizeCore(LayoutUtils.MaxSize),
winforms\Managed\System\WinForms\ButtonInternal\CheckableControlBaseAdapter.cs (1)
61Debug.Fail("Unexpected control type '" + Control.GetType().FullName + "'");
winforms\Managed\System\WinForms\ButtonInternal\CheckBoxBaseAdapter.cs (1)
158Debug.Assert(controlCheckState == CheckState.Indeterminate, "we want to paint the check box only if the item is checked or indeterminate");
winforms\Managed\System\WinForms\ButtonInternal\CheckBoxPopupAdapter.cs (1)
109Debug.Assert(layout.GetPreferredSizeCore(LayoutUtils.MaxSize)
winforms\Managed\System\WinForms\ButtonInternal\RadioButtonBaseAdapter.cs (1)
99Debug.Assert(wg != null,"Calling DrawAndFillEllipse with null wg");
winforms\Managed\System\WinForms\CheckedListBox.cs (1)
1501Debug.Assert(!isChecked || !isIndeterminate, "Can't be both checked and indeterminate. Somebody broke our state.");
winforms\Managed\System\WinForms\Clipboard.cs (3)
46Debug.Assert(formats != null, "Null returned from GetFormats"); 69Debug.Assert(formats != null, "Null returned from GetFormats"); 215Debug.WriteLineIf(IntSecurity.SecurityDemand.TraceVerbose, "ClipboardRead Demanded");
winforms\Managed\System\WinForms\ColumnHeader.cs (1)
517Debug.Assert(false, "We should never set the image list");
winforms\Managed\System\WinForms\ComboBox.cs (18)
737Debug.Assert(IsHandleCreated, "Handle should be created at this point"); 1130Debug.Assert(childEdit != null); 2224Debug.Assert((ModifierKeys & Keys.Alt) == 0); 2237Debug.Assert((ModifierKeys & Keys.Alt) == 0); 2330Debug.Assert(IsHandleCreated, "Shouldn't be calling Native methods before the handle is created."); 2342Debug.Assert(IsHandleCreated, "Shouldn't be calling Native methods before the handle is created."); 2368Debug.Assert(IsHandleCreated, "Shouldn't be calling Native methods before the handle is created."); 2373Debug.Assert(insertIndex == index, "NativeComboBox inserted at " + insertIndex + " not the requested index of " + index); 2381Debug.Assert(IsHandleCreated, "Shouldn't be calling Native methods before the handle is created."); 2434Debug.Assert(childEdit == null, "Child edit window already attached"); 2435Debug.Assert(childListBox == null, "Child listbox window already attached"); 2927Debug.Assert(DisplayMember.Equals(String.Empty), "if this list is sorted it means that dataSource was null when Sorted first became true. at that point DisplayMember had to be String.Empty"); 3210Debug.Assert(DropDownStyle == ComboBoxStyle.DropDownList); 4147Debug.Assert(index>=0 && index <= InnerList.Count, "Wrong index for insert"); 4442Debug.Assert(owner != null && owner.Handle != IntPtr.Zero, "ComboBox's handle hasn't been created"); 5054Debug.WriteLine("Edit parent " + _owner.AccessibilityObject.GetPropertyValue(NativeMethods.UIA_ControlTypePropertyId)); 5764Debug.Assert(!ACWindows.ContainsKey(acHandle)); 5811Debug.Assert(ACWindows.ContainsKey(this.Handle));
winforms\Managed\System\WinForms\Command.cs (3)
54Debug.Assert(cmds.Length > 0, "why is cmds.Length zero?"); 55Debug.Assert(icmdTry >= 0, "why is icmdTry negative?"); 96Debug.Assert(cmd.id >= idMin && cmd.id < idLim, "generated command id out of range");
winforms\Managed\System\WinForms\CommonDialog.cs (1)
299System.Diagnostics.Debug.Assert(IntPtr.Zero == defOwnerWndProc, "The previous subclass wasn't properly cleaned up");
winforms\Managed\System\WinForms\ComponentManagerBroker.cs (3)
200Debug.Assert(NativeMethods.Succeeded(hr), "ICorRuntimeHost failed to return the default domain. The only way that should happen is if it hasn't been started yet, but if it hasn't been started how are we running managed code?"); 204Debug.Assert(NativeMethods.Failed(hr) || domain != null, "ICorRuntimeHost::GetDefaultDomain succeeded but didn't retrn us an app domain."); 483Debug.Assert(_refCount >= 0, "underflow on ref count");
winforms\Managed\System\WinForms\ComponentModel\COM2Interop\BaseCAMarshaler.cs (5)
40Debug.WriteLineIf(CAMarshalSwitch.TraceVerbose, "BaseCAMarshaler: null passed in!"); 46Debug.WriteLineIf(CAMarshalSwitch.TraceVerbose, "Marshaling " + count.ToString(CultureInfo.InvariantCulture) + " items of type " + ItemType.Name); 96Debug.WriteLineIf(CAMarshalSwitch.TraceVerbose, "Marshaling failed: " + ex.GetType().Name + ", " + ex.Message); 128Debug.WriteLineIf(CAMarshalSwitch.TraceVerbose, "Marshaled " + ItemType.Name + " item, value=" + (curItem == null ? "(null)" : curItem.ToString())); 131Debug.WriteLineIf(CAMarshalSwitch.TraceVerbose, "Failed to marshal " + ItemType.Name + " item, exception=" + ex.GetType().Name +", " +ex.Message);
winforms\Managed\System\WinForms\ComponentModel\COM2Interop\COM2AboutBoxPropertyDescriptor.cs (1)
174Debug.Assert(NativeMethods.Succeeded(hr), "Failed to launch about box.");
winforms\Managed\System\WinForms\ComponentModel\COM2Interop\COM2ColorConverter.cs (1)
71Debug.Fail("Don't know how to set type:" + managedValue.GetType().Name);
winforms\Managed\System\WinForms\ComponentModel\COM2Interop\COM2IManagedPerPropertyBrowsingHandler.cs (12)
69Debug.Assert(attrTypeNames.Length == varParams.Length, "Mismatched parameter and attribute name length"); 109Debug.Fail("No dot in class name?"); 122Debug.Fail("Failed load attribute '" + attrName + assemblyName + "'. It's Type could not be found."); 126Debug.Assert(typeof(Attribute).IsAssignableFrom(t), "Attribute type " + t.FullName + " does not derive from Attribute"); 144Debug.Fail("Couldn't load field '" + fieldName + "' from type '" + attrName.Substring(0,lastDot) + "'. It does not exist or is not static"); 150Debug.Assert(typeof(Attribute).IsAssignableFrom(t), "Attribute type " + t.FullName + " does not derive from Attribute"); 173Debug.Fail("Attribute " + t.FullName + " did not have a initalizer specified and has no default constructor"); 187Debug.Fail("Attribute " + t.FullName + " did not have a initalizer specified and has no default constructor"); 214Debug.Fail("Failed to marshal component attribute BSTR " + i.ToString(CultureInfo.InvariantCulture), ex.ToString()); 221Debug.Fail("Failed to free BSTR array memory", ex.ToString()); 247Debug.Fail("Failed to marshal component attribute VARIANT " + i.ToString(CultureInfo.InvariantCulture), ex.ToString()); 254Debug.Fail("Failed to free VARIANT array memory", ex.ToString());
winforms\Managed\System\WinForms\ComponentModel\COM2Interop\COM2IPerPropertyBrowsingHandler.cs (5)
123Debug.Fail("An exception occurred inside IPerPropertyBrowsing::GetPredefinedStrings(dispid=" + sender.DISPID + "), object type=" + new ComNativeDescriptor().GetClassName(ppb) + ". This is caused by an exception (usually an AV) inside the object being browsed, and is not a problem in the properties window."); 269Debug.Assert(cookieItems != null && nameItems != null, "An item array is null"); 278Debug.Assert(cookieItems.Length == nameItems.Length, "Got uneven names and cookies"); 286Debug.Fail("Bad IPerPropertyBrowsing item [" + i.ToString(CultureInfo.InvariantCulture) + "], name=" + (nameItems == null ? "(unknown)" : nameItems[i].ToString())); 332Debug.Fail("Failed to build IPerPropertyBrowsing editor. " + ex.GetType().Name + ", " + ex.Message);
winforms\Managed\System\WinForms\ComponentModel\COM2Interop\COM2IProvidePropertyBuilderHandler.cs (1)
34Debug.Fail("Property Browser doesn't support standard builders -- NYI");
winforms\Managed\System\WinForms\ComponentModel\COM2Interop\COM2IVsPerPropertyBrowsingHandler.cs (6)
125Debug.Assert(sender.TargetObject == null || sender.TargetObject is NativeMethods.IVsPerPropertyBrowsing, "Object is not " + Interface.Name + "!"); 138Debug.Assert(sender.TargetObject == null || sender.TargetObject is NativeMethods.IVsPerPropertyBrowsing, "Object is not " + Interface.Name + "!"); 156Debug.Assert(sender.TargetObject == null || sender.TargetObject is NativeMethods.IVsPerPropertyBrowsing, "Object is not " + Interface.Name + "!"); 200Debug.Assert(sender.TargetObject == null || sender.TargetObject is NativeMethods.IVsPerPropertyBrowsing, "Object is not " + Interface.Name + "!"); 216Debug.Assert(sender.TargetObject == null || sender.TargetObject is NativeMethods.IVsPerPropertyBrowsing, "Object is not " + Interface.Name + "!"); 232Debug.Assert(sender.TargetObject == null || sender.TargetObject is NativeMethods.IVsPerPropertyBrowsing, "Object is not " + Interface.Name + "!");
winforms\Managed\System\WinForms\ComponentModel\COM2Interop\COM2PictureConverter.cs (3)
59Debug.Assert(nativeValue is UnsafeNativeMethods.IPicture, "nativevalue is not IPicture"); 81Debug.Fail("Unknown picture type"); 123Debug.Fail("Unknown Image type: " + managedValue.GetType().Name);
winforms\Managed\System\WinForms\ComponentModel\COM2Interop\COM2Properties.cs (1)
173Debug.Assert(defaultIndex < props.Length, "Whoops! default index is > props.Length");
winforms\Managed\System\WinForms\ComponentModel\COM2Interop\COM2PropertyBuilderUITypeEditor.cs (2)
69Debug.Assert(obj is NativeMethods.IProvidePropertyBuilder, "object is not IProvidePropertyBuilder"); 81Debug.Fail("Failed to show property frame: " + ex.ErrorCode.ToString(CultureInfo.InvariantCulture));
winforms\Managed\System\WinForms\ComponentModel\COM2Interop\COM2PropertyDescriptor.cs (2)
752Debug.Fail("Failed to create TypeConverter of type '" + attr.ConverterTypeName + "' from Attribute", ex.ToString()); 800Debug.Fail("Failed to create edtior of type '" + attr.EditorTypeName + "' from Attribute", ex.ToString());
winforms\Managed\System\WinForms\ComponentModel\COM2Interop\COM2TypeInfoProcessor.cs (28)
134Debug.Assert(temp != null, "IProvideMultipleClassInfo::GetInfoOfIndex returned S_OK for ITypeInfo index " + i + ", this is a issue in the object that's being browsed, NOT the property browser."); 203Debug.WriteLineIf(DbgTypeInfoProcessorSwitch.TraceVerbose, "Com2TypeInfoProcessor.GetProperties"); 206Debug.WriteLineIf(DbgTypeInfoProcessorSwitch.TraceVerbose, "Com2TypeInfoProcessor.GetProperties returning null: Object is not a com Object"); 215Debug.WriteLineIf(DbgTypeInfoProcessorSwitch.TraceVerbose, "Com2TypeInfoProcessor.GetProperties :: Didn't get typeinfo"); 273Debug.WriteLineIf(DbgTypeInfoProcessorSwitch.TraceVerbose, "Com2TypeInfoProcessor.GetProperties : returning " + propList.Count.ToString(CultureInfo.InvariantCulture) + " properties"); 342Debug.Assert(typeDesc.unionMember != IntPtr.Zero, "typeDesc doesn't contain an hreftype!"); 348Debug.Assert(typeDesc.unionMember != IntPtr.Zero, "typeDesc doesn't contain an refTypeDesc!"); 456Debug.Fail("ProcessFunctions failed with hr=" + ex.ErrorCode.ToString(CultureInfo.InvariantCulture) + ", message=" + ex.ToString()); 464Debug.Fail("ProcessVariables failed with hr=" + ex.ErrorCode.ToString(CultureInfo.InvariantCulture) + ", message=" + ex.ToString()); 497Debug.WriteLineIf(DbgTypeInfoProcessorSwitch.TraceVerbose, "IDispatch::Invoke(PROPGET, " + pi.Name + ") threw an exception :" + ex.ToString()); 500Debug.WriteLineIf(DbgTypeInfoProcessorSwitch.TraceVerbose, String.Format(CultureInfo.CurrentCulture, "Adding Browsable(false) to property '" + pi.Name + "' because Invoke(dispid=0x{0:X} ,DISPATCH_PROPERTYGET) returned hr=0x{1:X}. Properties that do not return S_OK are hidden by default.", pi.DispId, hr)); 541Debug.Fail(String.Format(CultureInfo.CurrentCulture, "ITypeInfo::GetDocumentation didn't return a name for DISPID 0x{0:X} but returned SUCEEDED(hr), Component=" + cnd.GetClassName(typeInfo), dispid)); 568Debug.WriteLineIf(DbgTypeInfoProcessorSwitch.TraceVerbose, "Hiding property " + pi.Name + " because value Type could not be resolved: " + ex.ToString()); 648Debug.WriteLineIf(DbgTypeInfoProcessorSwitch.TraceVerbose, String.Format(CultureInfo.CurrentCulture, "ProcessTypeInfoEnum: ignoring function item 0x{0:X} because ITypeInfo::GetFuncDesc returned hr=0x{1:X} or NULL", i, hr)); 679Debug.Assert(funcDesc.lprgelemdescParam != IntPtr.Zero, "ELEMDESC param is null!"); 718Debug.WriteLineIf(DbgTypeInfoProcessorSwitch.TraceVerbose, "ProcessTypeInfoEnum entered"); 721Debug.WriteLineIf(DbgTypeInfoProcessorSwitch.TraceVerbose, "ProcessTypeInfoEnum got a NULL enumTypeInfo"); 737Debug.WriteLineIf(DbgTypeInfoProcessorSwitch.TraceVerbose, "ProcessTypeInfoEnum: failed to get a typeAttr"); 745Debug.WriteLineIf(DbgTypeInfoProcessorSwitch.TraceVerbose, "ProcessTypeInfoEnum: processing " + nItems.ToString(CultureInfo.InvariantCulture) + " variables"); 766Debug.WriteLineIf(DbgTypeInfoProcessorSwitch.TraceVerbose, String.Format(CultureInfo.CurrentCulture, "ProcessTypeInfoEnum: ignoring item 0x{0:X} because ITypeInfo::GetVarDesc returned hr=0x{1:X} or NULL", hr)); 789Debug.WriteLineIf(DbgTypeInfoProcessorSwitch.TraceVerbose, String.Format(CultureInfo.CurrentCulture, "ProcessTypeInfoEnum: ignoring item 0x{0:X} because ITypeInfo::GetDocumentation returned hr=0x{1:X} or NULL", hr)); 793Debug.WriteLineIf(DbgTypeInfoProcessorSwitch.TraceVerbose, "ProcessTypeInfoEnum got name=" + (name == null ? "(null)" : name) + ", helpstring=" + (helpstr == null ? "(null)" : helpstr)); 801Debug.WriteLineIf(DbgTypeInfoProcessorSwitch.TraceVerbose, "ProcessTypeInfoEnum: PtrtoStructFailed " + ex.GetType().Name + "," + ex.Message); 810Debug.WriteLineIf(DbgTypeInfoProcessorSwitch.TraceVerbose, "ProcessTypeInfoEnum: adding variable value=" + Convert.ToString(varValue, CultureInfo.InvariantCulture)); 819Debug.Assert(name != null, "No name for VARDESC member, but GetDocumentation returned S_OK!"); 822Debug.WriteLineIf(DbgTypeInfoProcessorSwitch.TraceVerbose, "ProcessTypeInfoEnum: adding name value=" + nameString); 832Debug.WriteLineIf(DbgTypeInfoProcessorSwitch.TraceVerbose, "ProcessTypeInfoEnum: returning enum with " + strs.Count.ToString(CultureInfo.InvariantCulture) + " items"); 905Debug.WriteLineIf(DbgTypeInfoProcessorSwitch.TraceVerbose, String.Format(CultureInfo.CurrentCulture, "ProcessTypeInfoEnum: ignoring variable item 0x{0:X} because ITypeInfo::GetFuncDesc returned hr=0x{1:X} or NULL", hr));
winforms\Managed\System\WinForms\ComponentModel\COM2Interop\ComNativeDescriptor.cs (1)
432Debug.Fail("Failed to find Com2 properties key on dispose.");
winforms\Managed\System\WinForms\ContainerControl.cs (20)
266Debug.Indent(); 267Debug.WriteLineIf( CompModSwitches.ImeMode.Level >= TraceLevel.Info, "Inside get_CanEnableIme(), value = false" + ", this = " + this ); 268Debug.Unindent(); 354Debug.WriteLineIf(IntSecurity.SecurityDemand.TraceVerbose, "GetParent Demanded"); 382Debug.WriteLineIf(IntSecurity.SecurityDemand.TraceVerbose, "ModifyFocus Demanded"); 393Debug.WriteLineIf(Control.FocusTracing.TraceVerbose, "ContainerControl::ActivateControlInternal(" + (control == null ? "null" : control.Name) + "," + originator.ToString() + ") - " + this.Name); 466Debug.Assert(control != null); 467Debug.WriteLineIf(Control.FocusTracing.TraceVerbose, "ContainerControl::AfterControlRemoved(" + control.Name + ") - " + this.Name); 557Debug.WriteLineIf(Control.FocusTracing.TraceVerbose, "ContainerControl::AssignActiveControlInternal(" + (value == null ? "null" : value.Name) + ") - " + this.Name); 666Debug.WriteLineIf(Control.FocusTracing.TraceVerbose, "ContainerControl::FocusActiveControlInternal() - " + this.Name); 909Debug.Assert(this is Form); 1213Debug.WriteLineIf(ControlKeyboardRouting.TraceVerbose, "ContainerControl.ProcessCmdKey " + msg.ToString()); 1244Debug.Unindent(); 1267Debug.WriteLineIf(ControlKeyboardRouting.TraceVerbose, "Check starting at '" + ((start != null) ? start.ToString() : "<null>") + "'"); 1312Debug.Unindent(); 1375Debug.WriteLineIf(Control.FocusTracing.TraceVerbose, "ContainerControl::SetActiveControl(" + (ctl == null ? "null" : ctl.Name) + ") - " + this.Name); 1384Debug.WriteLineIf(Control.FocusTracing.TraceVerbose, "ContainerControl::SetActiveControlInternal(" + (value == null ? "null" : value.Name) + ") - " + this.Name); 1415Debug.Assert(ccAncestor != null); 1472Debug.WriteLineIf(Control.FocusTracing.TraceVerbose, "ContainerControl::UpdateFocusedControl() - " + this.Name); 1887Debug.WriteLineIf(Control.FocusTracing.TraceVerbose, "ContainerControl::WmSetFocus() - " + this.Name);
winforms\Managed\System\WinForms\Control.cs (284)
617Debug.Fail("Accessible objects for controls must be derived from ControlAccessibleObject."); 623Debug.Assert(accessibleObject != null, "Failed to create accessibility object"); 640Debug.Assert(ncAccessibleObject != null, "Failed to create NON-CLIENT accessibility object"); 1064Debug.Assert(backBrush != IntPtr.Zero, "Failed to create brushHandle"); 1465Debug.WriteLineIf(IntSecurity.SecurityDemand.TraceVerbose, "GetCapture Demanded"); 2074Debug.WriteLineIf(IntSecurity.SecurityDemand.TraceVerbose, "ModifyCursor Demanded"); 2172Debug.Assert(defaultFont != null, "defaultFont wasn't set!"); 3275Debug.Assert(Margin == value, "Error detected while setting Margin."); 3306Debug.Assert(MaximumSize == DefaultMaximumSize, "Error detected while resetting MaximumSize."); 3311Debug.Assert(MaximumSize == value, "Error detected while setting MaximumSize."); 3328Debug.Assert(MinimumSize == value, "Error detected while setting MinimumSize."); 3432Debug.WriteLineIf(IntSecurity.SecurityDemand.TraceVerbose, "GetParent Demanded"); 3568Debug.WriteLineIf(IntSecurity.SecurityDemand.TraceVerbose, "ChangeWindowRegion Demanded"); 4123Debug.WriteLineIf(IntSecurity.SecurityDemand.TraceVerbose, "GetParent Demanded"); 5752Debug.WriteLineIf(IntSecurity.SecurityDemand.TraceVerbose, "CreateGraphicsForControl Demanded"); 5821Debug.Assert((cp.ExStyle & NativeMethods.WS_EX_MDICHILD) == 0, "Can't put MDI child forms on the parking form"); 6209Debug.Assert(this == entry.caller, "Called BeginInvoke on one control, and the corresponding EndInvoke on a different control"); 6223Debug.Assert(asyncResult.IsCompleted, "Why isn't this asyncResult done yet?"); 6237Debug.Assert(IsHandleCreated, "Handle should be created by now"); 6298Debug.Assert(c.IsHandleCreated, "FindMarshalingControl chose a bad control."); 6351Debug.WriteLineIf(Control.FocusTracing.TraceVerbose, "Control::Focus - " + this.Name); 6352Debug.WriteLineIf(IntSecurity.SecurityDemand.TraceVerbose, "ModifyFocus Demanded"); 6368Debug.WriteLineIf(Control.FocusTracing.TraceVerbose, "Control::FocusInternal - " + this.Name); 6399Debug.WriteLineIf(IntSecurity.SecurityDemand.TraceVerbose, "ControlFromHandleOrLocation Demanded"); 6420Debug.WriteLineIf(IntSecurity.SecurityDemand.TraceVerbose, "ControlFromHandleOrLocation Demanded"); 6499Debug.WriteLineIf(IntSecurity.SecurityDemand.TraceVerbose, "ControlFromHandleOrLocation Demanded"); 6522Debug.WriteLineIf(IntSecurity.SecurityDemand.TraceVerbose, "GetParent Demanded"); 6646Debug.Fail("Unknown XButton: " + wparam); 7042Debug.Assert(window != null, "window is null in Control.GetSafeHandle"); 7047Debug.Assert(hWnd == IntPtr.Zero || UnsafeNativeMethods.IsWindow(new HandleRef(null, hWnd))); 7216Debug.Assert(regionHandle != IntPtr.Zero, "Region wasn't null but HRGN is?"); 7456Debug.Assert(tme.args.Length == 1, 7613Debug.WriteLineIf(ControlKeyboardRouting.TraceVerbose, "Control.IsInputChar 0x" + ((int)charCode).ToString("X", CultureInfo.InvariantCulture)); 7642Debug.WriteLineIf(ControlKeyboardRouting.TraceVerbose, "Control.IsInputKey " + keyData.ToString()); 7689Debug.WriteLineIf(ControlKeyboardRouting.TraceVerbose, " ...returning false"); 7704Debug.WriteLineIf(ControlKeyboardRouting.TraceVerbose, " ...& found... char=" + c1.ToString()); 7706Debug.WriteLineIf(ControlKeyboardRouting.TraceVerbose, " ...returning true"); 7710Debug.WriteLineIf(ControlKeyboardRouting.TraceVerbose && pos == 0, " ...no & found"); 7712Debug.WriteLineIf(ControlKeyboardRouting.TraceVerbose, " ...returning false"); 7897Debug.WriteLineIf(Control.FocusTracing.TraceVerbose, "Control::NotifyEnter() - " + this.Name); 7904Debug.WriteLineIf(Control.FocusTracing.TraceVerbose, "Control::NotifyLeave() - " + this.Name); 9862Debug.Fail("Unknown PaintLayer " + layer); 10241Debug.WriteLineIf(ControlKeyboardRouting.TraceVerbose, "Control.PreProcessControlMessageInternal " + msg.ToString()); 10254Debug.WriteLineIf(ControlKeyboardRouting.TraceVerbose, "PreviewKeyDown indicated this is an input key."); 10268Debug.WriteLineIf(ControlKeyboardRouting.TraceVerbose, "Control didn't preprocess this message but it needs to be dispatched"); 10277Debug.WriteLineIf(ControlKeyboardRouting.TraceVerbose, "Control didn't preprocess this message but it needs to be dispatched"); 10324Debug.WriteLineIf(ControlKeyboardRouting.TraceVerbose, "Control.ProcessCmdKey " + msg.ToString()); 10338Debug.Assert(UnsafeNativeMethods.GetObjectType(hDC) == NativeMethods.OBJ_ENHMETADC, 10340Debug.Assert(((long) lParam & NativeMethods.PRF_CHILDREN) != 0, 10350Debug.Assert(success, "GetViewportOrgEx() failed."); 10353Debug.Assert(hClippingRegion.Handle != IntPtr.Zero, "CreateRectRgn() failed."); 10358Debug.Assert((selectResult == NativeMethods.RegionFlags.SIMPLEREGION || 10366Debug.Assert(success, "DeleteObject() failed."); 10380Debug.Assert(success, "GetWindowRect() failed."); 10451Debug.WriteLineIf(ControlKeyboardRouting.TraceVerbose, "Control.ProcessDialogChar [" + charCode.ToString() + "]"); 10482Debug.WriteLineIf(ControlKeyboardRouting.TraceVerbose, "Control.ProcessDialogKey " + keyData.ToString()); 10511Debug.WriteLineIf(ControlKeyboardRouting.TraceVerbose, "Control.ProcessKeyEventArgs " + m.ToString()); 10521Debug.WriteLineIf(CompModSwitches.ImeMode.Level >= TraceLevel.Info, "charsToIgnore decreased, new val = " + charsToIgnore + ", this=" + this); 10657Debug.WriteLineIf(ControlKeyboardRouting.TraceVerbose, " processkeyeventarg returning: " + kpe.Handled); 10662Debug.WriteLineIf(ControlKeyboardRouting.TraceVerbose, " processkeyeventarg returning: " + ke.Handled); 10693Debug.WriteLineIf(ControlKeyboardRouting.TraceVerbose, "Control.ProcessKeyMessage " + m.ToString()); 10728Debug.WriteLineIf(ControlKeyboardRouting.TraceVerbose, "Control.ProcessKeyPreview " + m.ToString()); 11089Debug.WriteLineIf(IntSecurity.SecurityDemand.TraceVerbose, "SendMessages Demanded"); 11169Debug.Assert(layoutSuspendCount > 0, "Unbalanance suspend/resume layout."); 11244Debug.WriteLineIf(CompModSwitches.DragDrop.TraceInfo, "Registering as drop target: " + Handle.ToString()); 11247Debug.WriteLineIf(CompModSwitches.DragDrop.TraceInfo, " ret:" + n.ToString(CultureInfo.CurrentCulture)); 11253Debug.WriteLineIf(CompModSwitches.DragDrop.TraceInfo, "Revoking drop target: " + Handle.ToString()); 11256Debug.WriteLineIf(CompModSwitches.DragDrop.TraceInfo, " ret:" + n.ToString(CultureInfo.InvariantCulture)); 11577Debug.WriteLineIf(CompModSwitches.RichLayout.TraceInfo, GetType().Name + "::ScaleCore(" + dx + ", " + dy + ")"); 11731Debug.Assert(IsHandleCreated, "Performance alert! Calling Control::SendMessage and forcing handle creation. Re-work control so handle creation is not required to set properties. If there is no work around, wrap the call in an IsHandleCreated check."); 11740Debug.Assert(IsHandleCreated, "Performance alert! Calling Control::SendMessage and forcing handle creation. Re-work control so handle creation is not required to set properties. If there is no work around, wrap the call in an IsHandleCreated check."); 11744Debug.Assert(IsHandleCreated, "Performance alert! Calling Control::SendMessage and forcing handle creation. Re-work control so handle creation is not required to set properties. If there is no work around, wrap the call in an IsHandleCreated check."); 11749Debug.Assert(IsHandleCreated, "Performance alert! Calling Control::SendMessage and forcing handle creation. Re-work control so handle creation is not required to set properties. If there is no work around, wrap the call in an IsHandleCreated check."); 11754Debug.Assert(IsHandleCreated, "Performance alert! Calling Control::SendMessage and forcing handle creation. Re-work control so handle creation is not required to set properties. If there is no work around, wrap the call in an IsHandleCreated check."); 11763Debug.Assert(IsHandleCreated, "Performance alert! Calling Control::SendMessage and forcing handle creation. Re-work control so handle creation is not required to set properties. If there is no work around, wrap the call in an IsHandleCreated check."); 11772Debug.Assert(IsHandleCreated, "Performance alert! Calling Control::SendMessage and forcing handle creation. Re-work control so handle creation is not required to set properties. If there is no work around, wrap the call in an IsHandleCreated check."); 11781Debug.Assert(IsHandleCreated, "Performance alert! Calling Control::SendMessage and forcing handle creation. Re-work control so handle creation is not required to set properties. If there is no work around, wrap the call in an IsHandleCreated check."); 11968Debug.Assert(value != NativeMethods.InvalidIntPtr, "Outdated call to SetParentHandle"); 11974Debug.Assert(Handle != value, "Cycle created in SetParentHandle"); 12050Debug.WriteLineIf(Control.PaletteTracing.TraceVerbose, "SetUpPalette(force:=" + force + ", ralizePalette:=" + realizePalette + ")"); 12054Debug.WriteLineIf(Control.PaletteTracing.TraceVerbose, "select palette " + !force); 12075Debug.WriteLineIf(IntSecurity.SecurityDemand.TraceVerbose, "TopLevelWindow Demanded"); 12079Debug.WriteLineIf(IntSecurity.SecurityDemand.TraceVerbose, "UnrestrictedWindows Demanded"); 12535Debug.Assert(!IsHandleCreated, "Don't call this method when handle is created!!"); 12884Debug.Fail("contextmenu and contextmenustrip are both null... hmm how did we get here?"); 13030Debug.WriteLineIf(CompModSwitches.MSAA.TraceInfo, "In WmGetObject, this = " + this.GetType().FullName + ", lParam = " + m.LParam.ToString()); 13095Debug.WriteLineIf(CompModSwitches.MSAA.TraceInfo, "AccessibilityObject returned null"); 13111Debug.WriteLineIf(CompModSwitches.MSAA.TraceInfo, "LresultFromObject returned " + m.Result.ToString()); 13187Debug.Assert(m.LParam != IntPtr.Zero, "m.lparam is null"); 13193Debug.Assert(menuItem != null, "UniqueID is not associated with a menu item"); 13337Debug.WriteLineIf(Control.FocusTracing.TraceVerbose, "Control::WmKillFocus - " + this.Name); 13794Debug.WriteLineIf(Control.PaletteTracing.TraceVerbose, Handle + ": WM_QUERYNEWPALETTE"); 13886Debug.WriteLineIf(Control.FocusTracing.TraceVerbose, "Control::WmSetFocus - " + this.Name); 14186Debug.WriteLineIf(ControlKeyboardRouting.TraceVerbose, "Control.WndProc processing " + m.ToString()); 14189Debug.WriteLineIf(ControlKeyboardRouting.TraceVerbose, "Control.WndProc ToolStripManager.ProcessMenuKey returned true" + m.ToString()); 14510Debug.Assert(sizeProperty != null && locationProperty != null, "Error retrieving Size/Location properties on Control."); 15036Debug.Assert(owner != null); 15095Debug.Assert(control != null, "Why are we returning null controls from a valid index?"); 15275Debug.WriteLineIf(CompModSwitches.ActiveX.TraceInfo, "AxSource:GetControlInfo"); 15303Debug.WriteLineIf(CompModSwitches.ActiveX.TraceInfo, "AxSource:OnMnemonic processed: " + processed.ToString()); 15312Debug.WriteLineIf(CompModSwitches.ActiveX.TraceInfo, "AxSource:OnAmbientPropertyChange. Dispid: " + dispID); 15313Debug.Indent(); 15315Debug.Unindent(); 15324Debug.WriteLineIf(CompModSwitches.ActiveX.TraceInfo, "AxSource:FreezeEvents. Freeze: " + bFreeze); 15326Debug.Assert(ActiveXInstance.EventsFrozen == (bFreeze != 0), "Failed to set EventsFrozen correctly"); 15359Debug.WriteLineIf(CompModSwitches.ActiveX.TraceInfo, "AxSource:OnFrameWindowActivate"); 15369Debug.WriteLineIf(CompModSwitches.ActiveX.TraceInfo, "AxSource:OnDocWindowActivate. Activate: " + fActivate.ToString(CultureInfo.InvariantCulture)); 15370Debug.Indent(); 15372Debug.Unindent(); 15380Debug.WriteLineIf(CompModSwitches.ActiveX.TraceInfo, "AxSource:ResizesBorder"); 15389Debug.WriteLineIf(CompModSwitches.ActiveX.TraceInfo, "AxSource:EnableModeless"); 15398Debug.WriteLineIf(CompModSwitches.ActiveX.TraceInfo, "AxSource:GetWindow"); 15400Debug.WriteLineIf(CompModSwitches.ActiveX.TraceInfo, "\twin == " + hwnd); 15409Debug.WriteLineIf(CompModSwitches.ActiveX.TraceInfo, "AxSource:ContextSensitiveHelp. Mode: " + fEnterMode.ToString(CultureInfo.InvariantCulture)); 15420Debug.WriteLineIf(CompModSwitches.ActiveX.TraceInfo, "AxSource:InPlaceDeactivate"); 15421Debug.Indent(); 15423Debug.Unindent(); 15431Debug.WriteLineIf(CompModSwitches.ActiveX.TraceInfo, "AxSource:UIDeactivate"); 15440Debug.WriteLineIf(CompModSwitches.ActiveX.TraceInfo, "AxSource:SetObjectRects(" + lprcClipRect.left + ", " + lprcClipRect.top + ", " + lprcClipRect.right + ", " + lprcClipRect.bottom + ")"); 15441Debug.Indent(); 15443Debug.Unindent(); 15451Debug.WriteLineIf(CompModSwitches.ActiveX.TraceInfo, "AxSource:ReactivateAndUndo"); 15460Debug.WriteLineIf(CompModSwitches.ActiveX.TraceInfo, "AxSource:SetClientSite"); 15470Debug.WriteLineIf(CompModSwitches.ActiveX.TraceInfo, "AxSource:GetClientSite"); 15479Debug.WriteLineIf(CompModSwitches.ActiveX.TraceInfo, "AxSource:SetHostNames"); 15490Debug.WriteLineIf(CompModSwitches.ActiveX.TraceInfo, "AxSource:Close. Save option: " + dwSaveOption); 15500Debug.WriteLineIf(CompModSwitches.ActiveX.TraceInfo, "AxSource:SetMoniker"); 15509Debug.WriteLineIf(CompModSwitches.ActiveX.TraceInfo, "AxSource:GetMoniker"); 15519Debug.WriteLineIf(CompModSwitches.ActiveX.TraceInfo, "AxSource:InitFromData"); 15528Debug.WriteLineIf(CompModSwitches.ActiveX.TraceInfo, "AxSource:GetClipboardData"); 15556Debug.Indent(); 15561Debug.Fail("Exception occurred during DoVerb(" + iVerb + ") " + e.ToString()); 15565Debug.Unindent(); 15566Debug.WriteLineIf(CompModSwitches.ActiveX.TraceInfo, "}"); 15576Debug.WriteLineIf(CompModSwitches.ActiveX.TraceInfo, "AxSource:EnumVerbs"); 15585Debug.WriteLineIf(CompModSwitches.ActiveX.TraceInfo, "AxSource:OleUpdate"); 15594Debug.WriteLineIf(CompModSwitches.ActiveX.TraceInfo, "AxSource:IsUpToDate"); 15604Debug.WriteLineIf(CompModSwitches.ActiveX.TraceInfo, "AxSource:GetUserClassID. ClassID: " + pClsid.ToString()); 15613Debug.WriteLineIf(CompModSwitches.ActiveX.TraceInfo, "AxSource:GetUserType"); 15628Debug.WriteLineIf(CompModSwitches.ActiveX.TraceInfo, "AxSource:SetExtent(" + pSizel.cx + ", " + pSizel.cy + ")"); 15629Debug.Indent(); 15631Debug.Unindent(); 15640Debug.WriteLineIf(CompModSwitches.ActiveX.TraceInfo, "AxSource:GetExtent. Aspect: " + dwDrawAspect.ToString(CultureInfo.InvariantCulture)); 15641Debug.Indent(); 15643Debug.WriteLineIf(CompModSwitches.ActiveX.TraceInfo, "value: " + pSizel.cx + ", " + pSizel.cy); 15644Debug.Unindent(); 15653Debug.WriteLineIf(CompModSwitches.ActiveX.TraceInfo, "AxSource:Advise"); 15663Debug.WriteLineIf(CompModSwitches.ActiveX.TraceInfo, "AxSource:Unadvise"); 15664Debug.Indent(); 15666Debug.Unindent(); 15675Debug.WriteLineIf(CompModSwitches.ActiveX.TraceInfo, "AxSource:EnumAdvise"); 15696Debug.WriteLineIf(CompModSwitches.ActiveX.TraceInfo, "AxSource:GetMiscStatus. Status: " + status.ToString(CultureInfo.InvariantCulture)); 15700Debug.WriteLineIf(CompModSwitches.ActiveX.TraceInfo, "AxSource:GetMiscStatus. Status: ERROR, wrong aspect."); 15712Debug.WriteLineIf(CompModSwitches.ActiveX.TraceInfo, "AxSource:SetColorScheme"); 15738Debug.WriteLineIf(CompModSwitches.ActiveX.TraceInfo, "AxSource:IPersist.GetClassID. ClassID: " + pClassID.ToString()); 15746Debug.WriteLineIf(CompModSwitches.ActiveX.TraceInfo, "AxSource:IPersistPropertyBag.InitNew"); 15755Debug.WriteLineIf(CompModSwitches.ActiveX.TraceInfo, "AxSource:IPersistPropertyBag.GetClassID. ClassID: " + pClassID.ToString()); 15763Debug.WriteLineIf(CompModSwitches.ActiveX.TraceInfo, "AxSource:Load (IPersistPropertyBag)"); 15764Debug.Indent(); 15766Debug.Unindent(); 15774Debug.WriteLineIf(CompModSwitches.ActiveX.TraceInfo, "AxSource:Save (IPersistPropertyBag)"); 15775Debug.Indent(); 15777Debug.Unindent(); 15786Debug.WriteLineIf(CompModSwitches.ActiveX.TraceInfo, "AxSource:IPersistStorage.GetClassID. ClassID: " + pClassID.ToString()); 15794Debug.WriteLineIf(CompModSwitches.ActiveX.TraceInfo, "AxSource:IPersistStorage.IsDirty"); 15803Debug.WriteLineIf(CompModSwitches.ActiveX.TraceInfo, "AxSource:IPersistStorage.InitNew"); 15811Debug.WriteLineIf(CompModSwitches.ActiveX.TraceInfo, "AxSource:IPersistStorage.Load"); 15812Debug.Indent(); 15814Debug.Unindent(); 15823Debug.WriteLineIf(CompModSwitches.ActiveX.TraceInfo, "AxSource:IPersistStorage.Save"); 15824Debug.Indent(); 15826Debug.Unindent(); 15834Debug.WriteLineIf(CompModSwitches.ActiveX.TraceInfo, "AxSource:IPersistStorage.SaveCompleted"); 15842Debug.WriteLineIf(CompModSwitches.ActiveX.TraceInfo, "AxSource:IPersistStorage.HandsOffStorage"); 15851Debug.WriteLineIf(CompModSwitches.ActiveX.TraceInfo, "AxSource:IPersistStreamInit.GetClassID. ClassID: " + pClassID.ToString()); 15859Debug.WriteLineIf(CompModSwitches.ActiveX.TraceInfo, "AxSource:IPersistStreamInit.IsDirty"); 15868Debug.WriteLineIf(CompModSwitches.ActiveX.TraceInfo, "AxSource:IPersistStreamInit.Load"); 15869Debug.Indent(); 15871Debug.Unindent(); 15879Debug.WriteLineIf(CompModSwitches.ActiveX.TraceInfo, "AxSource:IPersistStreamInit.Save"); 15880Debug.Indent(); 15882Debug.Unindent(); 15890Debug.WriteLineIf(CompModSwitches.ActiveX.TraceInfo, "AxSource:GetSizeMax"); 15898Debug.WriteLineIf(CompModSwitches.ActiveX.TraceInfo, "AxSource:IPersistStreamInit.InitNew"); 15906Debug.WriteLineIf(CompModSwitches.ActiveX.TraceInfo, "AxSource:QuickActivate"); 15907Debug.Indent(); 15909Debug.Unindent(); 15917Debug.WriteLineIf(CompModSwitches.ActiveX.TraceInfo, "AxSource:SetContentExtent"); 15918Debug.Indent(); 15920Debug.Unindent(); 15928Debug.WriteLineIf(CompModSwitches.ActiveX.TraceInfo, "AxSource:GetContentExtent"); 15929Debug.Indent(); 15931Debug.Unindent(); 15941Debug.WriteLineIf(CompModSwitches.ActiveX.TraceInfo, "AxSource:Draw"); 15944Debug.Indent(); 15954Debug.Unindent(); 15966Debug.WriteLineIf(CompModSwitches.ActiveX.TraceInfo, "AxSource:GetColorSet"); 15978Debug.WriteLineIf(CompModSwitches.ActiveX.TraceInfo, "AxSource:Freezes"); 15987Debug.WriteLineIf(CompModSwitches.ActiveX.TraceInfo, "AxSource:Unfreeze"); 15996Debug.WriteLineIf(CompModSwitches.ActiveX.TraceInfo, "AxSource:SetAdvise"); 16005Debug.WriteLineIf(CompModSwitches.ActiveX.TraceInfo, "AxSource:GetAdvise"); 16016Debug.WriteLineIf(CompModSwitches.ActiveX.TraceInfo, "AxSource:Draw"); 16017Debug.Indent(); 16020Debug.Unindent(); 16030Debug.WriteLineIf(CompModSwitches.ActiveX.TraceInfo, "AxSource:GetColorSet"); 16042Debug.WriteLineIf(CompModSwitches.ActiveX.TraceInfo, "AxSource:Freezes"); 16051Debug.WriteLineIf(CompModSwitches.ActiveX.TraceInfo, "AxSource:Unfreeze"); 16060Debug.WriteLineIf(CompModSwitches.ActiveX.TraceInfo, "AxSource:SetAdvise"); 16069Debug.WriteLineIf(CompModSwitches.ActiveX.TraceInfo, "AxSource:GetAdvise"); 16078Debug.WriteLineIf(CompModSwitches.ActiveX.TraceInfo, "AxSource:GetExtent (IViewObject2)"); 16335Debug.WriteLineIf(CompModSwitches.ActiveX.TraceInfo, "Object color type=" + obj.GetType().FullName); 16339Debug.Fail("Failed to massage ambient back color to a Color", e.ToString()); 16372Debug.WriteLineIf(CompModSwitches.ActiveX.TraceInfo, "Object font type=" + obj.GetType().FullName); 16373Debug.Assert(obj != null, "GetAmbientProperty failed"); 16417Debug.WriteLineIf(CompModSwitches.ActiveX.TraceInfo, "Object color type=" + obj.GetType().FullName); 16421Debug.Fail("Failed to massage ambient fore color to a Color", e.ToString()); 16474Debug.Fail("Do not reference IsIE property unless control is sited."); 16486Debug.WriteLineIf(CompModSwitches.ActiveX.TraceVerbose, "AxSource:IsIE running under IE"); 16552Debug.WriteLineIf(CompModSwitches.ActiveX.TraceVerbose, "AxSource:ActiveXImpl:DoVerb(" + iVerb + ")"); 16558Debug.WriteLineIf(CompModSwitches.ActiveX.TraceVerbose, "DoVerb:Show, InPlaceActivate, UIActivate"); 16610Debug.WriteLineIf(CompModSwitches.ActiveX.TraceVerbose, "DoVerb:Hide"); 16636Debug.WriteLineIf(CompModSwitches.ActiveX.TraceVerbose, "DoVerb:Other"); 16820Debug.WriteLineIf(CompModSwitches.ActiveX.TraceInfo, "AxSource:GetAmbientProperty"); 16821Debug.Indent(); 16824Debug.WriteLineIf(CompModSwitches.ActiveX.TraceInfo, "clientSite implements IDispatch"); 16841Debug.WriteLineIf(CompModSwitches.ActiveX.TraceInfo, "IDispatch::Invoke succeeded. VT=" + pvt[0].GetType().FullName); 16843Debug.Unindent(); 16847Debug.WriteLineIf(CompModSwitches.ActiveX.TraceInfo, "IDispatch::Invoke failed. HR: 0x" + String.Format(CultureInfo.CurrentCulture, "{0:X}", hr)); 16851Debug.Unindent(); 16886Debug.Indent(); 16893Debug.WriteLineIf(CompModSwitches.ActiveX.TraceInfo, "Mnemonic: " + ch.ToString()); 16926Debug.Unindent(); 17046Debug.WriteLineIf(CompModSwitches.ActiveX.TraceVerbose, "\tActiveXImpl:InPlaceActivate --> inplaceactive"); 17066Debug.WriteLineIf(CompModSwitches.ActiveX.TraceVerbose, "\tActiveXImpl:InPlaceActivate --> inplacevisible"); 17116Debug.Assert(activeXState[inPlaceVisible], "Failed to set inplacevisible"); 17122Debug.WriteLineIf(CompModSwitches.ActiveX.TraceVerbose, "\tActiveXImpl:InPlaceActivate --> not becoming UIActive"); 17129Debug.WriteLineIf(CompModSwitches.ActiveX.TraceVerbose, "\tActiveXImpl:InPlaceActivate --> uiactive"); 17142Debug.Assert(inPlaceFrame != null, "Setting us to visible should have created the in place frame"); 17165Debug.WriteLineIf(CompModSwitches.ActiveX.TraceVerbose, "\tActiveXImpl:InPlaceActivate --> already uiactive"); 17312Debug.WriteLineIf(CompModSwitches.ActiveX.TraceInfo, "Loading property " + props[i].Name); 17327Debug.Indent(); 17328Debug.WriteLineIf(CompModSwitches.ActiveX.TraceInfo, "Property was in bag"); 17335Debug.Fail("Expected property " + props[i].Name + " to be stored in IPropertyBag as a string. Attempting to coerce"); 17342Debug.WriteLineIf(CompModSwitches.ActiveX.TraceInfo, "It's a resource property"); 17353Debug.WriteLineIf(CompModSwitches.ActiveX.TraceInfo, "It's a standard property"); 17360Debug.Assert(converter != null, "No type converter for property '" + props[i].Name + "' on class " + control.GetType().FullName); 17376Debug.WriteLineIf(CompModSwitches.ActiveX.TraceInfo, "Converter returned " + value); 17390Debug.WriteLineIf(CompModSwitches.ActiveX.TraceInfo, "Exception converting property: " + errorString); 17399Debug.Unindent(); 17403Debug.Fail("Unexpected failure reading property", ex.ToString()); 17425Debug.Fail("No ambient property for dispid " + dispid.ToString(CultureInfo.InvariantCulture)); 17505Debug.Fail("There is no property change notification for: " + propName + " on Control."); 17583Debug.WriteLineIf(CompModSwitches.ActiveX.TraceInfo, "AXSource: SetFocus: " + focus.ToString()); 17995Debug.Assert(stream != null, "Stream should be non-null, or an exception should have been thrown."); 18032Debug.WriteLineIf(CompModSwitches.ActiveX.TraceInfo, "Saving property " + props[i].Name); 18054Debug.Assert(converter != null, "No type converter for property '" + props[i].Name + "' on class " + control.GetType().FullName); 18088Debug.Assert(s != null, "NULL in our advise list"); 18150Debug.Assert(method != null, "No Shutdown method on SystemEvents"); 18225Debug.Assert(method != null, "No Startup method on SystemEvents"); 18253Debug.WriteLineIf(CompModSwitches.ActiveX.TraceInfo, "SetExtent : new size:" + size.ToString()); 18266Debug.WriteLineIf(CompModSwitches.ActiveX.TraceInfo, "SetExtent : Announcing to in place site that our rect has changed."); 18267Debug.WriteLineIf(CompModSwitches.ActiveX.TraceInfo, " Announcing rect = " + bounds); 18268Debug.Assert(clientSite != null, "How can we setextent before we are sited??"); 18280Debug.WriteLineIf(CompModSwitches.ActiveX.TraceInfo, "SetExtent : Control has changed size. Setting dirty bit"); 18293Debug.WriteLineIf(CompModSwitches.ActiveX.TraceInfo, "SetExtent : Requesting new Object layout."); 18346Debug.WriteLineIf(CompModSwitches.ActiveX.TraceInfo, "Set control bounds: " + posRect.ToString()); 18359Debug.WriteLineIf(CompModSwitches.ActiveX.TraceInfo, "Old Control Bounds: " + control.Bounds); 18409Debug.WriteLineIf(CompModSwitches.ActiveX.TraceInfo, "Old Intersect: " + new Rectangle(rcIntersect.left, rcIntersect.top, rcIntersect.right-rcIntersect.left, rcIntersect.bottom-rcIntersect.top)); 18410Debug.WriteLineIf(CompModSwitches.ActiveX.TraceInfo, "New Control Bounds: " + posRect); 18414Debug.WriteLineIf(CompModSwitches.ActiveX.TraceInfo, "New Intersect: " + new Rectangle(rcIntersect.left, rcIntersect.top, rcIntersect.right-rcIntersect.left, rcIntersect.bottom-rcIntersect.top)); 18421Debug.WriteLineIf(CompModSwitches.ActiveX.TraceInfo, "Created clipping region"); 18553Debug.WriteLineIf(CompModSwitches.ActiveX.TraceInfo, "AxSource: Control did not process accelerator, handing to site"); 18595Debug.Assert(inPlaceFrame != null, "No inplace frame -- how dod we go UI active?"); 19035Debug.Fail("Caller of IEnumOLEVERB requested celt > 1, but clr marshalling does not support this."); 19238Debug.Assert(UnsafeNativeMethods.GetObjectType(hOriginalDC) == NativeMethods.OBJ_ENHMETADC, 19270Debug.Assert(success, "DICopy() failed."); 19273Debug.Assert(success, "DeleteObject() failed."); 19275Debug.Assert(success, "DeleteObject() failed."); 19423Debug.Assert(ownerControl != null, "Cannot construct a ControlAccessibleObject with a null ownerControl"); 19452Debug.Assert(ownerControl != null, "Cannot construct a ControlAccessibleObject with a null ownerControl"); 19870Debug.WriteLineIf(CompModSwitches.MSAA.TraceInfo, "Control.NotifyClients: this = " + 19882Debug.WriteLineIf(CompModSwitches.MSAA.TraceInfo, "Control.NotifyClients: this = " + 19896Debug.WriteLineIf(CompModSwitches.MSAA.TraceInfo, "Control.NotifyClients: this = " + 19997Debug.Assert(handle != IntPtr.Zero, "FontHandleWrapper disposed, but still being accessed");
winforms\Managed\System\WinForms\Control.Ime.cs (141)
96Debug.WriteLineIf( CompModSwitches.ImeMode.Level >= TraceLevel.Info, "Inside get_CachedImeMode(), this = " + this ); 97Debug.Indent(); 105Debug.WriteLineIf( CompModSwitches.ImeMode.Level >= TraceLevel.Verbose, "using DefaultImeMode == " + cachedImeMode ); 108Debug.WriteLineIf( CompModSwitches.ImeMode.Level >= TraceLevel.Verbose, "using property store ImeMode == " + cachedImeMode ); 117Debug.WriteLineIf( CompModSwitches.ImeMode.Level >= TraceLevel.Verbose, "inherited from parent = " + parent.GetType() ); 124Debug.WriteLineIf( CompModSwitches.ImeMode.Level >= TraceLevel.Verbose, "returning CachedImeMode == " + cachedImeMode ); 125Debug.Unindent(); 135Debug.WriteLineIf( CompModSwitches.ImeMode.Level >= TraceLevel.Info, "Inside set_CachedImeMode(), this = " + this ); 136Debug.Indent(); 138Debug.WriteLineIf( CompModSwitches.ImeMode.Level >= TraceLevel.Warning, "Setting cached Ime == " + value ); 141Debug.Unindent(); 154Debug.Indent(); 155Debug.WriteLineIf( CompModSwitches.ImeMode.Level >= TraceLevel.Info, string.Format(CultureInfo.CurrentCulture, "Inside get_CanEnableIme(), value = {0}, this = {1}", ImeSupported, this ) ); 156Debug.Unindent(); 167Debug.WriteLineIf( CompModSwitches.ImeMode.Level >= TraceLevel.Info, "Inside get_CurrentImeContextMode(), this = " + this ); 191Debug.WriteLineIf( CompModSwitches.ImeMode.Level >= TraceLevel.Info, "Inside get_DisableImeModeChangedCount()" ); 192Debug.Indent(); 197Debug.Assert( val >= 0, "Counter underflow." ); 198Debug.WriteLineIf( CompModSwitches.ImeMode.Level >= TraceLevel.Info, "Value: " + val ); 199Debug.Unindent(); 204Debug.WriteLineIf( CompModSwitches.ImeMode.Level >= TraceLevel.Info, "Inside set_DisableImeModeChangedCount(): " + value ); 215Debug.WriteLineIf(CompModSwitches.ImeMode.Level >= TraceLevel.Info, "Inside get_IgnoreWmImeNotify()"); 216Debug.Indent(); 220Debug.WriteLineIf(CompModSwitches.ImeMode.Level >= TraceLevel.Info, "Value: " + val); 221Debug.Unindent(); 226Debug.WriteLineIf(CompModSwitches.ImeMode.Level >= TraceLevel.Info, "Inside set_IgnoreWmImeNotify(): " + value); 264Debug.WriteLineIf( CompModSwitches.ImeMode.Level >= TraceLevel.Info, "Inside get_ImeModeBase(), this = " + this ); 265Debug.Indent(); 269Debug.WriteLineIf( CompModSwitches.ImeMode.Level >= TraceLevel.Info, "Value = " + imeMode ); 270Debug.Unindent(); 275Debug.WriteLineIf( CompModSwitches.ImeMode.Level >= TraceLevel.Info, string.Format( CultureInfo.CurrentCulture, "Inside set_ImeModeBase({0}), this = {1}", value, this ) ); 276Debug.Indent(); 316Debug.Unindent(); 357Debug.WriteLineIf( CompModSwitches.ImeMode.Level >= TraceLevel.Info, string.Format( CultureInfo.CurrentCulture, "Inside set_ImeWmCharToIgnore(value={0}), this = {1}", value, this ) ); 358Debug.Indent(); 366Debug.WriteLineIf( CompModSwitches.ImeMode.Level >= TraceLevel.Verbose, "ImeWmCharsToIgnore on leaving setter: " + ImeWmCharsToIgnore ); 367Debug.Unindent(); 378Debug.WriteLineIf( CompModSwitches.ImeMode.Level >= TraceLevel.Info, "Inside get_LastCanEnableIme()" ); 379Debug.Indent(); 391Debug.WriteLineIf( CompModSwitches.ImeMode.Level >= TraceLevel.Info, "Value: " + valueFound ); 392Debug.Unindent(); 397Debug.WriteLineIf( CompModSwitches.ImeMode.Level >= TraceLevel.Info, "Inside set_LastCanEnableIme(): " + value ); 409Debug.WriteLineIf( CompModSwitches.ImeMode.Level >= TraceLevel.Info, "Inside get_PropagatingImeMode()" ); 410Debug.Indent(); 415Debug.WriteLineIf( CompModSwitches.ImeMode.Level >= TraceLevel.Verbose, "Initializing PropagatingImeMode" ); 438Debug.WriteLineIf( CompModSwitches.ImeMode.Level >= TraceLevel.Verbose, "Value: " + Control.propagatingImeMode ); 439Debug.Unindent(); 444Debug.WriteLineIf( CompModSwitches.ImeMode.Level >= TraceLevel.Info, "Inside set_PropagatingImeMode()" ); 445Debug.Indent(); 452Debug.WriteLineIf(CompModSwitches.ImeMode.Level >= TraceLevel.Verbose, "Cannot change PropagatingImeMode to " + value); 456Debug.WriteLineIf( CompModSwitches.ImeMode.Level >= TraceLevel.Warning, string.Format( CultureInfo.CurrentCulture, "Setting PropagatingImeMode: Current value = {0}, New value = {1}", propagatingImeMode, value ) ); 462Debug.Unindent(); 476Debug.WriteLineIf( CompModSwitches.ImeMode.Level >= TraceLevel.Info, "Inside UpdateImeContextMode(), this = " + this ); 477Debug.Indent(); 532Debug.Unindent(); 541Debug.WriteLineIf( CompModSwitches.ImeMode.Level >= TraceLevel.Info, string.Format( CultureInfo.CurrentCulture, "Inside VerifyImeModeChanged(oldMode={0}, newMode={1}), this = {2}", oldMode, newMode, this ) ); 542Debug.Indent(); 548Debug.Unindent(); 557Debug.Assert( ImeSupported, "This method should not be called from controls that don't support IME input." ); 559Debug.WriteLineIf( CompModSwitches.ImeMode.Level >= TraceLevel.Info, "Inside VerifyImeRestrictedModeChanged(), this = " + this ); 560Debug.Indent(); 593Debug.Unindent(); 602Debug.WriteLineIf( CompModSwitches.ImeMode.Level >= TraceLevel.Info, "Inside OnImeContextStatusChanged(), this = " + this ); 603Debug.Indent(); 605Debug.Assert( ImeSupported, "WARNING: Attempting to update ImeMode properties on IME-Unaware control!" ); 606Debug.Assert( !DesignMode, "Shouldn't be updating cached ime mode at design-time" ); 626Debug.Unindent(); 635Debug.Assert( ImeSupported, "ImeModeChanged should not be raised on an Ime-Unaware control." ); 636Debug.WriteLineIf( CompModSwitches.ImeMode.Level >= TraceLevel.Info, "Inside OnImeModeChanged(), this = " + this ); 646Debug.WriteLineIf( CompModSwitches.ImeMode.Level >= TraceLevel.Info, "Inside ResetImeMode(), this = " + this ); 668Debug.WriteLineIf( CompModSwitches.ImeMode.Level >= TraceLevel.Info, "Inside WmInputLangChange(), this = " + this ); 669Debug.Indent(); 687Debug.WriteLineIf( CompModSwitches.ImeMode.Level >= TraceLevel.Info, "Culture=" + e.Culture ); 694Debug.Unindent(); 703Debug.WriteLineIf( CompModSwitches.ImeMode.Level >= TraceLevel.Info, "Inside WmInputLangChangeRequest(), this=" + this ); 704Debug.Indent(); 710Debug.WriteLineIf( CompModSwitches.ImeMode.Level >= TraceLevel.Info, "Culture=" + e.Culture ); 721Debug.Unindent(); 738Debug.WriteLineIf( CompModSwitches.ImeMode.Level >= TraceLevel.Info, "Inside WmImeEndComposition() - Disabling ImeWmCharToIgnore, this=" + this ); 785Debug.WriteLineIf( CompModSwitches.ImeMode.Level >= TraceLevel.Info, string.Format( CultureInfo.CurrentCulture, "Inside WmImeNotify(m.wparam=[{0}]), this={1}", m.WParam, this ) ); 786Debug.Indent(); 791Debug.Unindent(); 803Debug.WriteLineIf(CompModSwitches.ImeMode.Level >= TraceLevel.Info, "Inside WmImeSetFocus(), this=" + this); 804Debug.Indent(); 811Debug.Unindent(); 819Debug.WriteLineIf( CompModSwitches.ImeMode.Level >= TraceLevel.Info, "Inside WmImeStartComposition() - Enabling ImeWmCharToIgnore, this=" + this ); 831Debug.WriteLineIf(CompModSwitches.ImeMode.Level >= TraceLevel.Info, "Inside WmImeKillFocus(), this=" + this); 832Debug.Indent(); 841Debug.WriteLineIf(CompModSwitches.ImeMode.Level >= TraceLevel.Info, "Unfocused TopMostParent = " + topMostWinformsParent); 856Debug.WriteLineIf(CompModSwitches.ImeMode.Level >= TraceLevel.Verbose, "Setting IME context to PropagatingImeMode (leaving Microsoft container). this = " + this); 859Debug.WriteLineIf(CompModSwitches.ImeMode.Level >= TraceLevel.Verbose, "Resetting PropagatingImeMode. this = " + this); 869Debug.Unindent(); 889Debug.WriteLineIf( CompModSwitches.ImeMode.Level >= TraceLevel.Info, "Inside ImeContext.Disable(" + handle + ")" ); 890Debug.Indent(); 901Debug.WriteLineIf( CompModSwitches.ImeMode.Level >= TraceLevel.Verbose, "ImmAssociateContext(" + handle + ", null)" ); 909Debug.Unindent(); 916Debug.WriteLineIf( CompModSwitches.ImeMode.Level >= TraceLevel.Info, "Inside ImeContext.Enable(" + handle + ")" ); 917Debug.Indent(); 920Debug.WriteLineIf( CompModSwitches.ImeMode.Level >= TraceLevel.Verbose, "ImmGetContext(" + handle + ")" ); 922Debug.WriteLineIf( CompModSwitches.ImeMode.Level >= TraceLevel.Verbose, "context = " + inputContext ); 927Debug.WriteLineIf( CompModSwitches.ImeMode.Level >= TraceLevel.Verbose, "ImmCreateContext()" ); 930Debug.WriteLineIf( CompModSwitches.ImeMode.Level >= TraceLevel.Verbose, "ImmAssociateContext(" + handle + ", " + inputContext + ")" ); 935Debug.WriteLineIf( CompModSwitches.ImeMode.Level >= TraceLevel.Verbose, "ImmAssociateContext()" ); 940Debug.WriteLineIf( CompModSwitches.ImeMode.Level >= TraceLevel.Verbose, "ImmReleaseContext(" + handle + ", " + inputContext + ")" ); 951Debug.Unindent(); 958Debug.WriteLineIf( CompModSwitches.ImeMode.Level >= TraceLevel.Info, "Insise ImeContext.GetImeMode(" + handle + ")" ); 959Debug.Indent(); 973Debug.WriteLineIf( CompModSwitches.ImeMode.Level >= TraceLevel.Verbose, "ImmGetContext(" + handle + ")" ); 975Debug.WriteLineIf( CompModSwitches.ImeMode.Level >= TraceLevel.Verbose, "context = " + inputContext ); 995Debug.WriteLineIf( CompModSwitches.ImeMode.Level >= TraceLevel.Verbose, "ImmGetConversionStatus(" + inputContext + ", conversion, sentence)" ); 998Debug.Assert( countryTable != null, "countryTable is null" ); 1022Debug.WriteLineIf( CompModSwitches.ImeMode.Level >= TraceLevel.Verbose, "ImmReleaseContext(" + handle + ", " + inputContext + ")" ); 1028Debug.Unindent(); 1109Debug.WriteLineIf( CompModSwitches.ImeMode.Level >= TraceLevel.Info, "Inside ImeContext.IsOpen(" + handle + ")" ); 1110Debug.Indent(); 1112Debug.WriteLineIf( CompModSwitches.ImeMode.Level >= TraceLevel.Verbose, "ImmGetContext(" + handle + ")" ); 1114Debug.WriteLineIf( CompModSwitches.ImeMode.Level >= TraceLevel.Verbose, "context = " + inputContext ); 1119Debug.WriteLineIf( CompModSwitches.ImeMode.Level >= TraceLevel.Verbose, "ImmGetOpenStatus(" + inputContext + ")" ); 1121Debug.WriteLineIf( CompModSwitches.ImeMode.Level >= TraceLevel.Verbose, "ImmReleaseContext(" + handle + ", " + inputContext + ")" ); 1125Debug.WriteLineIf( CompModSwitches.ImeMode.Level >= TraceLevel.Verbose, " IsOpen = " + retval ); 1126Debug.Unindent(); 1135Debug.WriteLineIf( CompModSwitches.ImeMode.Level >= TraceLevel.Info, string.Format( CultureInfo.CurrentCulture, "Inside ImeContext.SetImeStatus(ImeMode=[{0}, handle=[{1}])", imeMode, handle ) ); 1136Debug.Indent(); 1138Debug.Assert( imeMode != ImeMode.Inherit, "ImeMode.Inherit is an invalid argument to ImeContext.SetImeStatus" ); 1153Debug.WriteLineIf( CompModSwitches.ImeMode.Level >= TraceLevel.Warning, "\tSetting IME context to " + imeMode ); 1203Debug.WriteLineIf( CompModSwitches.ImeMode.Level >= TraceLevel.Verbose, "ImmGetContext(" + handle + ")" ); 1205Debug.WriteLineIf( CompModSwitches.ImeMode.Level >= TraceLevel.Verbose, "context = " + inputContext ); 1206Debug.WriteLineIf( CompModSwitches.ImeMode.Level >= TraceLevel.Verbose, "ImmGetConversionStatus(" + inputContext + ", conversion, sentence)" ); 1212Debug.WriteLineIf( CompModSwitches.ImeMode.Level >= TraceLevel.Verbose, "ImmSetConversionStatus(" + inputContext + ", conversion, sentence)" ); 1214Debug.WriteLineIf( CompModSwitches.ImeMode.Level >= TraceLevel.Verbose, "ImmReleaseContext(" + handle + ", " + inputContext + ")" ); 1222Debug.Unindent(); 1229Debug.WriteLineIf( CompModSwitches.ImeMode.Level >= TraceLevel.Info, string.Format( CultureInfo.CurrentCulture, "Inside SetOpenStatus(open=[{0}], handle=[{1}])", open, handle ) ); 1230Debug.Indent(); 1233Debug.WriteLineIf( CompModSwitches.ImeMode.Level >= TraceLevel.Verbose, "ImmGetContext(" + handle + ")" ); 1235Debug.WriteLineIf( CompModSwitches.ImeMode.Level >= TraceLevel.Verbose, "context = " + inputContext ); 1238Debug.WriteLineIf( CompModSwitches.ImeMode.Level >= TraceLevel.Verbose, "ImmSetOpenStatus(" + inputContext + ", " + open + ")" ); 1240Debug.Assert( succeeded, "Could not set the IME open status." ); 1243Debug.WriteLineIf( CompModSwitches.ImeMode.Level >= TraceLevel.Verbose, "ImmReleaseContext(" + handle + ", " + inputContext + ")" ); 1245Debug.Assert( succeeded, "Could not release IME context." ); 1251Debug.Unindent(); 1366Debug.WriteLineIf(CompModSwitches.ImeMode.Level >= TraceLevel.Info, "Inside get_InputLanguageTable(), Input Language = " + InputLanguage.CurrentInputLanguage.Culture.DisplayName + ", Thread = " + System.Threading.Thread.CurrentThread.ManagedThreadId);
winforms\Managed\System\WinForms\ControlBindingsCollection.cs (1)
33Debug.Assert(control != null, "How could a controlbindingscollection not have a control associated with it!");
winforms\Managed\System\WinForms\ControlPaint.cs (7)
271Debug.Assert(data.Scan0 != IntPtr.Zero, "BitmapData.Scan0 is null; check marshalling"); 387Debug.Fail("border style has no corresponding dash style"); 442Debug.Fail("Unsupported border style."); 552Debug.Fail("Unknown border style"); 1022Debug.Assert(style == ButtonBorderStyle.Outset, "Caller should have known how to use us."); 2569Debug.Assert(replaceBlack.A == 255, "replaceBlack.Alpha is ignored, so please set it to 255 so I know you know what you're doing"); 2570Debug.Assert(replaceWhite.A == 255, "replaceWhite.Alpha is ignored, so please set it to 255 so I know you know what you're doing");
winforms\Managed\System\WinForms\CurrencyManager.cs (10)
597Debug.Assert(lastGoodKnownRow == -1 || lastGoodKnownRow == listposition, "if we have a valid lastGoodKnownRow, then it should equal the position in the list"); 656Debug.WriteLineIf(CompModSwitches.DataCursor.TraceVerbose, "System.ComponentModel.ListChangedType.Reset Position: " + Position + " Count: " + list.Count); 665Debug.WriteLineIf(CompModSwitches.DataCursor.TraceVerbose, "System.ComponentModel.ListChangedType.ItemAdded " + dbe.NewIndex.ToString(CultureInfo.InvariantCulture)); 699Debug.WriteLineIf(CompModSwitches.DataCursor.TraceVerbose, "System.ComponentModel.ListChangedType.ItemDeleted " + dbe.NewIndex.ToString(CultureInfo.InvariantCulture)); 722Debug.WriteLineIf(CompModSwitches.DataCursor.TraceVerbose, "System.ComponentModel.ListChangedType.ItemChanged " + dbe.NewIndex.ToString(CultureInfo.InvariantCulture)); 731Debug.WriteLineIf(CompModSwitches.DataCursor.TraceVerbose, "System.ComponentModel.ListChangedType.ItemMoved " + dbe.NewIndex.ToString(CultureInfo.InvariantCulture)); 767Debug.Assert(lastGoodKnownRow == -1 || listposition == lastGoodKnownRow, "how did they get out of sync?"); 788Debug.WriteLineIf(CompModSwitches.DataView.TraceVerbose, "OnCurrentChanged() " + e.ToString()); 843Debug.WriteLineIf(CompModSwitches.DataView.TraceVerbose, "OnItemChanged(" + e.Index.ToString(CultureInfo.InvariantCulture) + ") " + e.ToString()); 874Debug.WriteLineIf(CompModSwitches.DataView.TraceVerbose, "OnPositionChanged(" + listposition.ToString(CultureInfo.InvariantCulture) + ") " + e.ToString());
winforms\Managed\System\WinForms\Cursor.cs (9)
90Debug.Assert(stream != null, "couldn't get stream for resource " + resource); 171Debug.WriteLineIf(IntSecurity.SecurityDemand.TraceVerbose, "AdjustCursorClip Demanded"); 213Debug.WriteLineIf(IntSecurity.SecurityDemand.TraceVerbose, "ModifyCursor Demanded"); 505Debug.Fail("Cursor.Draw does not support raster ops. How did you even pass one in?"); 552Debug.Fail("Why are we trying to serialize an empty cursor?"); 565Debug.WriteLineIf(IntSecurity.SecurityDemand.TraceVerbose, "AdjustCursorClip Demanded"); 584Debug.Fail(e.ToString()); 659Debug.Fail(e.ToString()); 682Debug.Fail(e.ToString());
winforms\Managed\System\WinForms\CursorConverter.cs (1)
171Debug.Assert(prop.GetValue(null, tempIndex) != null, "Property " + prop.Name + " returned NULL");
winforms\Managed\System\WinForms\DataGrid.cs (102)
1047Debug.Assert(localGridRowsLength == DataGridRowsLength + 1, "this is the only change that could have happened"); 1057Debug.Assert(this.DataGridRows[currentRow] is DataGridAddNewRow, "the last row is the DataGridAddNewRow"); 1059Debug.Assert(ListManager.Position == currentRow || listManager.Position == -1, "the listManager should be positioned at the last row"); 1082Debug.Assert(currentRow == ListManager.Position || listManager.Position == -1, "the position in the list manager (" + ListManager.Position + ") is out of sync with the currentRow (" + currentRow + ")" + " and the exception is '" + errorMessage + "'"); 1099Debug.Assert(result == DialogResult.No, "we only put cancel and ok on the error message box"); 1132Debug.Assert(currentRow == ListManager.Position || listManager.Position == -1, "the position in the list manager is out of sync with the currentRow"); 1420Debug.WriteLineIf(CompModSwitches.DataGridCursor.TraceVerbose, "DataGridCursor: There are now " + DataGridRowsLength.ToString(CultureInfo.InvariantCulture) + " rows."); 1466Debug.WriteLineIf(CompModSwitches.DataGridCursor.TraceVerbose, "DataGridCursor: DataSource being set to " + ((value == null) ? "null" : value.ToString())); 1511Debug.WriteLineIf(CompModSwitches.DataGridCursor.TraceVerbose, "DataGridCursor: DataSource being set to " + ((value == null) ? "null" : value.ToString())); 1573Debug.Assert(this.Controls.Contains(this.toBeDisposedEditingControl)); 1616Debug.Assert(this.toBeDisposedEditingControl == null, "we should have removed the toBeDisposedEditingControl already"); 1872Debug.Assert(this.GridLineStyle == DataGridLineStyle.Solid || this.GridLineStyle == DataGridLineStyle.None, "are there any other styles?"); 3092Debug.WriteLineIf(CompModSwitches.DataGridCursor.TraceVerbose, "DataGridCursor: WireDataSource"); 3093Debug.Assert(listManager!= null, "Can't wire up to a null DataSource"); 3101Debug.WriteLineIf(CompModSwitches.DataGridCursor.TraceVerbose, "DataGridCursor: UnWireDataSource"); 3102Debug.Assert(listManager != null, "Can't un wire from a null DataSource"); 3113Debug.WriteLineIf(CompModSwitches.DataGridCursor.TraceVerbose, "DataGridCursor: DataSource_Changed"); 3122Debug.Assert(policy.AllowAdd, "how can we add a new row if the policy does not allow this?"); 3123Debug.Assert(DataGridRowsLength == DataGridRows.Length, "how can this fail?"); 3214Debug.WriteLineIf(CompModSwitches.DataGridCursor.TraceVerbose, "DataGridCursor: DataSource_RowChanged"); 3234Debug.WriteLineIf(CompModSwitches.DataGridCursor.TraceVerbose, "DataGridCursor: DataSource_PositionChanged to " + listManager.Position.ToString(CultureInfo.InvariantCulture)); 3240Debug.Assert(!gridState[GRIDSTATE_inAddNewRow] && !gridState[GRIDSTATE_inListAddNew], "how can the list decrease when we are adding a row?"); 3283Debug.Assert(this.myGridTable.IsDefault, "if the table is not default, then it had a name. how can one add another table to the collection w/ the same name and not throw an exception"); 3290Debug.Assert(this.myGridTable.IsDefault, "if the table is not default, then it had a name. how can one add another table to the collection w/ the same name and not throw an exception"); 3296Debug.Assert(ccea.Action == CollectionChangeAction.Refresh, "what else is possible?"); 3316Debug.WriteLineIf(CompModSwitches.DataGridCursor.TraceVerbose, "DataGridCursor: DataSource_ItemChanged at index " + ea.Index.ToString(CultureInfo.InvariantCulture)); 3571Debug.Fail("Horizontal Scrollbar should be disabled without a DataSource."); 3654Debug.Fail("Vertical Scrollbar should be disabled without a DataSource."); 3690Debug.Assert(currentRow == ListManager.Position || listManager.Position == -1, "the position in the list manager (" + ListManager.Position + ") is out of sync with the currentRow (" + currentRow + ")" + " and the exception is '" + errorMessage + "'"); 3700Debug.Assert(result == DialogResult.No, "we only put cancel and ok on the error message box"); 3814Debug.Assert(!parentRows.IsEmpty(), "if the originalState is not null, then parentRows contains at least one row"); 3866Debug.WriteLineIf(CompModSwitches.DataGridLayout.TraceVerbose, "DataGridLayout: OnLayout"); 3986Debug.WriteLineIf(CompModSwitches.DataGridKeys.TraceVerbose, "DataGridKeys: OnKeyDown "); 3996Debug.WriteLineIf(CompModSwitches.DataGridKeys.TraceVerbose, "DataGridKeys: OnKeyPress " + TypeDescriptor.GetConverter(typeof(Keys)).ConvertToString(kpe.KeyChar)); 4383Debug.WriteLineIf(CompModSwitches.DataGridLayout.TraceVerbose, "DataGridLayout: OnMouseWheel move="+move.ToString(CultureInfo.InvariantCulture)); 4417Debug.WriteLineIf(CompModSwitches.DataGridParents.TraceVerbose, "DataGridParents: Painting ParentRows " + layout.ParentRows.ToString()); 4466Debug.WriteLineIf(CompModSwitches.DataGridLayout.TraceVerbose, "DataGridLayout: OnResize"); 4531Debug.Assert(originalState != null, "how can we get a list changed event from another listmanager/list while not navigating"); 4554Debug.WriteLineIf(CompModSwitches.DataGridEditing.TraceVerbose, "DataGridEditing: \t! AbortEdit"); 4555Debug.Assert(gridState[GRIDSTATE_isEditing], "Can't abort an edit that is not happening!"); 4718Debug.WriteLineIf(CompModSwitches.DataGridCursor.TraceVerbose, "DataGridCursor: Requesting CancelEdit()"); 4754Debug.WriteLineIf(CompModSwitches.DataGridLayout.TraceVerbose, "DataGridLayout: ColAutoResize"); 4884Debug.WriteLineIf(CompModSwitches.DataGridLayout.TraceVerbose, "DataGridLayout: ColResizeBegin"); 4885Debug.Assert(myGridTable != null, "Column resizing operations can't be called when myGridTable == null."); 4920Debug.WriteLineIf(CompModSwitches.DataGridLayout.TraceVerbose, "DataGridLayout: ColResizeEnd"); 4921Debug.Assert(myGridTable != null, "Column resizing operations can't be called when myGridTable == null."); 5044Debug.WriteLineIf(CompModSwitches.DataGridLayout.TraceVerbose, "DataGridLayout: RowAutoResize"); 5095Debug.WriteLineIf(CompModSwitches.DataGridLayout.TraceVerbose, "DataGridLayout: RowResizeBegin"); 5096Debug.Assert(myGridTable != null, "Row resizing operations can't be called when myGridTable == null."); 5126Debug.WriteLineIf(CompModSwitches.DataGridLayout.TraceVerbose, "DataGridLayout: RowResizeEnd"); 5127Debug.Assert(myGridTable != null, "Row resizing operations can't be called when myGridTable == null."); 5205Debug.WriteLineIf(CompModSwitches.DataGridEditing.TraceVerbose, "DataGridEditing: \t CommitEdit " + (editRow == null ? "" : editRow.RowNumber.ToString(CultureInfo.InvariantCulture))); 5324Debug.WriteLineIf(CompModSwitches.DataGridLayout.TraceVerbose, "DataGridLayout: ComputeLayout"); 5465Debug.WriteLineIf(CompModSwitches.DataGridLayout.TraceVerbose, "DataGridLayout: " + layout.ToString()); 5507Debug.WriteLineIf(CompModSwitches.DataGridLayout.TraceVerbose, "DataGridLayout: ComputeVisibleColumns"); 5558Debug.Assert(numVisibleCols < visibleColumns, "the number of visible columns can only grow"); 5621Debug.Assert(cx <= horizontalOffset, "look at the for loop before: we only exit that loop early if the cx is over the horizontal offset"); 5636Debug.WriteLineIf(CompModSwitches.DataGridLayout.TraceVerbose, "DataGridLayout: ComputeVisibleRows"); 5680Debug.Assert(numVisibleRows >= 0, "the number of visible rows can't be negative"); 5681Debug.Assert(numTotallyVisibleRows >= 0, "the number of totally visible rows can't be negative"); 5731Debug.WriteLineIf(CompModSwitches.DataGridLayout.TraceVerbose, "DataGridLayout: CreateInitialLayoutState"); 5894Debug.WriteLineIf(CompModSwitches.DataGridEditing.TraceVerbose, "DataGridEditing: Edit, currentRow = " + currentRow.ToString(CultureInfo.InvariantCulture) + 5964Debug.WriteLineIf(CompModSwitches.DataGridEditing.TraceVerbose, "DataGridEditing: EndEdit requested on a column we are not editing."); 5967Debug.WriteLineIf(CompModSwitches.DataGridEditing.TraceVerbose, "DataGridEditing: EndEdit requested on a row we are not editing."); 5985Debug.WriteLineIf(CompModSwitches.DataGridEditing.TraceVerbose, "DataGridEditing: EndEdit"); 6008Debug.Assert(value != null, "we should not have a null dataSource when we want to check for a valid dataMember"); 6030Debug.Assert( currentRow >= firstVisibleRow && currentRow <= firstVisibleRow + numVisibleRows, "how can one edit a row which is invisible?"); 6196Debug.Assert(x >= inside.X && x < inside.Right, "x must be inside the horizontal bounds of layout.Data"); 6222Debug.Assert(myGridTable != null, "GetColBeg can't be called when myGridTable == null."); 6244Debug.Assert(myGridTable.GridColumnStyles[col].PropertyDescriptor != null, "why would we need the coordinate of a column that is not visible?"); 6285Debug.Assert(y >= inside.Y && y < inside.Bottom, "y must be inside the vertical bounds of the data"); 6383Debug.Assert(this.negOffset == 0, " no columns are displayed so the negative offset should be 0"); 6594Debug.Assert(gridColumns[column].PropertyDescriptor != null, "how can we invalidate a column that is invisible?"); 6643Debug.WriteLineIf(CompModSwitches.DataGridPainting.TraceVerbose, "DataGridPainting: Invalidating row " + rowNumber.ToString(CultureInfo.InvariantCulture)); 6668Debug.WriteLineIf(CompModSwitches.DataGridPainting.TraceVerbose, "DataGridPainting: Invalidating a rect in row " + rowNumber.ToString(CultureInfo.InvariantCulture)); 7080Debug.Assert(row >= firstVisibleRow && row < firstVisibleRow + numVisibleRows, 7321Debug.WriteLineIf(CompModSwitches.DataGridPainting.TraceVerbose, "DataGridPainting: PaintGrid on " + gridBounds.ToString()); 7383Debug.Assert(selectedEntries == deletedRows, "all the rows that would have been deleted should have been selected: selectedGridEntries " + selectedEntries.ToString(CultureInfo.InvariantCulture) + " deletedRows " + deletedRows.ToString(CultureInfo.InvariantCulture)); 7473Debug.WriteLineIf(CompModSwitches.DataGridKeys.TraceVerbose, "DataGridKeys: ProcessDialogKey " + TypeDescriptor.GetConverter(typeof(Keys)).ConvertToString(keyData)); 7476Debug.WriteLineIf(CompModSwitches.DataGridKeys.TraceVerbose, "DataGridKeys: Current Row ate the keystroke"); 7585Debug.Assert(i == DataGridRowsLength - 1, "the location of addNewRow is " + i.ToString(CultureInfo.InvariantCulture) + " and there are " + DataGridRowsLength.ToString(CultureInfo.InvariantCulture) + " rows "); 7658Debug.WriteLineIf(CompModSwitches.DataGridKeys.TraceVerbose, "DataGridKeys: ProcessGridKey "+ TypeDescriptor.GetConverter(typeof(Keys)).ConvertToString(ke.KeyCode)); 7729Debug.Assert(ListManager.Position == CurrentCell.RowNumber || listManager.Count == 0, "current row out of ssync with DataSource"); 7762Debug.Assert(ListManager.Position == CurrentCell.RowNumber || listManager.Count == 0, "current row out of ssync with DataSource"); 7770Debug.Assert(ListManager.Position == CurrentCell.RowNumber || listManager.Count == 0, "current row out of ssync with DataSource"); 7776Debug.Assert(ListManager.Position == CurrentCell.RowNumber || listManager.Count == 0, "current row out of ssync with DataSource"); 7807Debug.Assert(ListManager.Position == CurrentCell.RowNumber || listManager.Count == 0, "current row out of ssync with DataSource"); 7846Debug.Assert(ListManager.Position == CurrentCell.RowNumber || listManager.Count == 0, "current row out of ssync with DataSource"); 7859Debug.Assert(ListManager.Position == CurrentCell.RowNumber || listManager.Count == 0, "current row out of ssync with DataSource"); 7989Debug.Assert(newCol != -1, "there should be at least a visible column, right?"); 8071Debug.Assert(ListManager.Position == CurrentCell.RowNumber || listManager.Count == 0, "current row out of ssync with DataSource"); 8074Debug.Assert(ListManager.Position == CurrentCell.RowNumber || listManager.Count == 0, "current row out of ssync with DataSource"); 8126Debug.Assert(ListManager.Position == CurrentCell.RowNumber || listManager.Count == 0, "current row out of ssync with DataSource"); 8129Debug.Assert(ListManager.Position == CurrentCell.RowNumber || listManager.Count == 0, "current row out of ssync with DataSource"); 8448Debug.Assert(nextCol < cols.Count, "we already checked that we are not at the lastColumnMarkedVisible"); 8468Debug.Assert(prevCol != -1, "we already checked that we are not at the first columnMarked visible"); 8643Debug.WriteLineIf(CompModSwitches.DataGridScrolling.TraceVerbose, "DataGridScrolling: ScrollRight, columns = " + columns.ToString(CultureInfo.InvariantCulture)); 8699Debug.WriteLineIf(CompModSwitches.DataGridSelection.TraceVerbose, "Selecting row " + row.ToString(CultureInfo.InvariantCulture)); 8897Debug.WriteLineIf(CompModSwitches.DataGridParents.TraceVerbose, "DataGridParents: Making parent rows invisible."); 9002Debug.WriteLineIf(CompModSwitches.DataGridSelection.TraceVerbose, "DataGridSelection: Unselecting row " + row.ToString(CultureInfo.InvariantCulture)); 9014Debug.WriteLineIf(CompModSwitches.DataGridCursor.TraceVerbose, "DataGridCursor: Requesting EndEdit()"); 9119Debug.Assert(dataGrid.dataGridRows[index].RowNumber == index, "Row number is wrong!");
winforms\Managed\System\WinForms\DataGridCaption.cs (7)
391Debug.Fail("Failed to load bitmap: " + bitmapName, e.ToString()); 493Debug.WriteLineIf(CompModSwitches.DGCaptionPaint.TraceVerbose, "text size = " + textSize.ToString()); 494Debug.WriteLineIf(CompModSwitches.DGCaptionPaint.TraceVerbose, "downButtonWidth = " + downButtonWidth.ToString(CultureInfo.InvariantCulture)); 495Debug.WriteLineIf(CompModSwitches.DGCaptionPaint.TraceVerbose, "textWidthLeft = " + textWidthLeft.ToString(CultureInfo.InvariantCulture)); 496Debug.WriteLineIf(CompModSwitches.DGCaptionPaint.TraceVerbose, "backButtonRect " + backButtonRect.ToString()); 497Debug.WriteLineIf(CompModSwitches.DGCaptionPaint.TraceVerbose, "textRect " + textRect.ToString()); 498Debug.WriteLineIf(CompModSwitches.DGCaptionPaint.TraceVerbose, "downButtonRect " + downButtonRect.ToString());
winforms\Managed\System\WinForms\DataGridColumn.cs (2)
1195Debug.Assert(owner != null, "DataGridColumnHeaderAccessibleObject must have a valid owner DataGridColumn"); 1230Debug.Assert(offset >= 0, "this column must be in a collection, otherwise its bounds are useless");
winforms\Managed\System\WinForms\DataGridColumnCollection.cs (1)
321Debug.Assert(this.isDefault, "we should be calling this function only for default tables");
winforms\Managed\System\WinForms\DataGridParentRows.cs (8)
255Debug.Assert(GetTopParent() != null, "we should have a parent at least"); 355Debug.Assert(parentsCount == rowHeights.Count + 1 || rowHeights.Count == 0, "see bug 82808 for more info, or the comment above"); 375Debug.Assert(parentsCount == rowHeights.Count - 1, "we do layout only for push/popTop"); 435Debug.Assert(layout.leftArrow.IsEmpty, "we can't have the leftArrow w/o the rightArrow"); 647Debug.Assert(colsNameWidths.Length == colsDataWidths.Length, "both arrays are as long as the largest column count in dgs"); 748Debug.Fail("Failed to load bitmap: " + bitmapName, e.ToString()); 1018Debug.Assert(containedRect.X >= surroundingRect.X && containedRect.Right <= surroundingRect.Right, "containedRect is not contained in surroundingRect"); 1056Debug.Assert(owner != null, "DataGridParentRowsAccessibleObject must have a valid owner");
winforms\Managed\System\WinForms\DataGridRelationshipRow.cs (11)
150Debug.Assert(this.dgTable.DataGrid.AllowNavigation, "how can the user collapse the relations if the grid does not allow navigation?"); 165Debug.Assert(this.dgTable.DataGrid.AllowNavigation, "how can the user expand the relations if the grid does not allow navigation?"); 228Debug.Assert(this.expanded, "we should need this rectangle only when the row is expanded"); 454Debug.Assert((keyData & Keys.Control) != Keys.Control, "the DataGridRelationshipRow only handles TAB and TAB-SHIFT"); 455Debug.Assert((keyData & Keys.Alt) != Keys.Alt, "the DataGridRelationshipRow only handles TAB and TAB-SHIFT"); 527if (CompModSwitches.DGRelationShpRowPaint.TraceVerbose) Debug.WriteLine("Painting row " + RowNumber.ToString(CultureInfo.InvariantCulture) + " with bounds " + bounds.ToString()); 609if (!alignToRight) Debug.Assert(bounds.X == rowHeaderBoundsX, "what's up doc?"); 621if (!alignToRight) Debug.Assert(rowHeaderBounds.Right == expandoBoxX, "what's up doc?"); 748if (CompModSwitches.DGRelationShpRowPaint.TraceVerbose) Debug.WriteLine("PlusMinusGlyph painting in bounds -> " + bounds.ToString()); 757if (CompModSwitches.DGRelationShpRowPaint.TraceVerbose) Debug.WriteLine("Painting PlusMinusGlyph with outline -> " + outline.ToString()); 897Debug.Assert(owner != null, "DataGridRelationshipAccessibleObject must have a valid owner DataGridRow");
winforms\Managed\System\WinForms\DataGridRow.cs (10)
224Debug.Fail("Failed to load bitmap: " + bitmapName, e.ToString()); 478Debug.WriteLineIf(CompModSwitches.DGRowPaint.TraceVerbose, "Painting DataGridAddNewRow: bounds = " + bounds.ToString()); 724Debug.Assert(owner != null, "DataGridRowAccessibleObject must have a valid owner DataGridRow"); 727Debug.WriteLineIf(DataGrid.DataGridAcc.TraceVerbose, "Create row accessible object"); 742Debug.WriteLineIf(DataGrid.DataGridAcc.TraceVerbose, "Create row's accessible children"); 743Debug.Indent(); 746Debug.WriteLineIf(DataGrid.DataGridAcc.TraceVerbose, len + " columns present"); 750Debug.Unindent(); 911Debug.Assert(owner != null, "DataGridColumnAccessibleObject must have a valid owner DataGridRow"); 914Debug.WriteLineIf(DataGrid.DataGridAcc.TraceVerbose, "Create cell accessible object");
winforms\Managed\System\WinForms\DataGridState.cs (1)
157Debug.Assert(owner != null, "DataGridRowAccessibleObject must have a valid owner DataGridRow");
winforms\Managed\System\WinForms\DataGridTable.cs (8)
523Debug.Assert(this.GridLineStyle == DataGridLineStyle.Solid || this.GridLineStyle == DataGridLineStyle.None, "are there any other styles?"); 909Debug.WriteLineIf(CompModSwitches.DGRelationShpRowLayout.TraceVerbose, "GetRelationshipRect grinding away"); 1386Debug.Assert(listManager != null, "the DataGridTabel cannot use a null listManager"); 1394Debug.Assert(!this.IsDefault, "the grid can set the relations only on a table that was manually added by the user"); 1400Debug.Assert(prop != null, "prop is null: how that happened?"); 1418Debug.Assert(propCollection != null, "propCollection is null: how that happened?"); 1422Debug.Assert(prop != null, "prop is null: how that happened?"); 1683Debug.Assert(e.Action == CollectionChangeAction.Refresh, "there are only Add, Remove and Refresh in the CollectionChangeAction");
winforms\Managed\System\WinForms\DataGridTextBoxColumn.cs (3)
258Debug.WriteLineIf(CompModSwitches.DGEditColumnEditing.TraceVerbose, "DGEditColumnEditing: " + s); 300Debug.Assert(!edit.Focused, "the edit control just conceeded focus to the dataGrid"); 622Debug.Assert(!edit.IsInEditOrNavigateMode, "Must be editing to rollback changes...");
winforms\Managed\System\WinForms\DataGridToolTip.cs (3)
29Debug.Assert(dataGrid!= null, "can't attach a tool tip to a null grid"); 59Debug.Assert(tipWindow != null && tipWindow.Handle != IntPtr.Zero, "the tipWindow was not initialized, bailing out"); 88Debug.Assert(tipWindow != null, "how can one destroy a null window");
winforms\Managed\System\WinForms\DataGridView.cs (43)
1477Debug.WriteLineIf( CompModSwitches.ImeMode.Level >= TraceLevel.Info, "Inside get_CanEnableIme(), this = " + this ); 1478Debug.Indent(); 1483Debug.Assert(dataGridViewCell != null); 1491Debug.WriteLineIf( CompModSwitches.ImeMode.Level >= TraceLevel.Info, "Value = " + canEnable ); 1492Debug.Unindent(); 1576Debug.Fail("Unexpected this.advancedCellBorderStyle.All value in CellBorderStyle.get"); 2184Debug.Assert(this.ptCurrentCell.X >= 0 && ptCurrentCell.Y >= 0); 2185Debug.Assert(this.ptCurrentCell.X < this.Columns.Count); 2186Debug.Assert(this.ptCurrentCell.Y < this.Rows.Count); 2249Debug.Assert(this.ptCurrentCell.X >= 0 && this.ptCurrentCell.X < this.Columns.Count); 2250Debug.Assert(this.ptCurrentCell.Y >= 0 && this.ptCurrentCell.Y < this.Rows.Count); 2252Debug.Assert(dataGridViewRow != null); 2254Debug.Assert(this.IsSharedCellVisible(dataGridViewCell, this.ptCurrentCell.Y)); 2267Debug.Assert(this.ptCurrentCell.Y != -1); 2285Debug.Assert(this.ptCurrentCell.Y != -1); 2303Debug.Assert(this.ptCurrentCell.Y != -1); 2324Debug.Assert(this.ptCurrentCell.Y >= 0); 2325Debug.Assert(this.ptCurrentCell.Y < this.Rows.Count); 2927Debug.Assert(firstDisplayedCell.RowIndex >= 0 && 2961Debug.Assert(this.displayedBandsInfo.NumTotallyDisplayedFrozenRows == 0); 3121Debug.Assert(totalVisibleFrozenWidth > 0); 3143Debug.Assert(success); 3145Debug.Assert(this.displayedBandsInfo.FirstDisplayedScrollingCol >= 0); 3146Debug.Assert(this.displayedBandsInfo.FirstDisplayedScrollingCol == value || 3197Debug.Assert(totalVisibleFrozenHeight > 0); 3219Debug.Assert(this.displayedBandsInfo.FirstDisplayedScrollingRow >= 0); 3224Debug.Assert(rowsToScroll != 0); 3230Debug.Assert(success); 3464Debug.Assert(this.Columns.DisplayInOrder(this.displayedBandsInfo.FirstDisplayedScrollingCol, oldFirstVisibleScrollingCol)); 3518Debug.Assert(this.horizontalOffset == 0); 3729Debug.Assert(dataGridViewCell != null); 3730Debug.Assert(rowIndex >= 0); 3740Debug.Assert(dataGridViewCell != null); 3741Debug.Assert(rowIndex >= 0); 3750Debug.Assert(dataGridViewCell != null); 3751Debug.Assert(rowIndex >= 0); 3846Debug.Assert(value >= 0); 4332Debug.Assert(this.rowHeadersWidth != value); 4333Debug.Assert(value >= minimumRowHeadersWidth); 4590Debug.Assert(this.HorizontalOffset == 0); 4591Debug.Assert(this.VerticalOffset == 0); 4900Debug.Assert(this.ptCurrentCell.Y >= 0); 4907Debug.Assert(this.ptCurrentCell.Y >= 0);
winforms\Managed\System\WinForms\DataGridViewAccessibleObject.cs (1)
100System.Diagnostics.Debug.Assert(this.GetChildCount() == 0);
winforms\Managed\System\WinForms\DataGridViewAutoSizeColumnModeEventArgs.cs (1)
21Debug.Assert(dataGridViewColumn != null);
winforms\Managed\System\WinForms\DataGridViewBand.cs (23)
210Debug.Assert(!this.bandIsRow); 222Debug.Assert(value != this.Displayed); 289Debug.Assert(!this.bandIsRow); 369Debug.Assert(dataGridViewColumnHeaderCell != null); 408Debug.Assert(value.OwningRow == null); 423Debug.Assert(dataGridViewColumnHeaderCell.SortGlyphDirection == SortOrder.None); 424Debug.Assert(value.OwningColumn == null); 427Debug.Assert(value.DataGridView == null); 545Debug.Assert(!this.bandIsRow); 573Debug.Assert(this.bandIndex >= 0); 609Debug.Assert(value != this.ReadOnly); 618Debug.Assert(this.DataGridView != null); 631Debug.Assert(!this.bandIsRow); 663Debug.Assert(value == DataGridViewTriState.False, "TriState only supports NotSet, True, False"); 684Debug.Assert(!this.bandIsRow); 705Debug.Assert(this.bandIndex >= 0); 724Debug.Assert(value != this.Selected); 840Debug.Assert(this.thickness != value); 841Debug.Assert(value >= this.minimumThickness); 842Debug.Assert(value <= maxBandThickness); 860Debug.Assert(!this.bandIsRow); 958Debug.Assert(this.bandIsRow); 963Debug.Assert(rowIndex > -1);
winforms\Managed\System\WinForms\DataGridViewButtonCell.cs (12)
65Debug.Assert((value & ~(ButtonState.Normal | ButtonState.Pushed | ButtonState.Checked)) == 0); 118Debug.Assert(value >= FlatStyle.Flat && value <= FlatStyle.System); 553Debug.Assert(this.RowIndex >= 0); // Cell is not in a shared row. 567Debug.Assert(this.DataGridView.CellMouseDownInContentBounds); 706Debug.Assert(paint || computeContentBounds || computeErrorIconBounds); 707Debug.Assert(!paint || !computeContentBounds || !computeErrorIconBounds); 708Debug.Assert(!computeContentBounds || !computeErrorIconBounds || !paint); 709Debug.Assert(!computeErrorIconBounds || !paint || !computeContentBounds); 710Debug.Assert(cellStyle != null); 867Debug.Assert(this.FlatStyle == FlatStyle.Popup, "FlatStyle.Popup is the last flat style"); 929Debug.Assert(valBounds.Height <= 0 || valBounds.Width <= 0); 979Debug.Assert(this.FlatStyle == FlatStyle.Popup, "FlatStyle.Popup is the last flat style");
winforms\Managed\System\WinForms\DataGridViewCell.cs (79)
226Debug.Assert((this.State & DataGridViewElementStates.Displayed) == 0); 236Debug.Assert(this.DataGridView.Rows.GetRowState(this.RowIndex) == this.DataGridView.Rows.SharedRow(this.RowIndex).State); 257Debug.Assert(this.RowIndex >= -1); 351Debug.Assert(this.RowIndex >= -1); 397Debug.Assert((this.State & DataGridViewElementStates.Frozen) == 0); 401Debug.Assert(this.DataGridView.Rows.GetRowState(this.RowIndex) == this.DataGridView.Rows.SharedRow(this.RowIndex).State); 590Debug.Assert(this.DataGridView.Rows.GetRowState(this.RowIndex) == this.DataGridView.Rows.SharedRow(this.RowIndex).State); 603Debug.Assert(this.ColumnIndex >= 0); 633Debug.Assert(value != this.ReadOnly); 657Debug.Assert((this.State & DataGridViewElementStates.Resizable) == 0); 666Debug.Assert(this.DataGridView.Rows.GetRowState(this.RowIndex) == this.DataGridView.Rows.SharedRow(this.RowIndex).State); 714Debug.Assert(this.DataGridView.Rows.GetRowState(this.RowIndex) == this.DataGridView.Rows.SharedRow(this.RowIndex).State); 728Debug.Assert(this.ColumnIndex >= 0); 743Debug.Assert(value != this.Selected); 906Debug.Assert(this.RowIndex >= -1); 911Debug.Assert(this.RowIndex >= -1); 973Debug.Assert((this.State & DataGridViewElementStates.Visible) == 0); 977Debug.Assert(this.DataGridView.Rows.GetRowState(this.RowIndex) == this.DataGridView.Rows.SharedRow(this.RowIndex).State); 1003Debug.Fail("DataGridViewRow.AdjustCellBorderStyle - Unexpected DataGridViewAdvancedCellBorderStyle.OutsetPartial"); 1118Debug.Assert(this.DataGridView != null); 1119Debug.Assert(this.ColumnIndex >= 0); 1191Debug.Assert(this.DataGridView != null); 1212Debug.Assert(rowIndex == -1); 1213Debug.Assert(this is DataGridViewColumnHeaderCell, "if the row index == -1 and we have an owning column this should be a column header cell"); 1225Debug.Assert(this is DataGridViewRowHeaderCell); 1236Debug.Assert(this.OwningColumn == null); 1237Debug.Assert(this.OwningRow == null); 1238Debug.Assert(rowIndex == -1); 1333Debug.Assert(dgv.EditingControl.ParentInternal == dgv.EditingPanel); 1334Debug.Assert(dgv.EditingPanel.Controls.Contains(dgv.EditingControl)); 1336Debug.Assert(dgv.EditingControl.ParentInternal == null); 1358Debug.Assert(dgv.EditingPanel.ParentInternal == dgv); 1359Debug.Assert(dgv.Controls.Contains(dgv.EditingPanel)); 1361Debug.Assert(dgv.EditingPanel.ParentInternal == null); 1364Debug.Assert(dgv.EditingControl.ParentInternal == null); 1365Debug.Assert(dgv.EditingPanel.ParentInternal == null); 1366Debug.Assert(dgv.EditingPanel.Controls.Count == 0); 1632Debug.Assert(csv); 1681Debug.Assert(this.DataGridView != null); 1797Debug.Assert(this.DataGridView != null); 1829Debug.Assert(this.DataGridView != null); 2008Debug.Assert(this.owningRow != null); 2025Debug.Assert(this.ColumnIndex < this.DataGridView.Columns.Count); 2069Debug.Assert(this.RowIndex == -1); 2091Debug.Assert(this.owningColumn != null); 2092Debug.Assert(this.owningRow != null); 2093Debug.Assert(this.ColumnIndex >= 0); 2168Debug.Assert(this.ColumnIndex < this.DataGridView.Columns.Count); 2191Debug.Assert(cellStyle != null); 2198Debug.Assert(rowStyle != null); 2205Debug.Assert(columnStyle != null); 2209Debug.Assert(dataGridViewStyle != null); 2473Debug.Assert(dataGridViewStyle.Alignment != DataGridViewContentAlignment.NotSet); 2500Debug.Assert(dataGridViewStyle.WrapMode != DataGridViewTriState.NotSet); 2566Debug.Assert(width > 0); 2606Debug.Assert(maxWidth > 0); 2623Debug.Assert(height > 0); 2648Debug.Assert(this.owningColumn != null); 2649Debug.Assert(this.owningRow != null); 2678Debug.Assert(this.ColumnIndex < dataGridView.Columns.Count); 2706Debug.Assert(rowIndex >= 0); 2707Debug.Assert(this.ColumnIndex >= 0); 2736Debug.Assert(!dgv.EditingPanel.ContainsFocus); 2738Debug.Assert(dgv.EditingPanel.ParentInternal == null); 2741Debug.Assert(dgv.IsSharedCellVisible(this, rowIndex)); 2743Debug.Assert(dgv.EditingControl.ParentInternal == dgv.EditingPanel); 2744Debug.Assert(dgv.EditingPanel.ParentInternal == dgv); 2990Debug.Assert(textSize.Height <= maxHeight); 3095Debug.Assert(this.DataGridView != null); 3108Debug.Assert(this.DataGridView.IsCurrentCellInEditMode); 3141Debug.Assert(this is DataGridViewHeaderCell); 3205Debug.Assert(!String.IsNullOrEmpty(errorText), "if we entered the cell error area then an error was painted, so we should have an error"); 3394Debug.Assert(false, "there are only three possible choices for the CurrentMouseLocation"); 3411Debug.Assert(this.CurrentMouseLocation != DATAGRIDVIEWCELL_flagAreaNotSet); 3439Debug.Fail("there are only three choices for CurrentMouseLocation"); 4395Debug.Assert(this.DataGridView != null); 4676Debug.Assert(rowIndex >= 0); 4677Debug.Assert(this.ColumnIndex >= 0); 5052Debug.Assert(dataGridView.CurrentCell == dataGridViewCell, "the result of selecting the cell should have made this cell the current cell");
winforms\Managed\System\WinForms\DataGridViewCellCollection.cs (7)
141Debug.Assert(dataGridViewRow != null); 276Debug.Assert(!dataGridViewCell.ReadOnly); 282Debug.Assert(!dataGridViewCell.Selected); 339Debug.Assert(!dataGridViewCell.Selected); 395Debug.Assert(!dataGridViewCell.ReadOnly); 396Debug.Assert(!dataGridViewCell.Selected); 404Debug.Assert(!dataGridViewCell.Selected);
winforms\Managed\System\WinForms\DataGridViewCellLinkedList.cs (11)
42Debug.Assert(index >= 0); 43Debug.Assert(index < this.count); 83Debug.Assert(this.headElement != null); 91Debug.Assert(dataGridViewCell != null); 92Debug.Assert(dataGridViewCell.DataGridView.SelectionMode == DataGridViewSelectionMode.CellSelect || 118Debug.Assert(dataGridViewCell != null); 138Debug.Assert(dataGridViewCell != null); 242Debug.Assert(this.current != null); // Since this is for internal use only. 252Debug.Assert(this.current == null); 258Debug.Assert(this.current != null); // Since this is for internal use only. 284Debug.Assert(dataGridViewCell != null);
winforms\Managed\System\WinForms\DataGridViewCellPaintingEventArgs.cs (3)
77Debug.Assert(dataGridView != null); 279Debug.Assert(graphics != null); 280Debug.Assert(cellStyle != null);
winforms\Managed\System\WinForms\DataGridViewCellStyle.cs (10)
132Debug.Assert(Enum.IsDefined(typeof(DataGridViewContentAlignment), value)); 201Debug.Assert((oldDataSourceNullValue == null && this.DataSourceNullValue != null) || 409Debug.Assert((oldNullValue == null && this.NullValue != null) || 433Debug.Assert(value.All < -1); 452Debug.Assert(value.Left >= 0); 453Debug.Assert(value.Right >= 0); 454Debug.Assert(value.Top >= 0); 455Debug.Assert(value.Bottom >= 0); 584Debug.Assert(value >= DataGridViewTriState.NotSet && value <= DataGridViewTriState.False); 681Debug.Assert(dgvcs != null);
winforms\Managed\System\WinForms\DataGridViewCellValueEventArgs.cs (2)
71Debug.Assert(columnIndex >= -1); 72Debug.Assert(rowIndex >= -1);
winforms\Managed\System\WinForms\DataGridViewCheckBoxCell.cs (15)
216Debug.Assert((value & ~(ButtonState.Normal | ButtonState.Pushed | ButtonState.Checked)) == 0); 307Debug.Assert(value >= FlatStyle.Flat && value <= FlatStyle.System); 739Debug.Assert(retCheckState == CheckState.Indeterminate); 985Debug.Assert(this.RowIndex >= 0); // Cell is not in a shared row. 999Debug.Assert(this.DataGridView.CellMouseDownInContentBounds); 1084Debug.Assert((position.X >= 0) && (position.X < this.DataGridView.Columns.Count)); 1085Debug.Assert((position.Y >= 0) && (position.Y < this.DataGridView.Rows.Count)); 1159Debug.Assert(paint || computeContentBounds || computeErrorIconBounds); 1160Debug.Assert(!paint || !computeContentBounds || !computeErrorIconBounds); 1161Debug.Assert(!computeContentBounds || !computeErrorIconBounds || !paint); 1162Debug.Assert(!computeErrorIconBounds || !paint || !computeContentBounds); 1163Debug.Assert(cellStyle != null); 1461Debug.Assert(this.FlatStyle == FlatStyle.Popup); 1621Debug.Assert(valBounds.Width < checkBoxSize.Width || valBounds.Height < checkBoxSize.Height, "the bounds are empty"); 1639Debug.Assert(formattedValue == null || this.FormattedValueType == null || this.FormattedValueType.IsAssignableFrom(formattedValue.GetType()));
winforms\Managed\System\WinForms\DataGridViewCheckBoxColumn.cs (1)
318Debug.Fail("we can't compute the default cell style w/o a template cell");
winforms\Managed\System\WinForms\DataGridViewColumn.cs (12)
432Debug.Assert(value >= -1); 433Debug.Assert(value < Int32.MaxValue); 513Debug.Assert(value > 0); 620Debug.Assert(this.Index > -1); 624Debug.Assert(columnStyle != null); 634Debug.Assert(dataGridViewStyle != null); 723Debug.Assert(dataGridViewStyle.Alignment != DataGridViewContentAlignment.NotSet); 733Debug.Assert(dataGridViewStyle.WrapMode != DataGridViewTriState.NotSet); 1038Debug.Assert(value > 0); 1225Debug.Assert(dataGridView == null || this.Index > -1); 1233Debug.Assert(autoSizeColumnCriteriaInternal == DataGridViewAutoSizeColumnCriteriaInternal.Header || 1241Debug.Assert(dataGridView.ColumnHeadersVisible || autoSizeColumnCriteriaInternal != DataGridViewAutoSizeColumnCriteriaInternal.Header);
winforms\Managed\System\WinForms\DataGridViewColumnCollection.cs (29)
280Debug.Assert(this.DataGridView != null); 314Debug.Assert(this.DataGridView != null); 356Debug.Assert(smallestIndex >= 0); 519Debug.Fail("no column found in GetColumnAtDisplayIndex"); 587Debug.Assert((includeFilter & ~(DataGridViewElementStates.Displayed | DataGridViewElementStates.Frozen | DataGridViewElementStates.Resizable | 589Debug.Assert((includeFilter & DataGridViewElementStates.Resizable) == 0); 590Debug.Assert(DisplayInOrder(fromColumnIndex, toColumnIndex)); 591Debug.Assert(((DataGridViewColumn) this.items[toColumnIndex]).StateIncludes(includeFilter)); 600Debug.Assert(dataGridViewColumn != null); 611Debug.Assert(dataGridViewColumn != null); 612Debug.Assert(this.itemsSorted != null); 613Debug.Assert(this.lastAccessedSortedIndex == -1 || 640Debug.Assert((includeFilter & ~(DataGridViewElementStates.Displayed | DataGridViewElementStates.Frozen | DataGridViewElementStates.Resizable | 965Debug.Assert(this.DataGridView != null); 1007Debug.Assert(includeFilter == DataGridViewElementStates.Displayed || 1036Debug.Assert(includeFilter == DataGridViewElementStates.Displayed || 1079Debug.Assert(this.DataGridView != null); 1085Debug.Assert(this.DataGridView != null); 1128Debug.Fail("Column should have been found in DataGridViewColumnCollection.Remove"); 1183Debug.Assert(index >= 0 && index < this.Count); 1184Debug.Assert(this.DataGridView != null); 1185Debug.Assert(!this.DataGridView.NoDimensionChangeAllowed); 1186Debug.Assert(!this.DataGridView.InDisplayIndexAdjustments); 1222Debug.Assert(columnWidthIncrement != 0); 1230Debug.Assert(columnWidthIncrement != 0); 1290Debug.Assert(x != null); 1291Debug.Assert(y != null); 1296Debug.Assert(dataGridViewColumn1 != null); 1297Debug.Assert(dataGridViewColumn2 != null);
winforms\Managed\System\WinForms\DataGridViewColumnEventArgs.cs (1)
24Debug.Assert(dataGridViewColumn.Index >= -1);
winforms\Managed\System\WinForms\DataGridViewColumnHeaderCell.cs (12)
106Debug.Assert(value >= SortOrder.None && value <= SortOrder.Descending); 160Debug.Assert(inFirstRow); 203Debug.Assert(csv); 319Debug.Assert(this.DataGridView != null); 327Debug.Assert(cellStyle != null); 331Debug.Assert(columnHeadersStyle != null); 334Debug.Assert(dataGridViewStyle != null); 466Debug.Assert(dataGridViewStyle.Alignment != DataGridViewContentAlignment.NotSet); 480Debug.Assert(dataGridViewStyle.WrapMode != DataGridViewTriState.NotSet); 783Debug.Assert(cellStyle != null); 833Debug.Assert(this.ButtonState == ButtonState.Pushed); 1105Debug.Assert(this.SortGlyphDirection == SortOrder.Descending);
winforms\Managed\System\WinForms\DataGridViewComboBoxCell.cs (34)
209Debug.Assert(this.DisplayMember != null && this.DisplayMember.Length > 0); 223Debug.Assert(this.ValueMember != null && this.ValueMember.Length > 0); 348Debug.Assert(value >= DataGridViewComboBoxDisplayStyle.ComboBox && value <= DataGridViewComboBoxDisplayStyle.Nothing); 517Debug.Assert(value >= FlatStyle.Flat && value <= FlatStyle.System); 740Debug.Assert(this.EditingComboBox != null); 807Debug.Assert(this.DataGridView != null); 808Debug.Assert(this.EditingComboBox != null); 839Debug.Assert(cachedDropDownWidth >= 1); 911Debug.Assert(sender == this.DataSource, "How can we get dispose notification from anything other than our DataSource?"); 917Debug.Assert(sender == this.DataSource); 918Debug.Assert(this.DataSource is ISupportInitializeNotification); 919Debug.Assert((this.flags & DATAGRIDVIEWCOMBOBOXCELL_dataSourceInitializedHookedUp) != 0x00); 1246Debug.Assert(item != null); 1495Debug.Assert(this.EditingComboBox != null); 1498Debug.Assert(rowIndex > -1); 1506Debug.Assert(this.DataGridView != null && 1509Debug.Assert(!this.ReadOnly); 1666Debug.Assert(property != null); 1667Debug.Assert(this.DataManager != null); 1698Debug.Assert(!string.IsNullOrEmpty(field)); 1781Debug.Assert(value != null); 1782Debug.Assert(this.ValueMemberProperty != null || this.DisplayMemberProperty != null || 1824Debug.Assert(this.DisplayMemberProperty != null || this.ValueMemberProperty != null || 1879Debug.Assert(this.TemplateComboBoxColumn.CellTemplate == this); 1910Debug.Assert(e.ColumnIndex == this.ColumnIndex); 2112Debug.Assert(paint || computeContentBounds || computeErrorIconBounds || computeDropDownButtonRect); 2113Debug.Assert(!paint || !computeContentBounds || !computeErrorIconBounds || !computeDropDownButtonRect); 2114Debug.Assert(!paint || !computeContentBounds || !computeDropDownButtonRect || !computeErrorIconBounds); 2115Debug.Assert(!computeContentBounds || !computeErrorIconBounds || !paint || !computeDropDownButtonRect); 2116Debug.Assert(!computeContentBounds || !computeErrorIconBounds || !computeDropDownButtonRect || !paint); 2117Debug.Assert(!computeErrorIconBounds || !paint || !computeContentBounds || !computeDropDownButtonRect); 2118Debug.Assert(!computeErrorIconBounds || !paint || !computeDropDownButtonRect || !computeContentBounds); 2119Debug.Assert(cellStyle != null); 2762Debug.Assert(owner != null);
winforms\Managed\System\WinForms\DataGridViewDataConnection.cs (33)
244Debug.Assert(this.dataConnectionState[DATACONNECTIONSTATE_cancellingRowEdit]); 259Debug.Assert(this.currencyManager.AllowAdd, "why did we call AddNew on the currency manager when the currency manager does not allow new rows?"); 372Debug.Assert(this.props != null); 415Debug.Assert(sortProperty == null); 431Debug.Assert(this.props != null); 452Debug.Assert(sender == this.currencyManager, "did we forget to unregister our ListChanged event handler?"); 491Debug.Assert(!this.dataConnectionState[DATACONNECTIONSTATE_inAddNew] || !this.dataConnectionState[DATACONNECTIONSTATE_finishedAddNew], 516Debug.Assert(this.owner.AllowUserToAddRowsInternal, "how did we start the add new transaction when the AllowUserToAddRowsInternal is false?"); 585Debug.Assert(DataBoundRowsCount() != -1, "the data bound data grid view rows count should be at least 0"); 604Debug.Assert(this.currencyManager.List.Count == 1); 609Debug.Assert(this.dataConnectionState[DATACONNECTIONSTATE_finishedAddNew]); 625Debug.Assert(this.currencyManager.List.Count == 0, "we deleted the row that the Child table forcefully added"); 704Debug.Assert(e.OldIndex > -1, "the currency manager should have taken care of this case"); 705Debug.Assert(e.NewIndex > -1, "how can we move an item outside of the list?"); 711Debug.Assert(e.NewIndex != -1, "the item changed event does not cover changes to the entire list"); 762Debug.Assert(sender == this.currencyManager, "did we forget to unregister our events?"); 765Debug.Assert(this.owner.CurrentCellAddress.X == -1); 852Debug.Assert(this.owner.NewRowIndex != -1, "the NewRowIndex is -1 only when AllowUserToAddRows is false"); 869Debug.Assert(sender == this.dataSource); 870Debug.Assert(this.dataSource is ISupportInitializeNotification); 871Debug.Assert(this.dataConnectionState[DATACONNECTIONSTATE_dataSourceInitializedHookedUp]); 885Debug.Assert(this.currencyManager != null); 892Debug.Assert(this.currencyManager != null); 913Debug.Assert(this.owner.AllowUserToAddRowsInternal, "how did we start an add new row transaction if the dataGridView control has AllowUserToAddRows == false?"); 923Debug.Assert(this.owner.newRowIndex == this.currencyManager.List.Count - 1); 976Debug.Fail("we only care about which data fields are read only when we are data bound"); 1244Debug.Assert(rowIndex >= 0); 1278Debug.Assert(rowIndex >= 0); 1326Debug.Assert(dataGridViewColumn != null); 1333Debug.Assert(rowIndex >= -1); 1497Debug.Assert(DataBoundRowsCount() == this.currencyManager.List.Count, "if the back end was changed while in AddNew the DGV should have updated its rows collection"); 1652Debug.Assert(dataGridViewColumn.IsDataBound && dataGridViewColumn.BoundColumnIndex != -1, "we need a bound column index to perform the sort"); 1653Debug.Assert(this.List is IBindingList, "you should have checked by now that we are bound to an IBindingList");
winforms\Managed\System\WinForms\DataGridViewDataErrorEventArgs.cs (1)
27Debug.Assert(rowIndex > -1);
winforms\Managed\System\WinForms\DataGridViewEditingControl.cs (1)
81Debug.Assert(ownerControl is IDataGridViewEditingControl, "ownerControl must implement IDataGridViewEditingControl");
winforms\Managed\System\WinForms\DataGridViewHeaderCell.cs (6)
62Debug.Assert(Enum.IsDefined(typeof(ButtonState), value)); 105Debug.Assert(!this.DataGridView.LayoutInfo.dirty); 601Debug.Assert(this.ButtonState == ButtonState.Pushed); 602Debug.Assert(this.ColumnIndex == this.DataGridView.MouseDownCellAddress.X); 603Debug.Assert(rowIndex == this.DataGridView.MouseDownCellAddress.Y); 677Debug.Assert(this.DataGridView != null);
winforms\Managed\System\WinForms\DataGridViewImageCell.cs (11)
180Debug.Assert(value >= DataGridViewImageCellLayout.NotSet && value <= DataGridViewImageCellLayout.Zoom); 237Debug.Assert(this.DataGridView.AllowUserToAddRowsInternal); 635Debug.Assert(imageLayout != DataGridViewImageCellLayout.Stretch); 742Debug.Assert(cellStyle.Alignment == DataGridViewContentAlignment.NotSet, "this is the only alignment left"); 805Debug.Assert(paint || computeContentBounds || computeErrorIconBounds); 806Debug.Assert(!paint || !computeContentBounds || !computeErrorIconBounds); 807Debug.Assert(!computeContentBounds || !computeErrorIconBounds || !paint); 808Debug.Assert(!computeErrorIconBounds || !paint || !computeContentBounds); 809Debug.Assert(cellStyle != null); 859Debug.Assert(imageLayout != DataGridViewImageCellLayout.NotSet); 973Debug.Assert(valBounds.Height <= 0 || valBounds.Width <= 0);
winforms\Managed\System\WinForms\DataGridViewImageColumn.cs (1)
309Debug.Fail("we can't compute the default cell style w/o a template cell");
winforms\Managed\System\WinForms\DataGridViewIntLinkedList.cs (9)
40Debug.Assert(source != null); 53Debug.Assert(index >= 0); 54Debug.Assert(index < this.count); 80Debug.Assert(index >= 0); 84Debug.Assert(index == this.lastAccessedIndex); 104Debug.Assert(this.headElement != null); 243Debug.Assert(this.current != null); // Since this is for internal use only. 253Debug.Assert(this.current == null); 259Debug.Assert(this.current != null); // Since this is for internal use only.
winforms\Managed\System\WinForms\DataGridViewLinkCell.cs (7)
180Debug.Assert(value >= LinkBehavior.SystemDefault && value <= LinkBehavior.NeverUnderline); 997Debug.Assert(paint || computeContentBounds || computeErrorIconBounds); 998Debug.Assert(!paint || !computeContentBounds || !computeErrorIconBounds); 999Debug.Assert(!computeContentBounds || !computeErrorIconBounds || !paint); 1000Debug.Assert(!computeErrorIconBounds || !paint || !computeContentBounds); 1001Debug.Assert(cellStyle != null); 1126Debug.Assert(computeContentBounds);
winforms\Managed\System\WinForms\DataGridViewMethods.cs (849)
82Debug.Assert(this.Columns.Count > 0); 83Debug.Assert(this.newRowIndex == -1); 315Debug.Assert(dataGridViewColumn != null); 316Debug.Assert(rowIndex > -1); 317Debug.Assert(rowIndex < this.Rows.Count); 346Debug.Assert(this.noAutoSizeCount > 0); 355Debug.Assert(autoSizeColumnCriteriaFilter != DataGridViewAutoSizeColumnCriteriaInternal.None); 356Debug.Assert((autoSizeColumnCriteriaFilter & DataGridViewAutoSizeColumnCriteriaInternal.Fill) == 0); 377Debug.Assert(columnIndex >= -1 && columnIndex < this.Columns.Count); 378Debug.Assert(rowIndex >= 0 && rowIndex < this.Rows.Count); 379Debug.Assert(this.autoSizeRowsMode == DataGridViewAutoSizeRowsMode.DisplayedHeaders || 397Debug.Assert(columnIndex == -1); 398Debug.Assert((((DataGridViewAutoSizeRowsModeInternal) autoSizeRowsMode) & DataGridViewAutoSizeRowsModeInternal.Header) != 0); 402Debug.Assert(this.RowHeadersWidth > 0); 403Debug.Assert(this.RowHeadersVisible); 422Debug.Assert(preferredThickness >= minimumHeight); 429Debug.Assert(this.autoSizeRowsMode != DataGridViewAutoSizeRowsMode.None); 476Debug.Assert((((DataGridViewAutoSizeRowsModeInternal) this.autoSizeRowsMode) & DataGridViewAutoSizeRowsModeInternal.Header) != 0); 480Debug.Assert(this.RowHeadersWidth > 0); 481Debug.Assert(this.RowHeadersVisible); 507Debug.Assert((((DataGridViewAutoSizeRowsModeInternal) this.autoSizeRowsMode) & DataGridViewAutoSizeRowsModeInternal.DisplayedRows) != 0); 548Debug.Assert(dataGridViewColumn != null); 549Debug.Assert(dataGridViewColumn.Visible); 550Debug.Assert(!dataGridViewColumn.Frozen); 551Debug.Assert(dataGridViewColumn.MinimumWidth <= width); 552Debug.Assert(dataGridViewColumn.InheritedAutoSizeMode == DataGridViewAutoSizeColumnMode.Fill); 553Debug.Assert(!this.layout.dirty); 559Debug.Assert(dataGridViewColumn.MinimumWidth == dataGridViewColumn.Width); 584Debug.Assert(!dataGridViewColumnTmp.Frozen); 724Debug.Assert(!dataGridViewColumnTmp.Frozen); 766Debug.Assert(newWeightSum > 0); 912Debug.Assert(!dataGridViewColumn.Frozen); 932Debug.Assert(this.layout.Data.Width == this.layout.Inside.Width - this.layout.RowHeaders.Width - (this.SingleVerticalBorderAdded ? 1 : 0)); 994Debug.Assert(weightSum > 0); 1159Debug.Assert(oldDesiredWidth >= mostDeservingDataGridViewColumn.DesiredFillWidth); 1170Debug.Assert(widthLoss >= 0); 1307Debug.Assert((((DataGridViewAutoSizeRowsModeInternal) autoSizeRowsMode) & DataGridViewAutoSizeRowsModeInternal.DisplayedRows) != 0); 1462Debug.Assert(this.selectedBandIndexes.Contains(rowIndex) == 1484Debug.Fail("DataGridView.AreAllCellsSelected - Shouldn't reach this code"); 1605Debug.Assert(finalClonedColumns[clonedColIndex].IsDataBound); 1629Debug.Assert(finalClonedColumns[k].IsDataBound); 1637Debug.Assert(autoSizeColumnCriteriaFilter != DataGridViewAutoSizeColumnCriteriaInternal.None); 1638Debug.Assert((autoSizeColumnCriteriaFilter & DataGridViewAutoSizeColumnCriteriaInternal.Fill) == 0); 1782Debug.Assert(this.noAutoSizeCount > 0); 1855Debug.Assert(this.noAutoSizeCount > 0); 1862Debug.Assert(autoSizeColumnCriteriaInternal == DataGridViewAutoSizeColumnCriteriaInternal.Header || 1867Debug.Assert(columnIndex >= 0 && columnIndex < this.Columns.Count); 1868Debug.Assert(autoSizeColumnCriteriaInternal != DataGridViewAutoSizeColumnCriteriaInternal.Header || this.ColumnHeadersVisible); 1910Debug.Assert(this.noAutoSizeCount > 0); 2103Debug.Fail("Unexpected rowHeadersWidthSizeMode value in AutoResizeRowHeadersWidth"); 2118Debug.Assert(this.noAutoSizeCount > 0); 2276Debug.Fail("Unexpected rowHeadersWidthSizeMode value in AutoResizeRowHeadersWidth"); 2291Debug.Assert(this.noAutoSizeCount > 0); 2298Debug.Assert(rowIndex >= 0 && rowIndex < this.Rows.Count); 2299Debug.Assert(((DataGridViewAutoSizeRowCriteriaInternal) autoSizeRowMode & invalidDataGridViewAutoSizeRowCriteriaInternalMask) == 0); 2351Debug.Assert(this.noAutoSizeCount > 0); 2472Debug.Assert(this.lastRowSplitBar == -1); 2615Debug.Assert(this.ptCurrentCell.X >= 0 && this.ptCurrentCell.X < this.Columns.Count); 2616Debug.Assert(this.ptCurrentCell.Y >= 0 && this.ptCurrentCell.Y < this.Rows.Count); 2617Debug.Assert(!this.IsCurrentCellInEditMode); 2620Debug.Assert(dataGridViewCell != null); 2645Debug.Assert(!this.IsCurrentCellInEditMode); 2699Debug.Assert(((IDataGridViewEditingControl)this.editingControl).EditingControlDataGridView == this); 2703Debug.Assert(this.editingControl == null); 2705Debug.Assert(this.editingControl != null); 2715Debug.Assert(this.editingControl != null); 2728Debug.Assert(this.editingControl != null); 2729Debug.Assert(this.editingPanel != null); 2732Debug.Assert(dgvese.CellStyle != null); 2796Debug.Assert(this.lastColSplitBar == -1); 2819Debug.Assert(this.lastRowSplitBar == -1); 2826Debug.Assert(inheritedCellStyle != null); 2832Debug.Assert(cellStyle != null); 2836Debug.Assert(columnHeadersStyle != null); 2839Debug.Assert(dataGridViewStyle != null); 2968Debug.Assert(dataGridViewStyle.Alignment != DataGridViewContentAlignment.NotSet); 2982Debug.Assert(dataGridViewStyle.WrapMode != DataGridViewTriState.NotSet); 3073Debug.Assert(this.ptCurrentCell.Y != -1); 3105Debug.Assert(success); 3121Debug.Assert(this.dataGridViewState1[DATAGRIDVIEWSTATE1_currentCellInEditMode]); 3123Debug.Assert(dataGridViewEditingCell != null); 3157Debug.Assert(dataGridViewEditingCell != null); 3165Debug.Assert((this.AllowUserToAddRowsInternal && this.Rows.Count == 1) || 3181Debug.Assert(success); 3223Debug.Assert(this.dataGridViewState1[DATAGRIDVIEWSTATE1_currentCellInEditMode]); 3254Debug.Assert(0 == this.Rows.GetFirstRow(DataGridViewElementStates.Visible)); 3293Debug.Assert(this.dataGridViewState1[DATAGRIDVIEWSTATE1_currentCellInEditMode]); 3358Debug.Assert(dataGridViewCurrentCell.OwningColumn != null); 3489Debug.Assert(this.noDimensionChangeCount >= 0); 3627Debug.Assert(this.noDimensionChangeCount >= 0); 3638Debug.Assert(columnIndex >= 0 && columnIndex < this.Columns.Count, "Invalid columnIndex: " + columnIndex ); 3650Debug.Assert(dataGridViewColumn != null); 3660Debug.Assert(firstVisibleFrozenColumn != null); 3665Debug.Assert(this.Columns.DisplayInOrder(firstVisibleFrozenColumn.Index, dataGridViewColumn.Index)); 3696Debug.Assert(hti.col != -1); 3742Debug.Assert(hti.col != -1); 3800Debug.Assert(this.ptCurrentCell.X > -1); 3886Debug.Assert( 3900Debug.Assert(this.ptCurrentCell.X > -1); 3929Debug.Assert(this.dataGridViewState1[DATAGRIDVIEWSTATE1_currentCellInEditMode]); 3962Debug.Assert(this.dataGridViewState1[DATAGRIDVIEWSTATE1_currentCellInEditMode]); 4031Debug.Assert(this.ptCurrentCell.X > -1); 4130Debug.Assert(columnIndex < this.Columns.Count); 4147Debug.Assert(success); 4162Debug.Assert(dataGridViewRow != null); 4218Debug.Assert(cx <= this.horizontalOffset); 4304Debug.Assert(rowIndex < this.displayedBandsInfo.FirstDisplayedScrollingRow); 4361Debug.Assert(insideLeft.Height >= 0); 4382Debug.Assert(insideLeft.Width >= 0); 4400Debug.Assert(colHeaders.Width >= 0); 4440Debug.Assert(newLayout.Data.X >= 0); 4441Debug.Assert(newLayout.Data.Y >= 0); 4442Debug.Assert(newLayout.Data.Width >= 0); 4443Debug.Assert(newLayout.Data.Height >= 0); 4451Debug.Assert(!this.layout.dirty); 4511Debug.Assert(this.vertScrollBar.Maximum > 0); 4523Debug.Assert(this.verticalOffset == this.vertScrollBar.Value); 4599Debug.Assert(cx <= this.Columns.GetColumnsWidth(DataGridViewElementStates.Visible | DataGridViewElementStates.Frozen)); 4639Debug.Assert(firstDisplayedScrollingCol >= 0); 4660Debug.Assert(this.negOffset == 0); 4679Debug.Assert(this.negOffset == 0); 4683Debug.Assert(dataGridViewColumn != null); 4684Debug.Assert(dataGridViewColumn.Thickness > displayWidth - cx); 4691Debug.Assert(this.negOffset == GetNegOffsetFromHorizontalOffset(this.horizontalOffset)); 4695Debug.Assert(numVisibleScrollingCols <= visibleScrollingColumnsTmp, "the number of displayed columns can only grow"); 4711Debug.Assert(jumpFromFirstVisibleScrollingCol >= -1); 4719Debug.Assert(firstDisplayedScrollingCol >= 0); 4726Debug.Assert(dataGridViewColumn != null); 4740Debug.Assert((this.displayedBandsInfo.NumDisplayedScrollingCols > 0 && this.displayedBandsInfo.FirstDisplayedScrollingCol != -1) || 4773Debug.Assert(cy < displayHeight); 4875Debug.Assert(lastDisplayedScrollingRow == -1); 4884Debug.Assert(firstDisplayedFrozenRow < nRows, "firstDisplayedFrozenRow larger than number of rows"); 4885Debug.Assert(lastDisplayedFrozenRow < nRows, "lastDisplayedFrozenRow larger than number of rows"); 4886Debug.Assert(lastDisplayedScrollingRow < nRows, "lastDisplayedScrollingRow larger than number of rows"); 4894Debug.Assert(this.displayedBandsInfo.NumTotallyDisplayedFrozenRows >= 0, "the number of visible frozen rows can't be negative"); 4895Debug.Assert(this.displayedBandsInfo.NumDisplayedScrollingRows >= 0, "the number of visible scrolling rows can't be negative"); 4896Debug.Assert(this.displayedBandsInfo.NumTotallyDisplayedScrollingRows >= 0, "the number of totally visible scrolling rows can't be negative"); 4897Debug.Assert(this.displayedBandsInfo.FirstDisplayedScrollingRow < nRows, "firstDisplayedScrollingRow larger than number of rows"); 4940Debug.Assert(dataGridViewColumn != null); 4941Debug.Assert(dataGridViewColumn.DataGridView == null); 4942Debug.Assert(dataGridViewColumn.Index >= 0); 4943Debug.Assert(dataGridViewColumn.DisplayIndex >= 0); 4974Debug.Assert(dataGridViewColumn != null); 4975Debug.Assert(dataGridViewColumn.DataGridView == this); 4977Debug.Assert(dataGridViewColumn.DisplayIndex >= 0); 4978Debug.Assert(dataGridViewColumn.DisplayIndex < this.Columns.Count); 5009Debug.Assert(dataGridViewColumn != null); 5010Debug.Assert(anticipatedColumnIndex >= 0 && anticipatedColumnIndex <= this.Columns.Count); 5019Debug.Assert(dataGridViewColumn.DisplayIndex >= 0 && dataGridViewColumn.DisplayIndex <= this.Columns.Count); 5073Debug.Assert(dataGridViewColumn != null); 5135Debug.Assert(dataGridViewColumn != null); 5136Debug.Assert(newDisplayIndex != dataGridViewColumn.DisplayIndex); 5137Debug.Assert(!this.dataGridViewOper[DATAGRIDVIEWOPER_inDisplayIndexAdjustments]); 5195Debug.Assert(dataGridViewColumn != null); 5199Debug.Assert(this.Columns[columnIndex].Index == columnIndex); 5205Debug.Assert(dataGridViewColumn != null); 5206Debug.Assert(insertionCount > 0); 5217Debug.Assert(this.CurrentCellInternal != null); 5225Debug.Assert(dataGridViewRow != null); 5226Debug.Assert(anticipatedRowIndex >= 0 && anticipatedRowIndex <= this.Rows.Count); 5290Debug.Assert(dataGridViewRow != null); 5349Debug.Assert(rowIndexDeleted >= 0); 5357Debug.Assert(dataGridViewRow.Index == rowIndex); 5374Debug.Assert(rowIndexInserted >= 0); 5375Debug.Assert(insertionCount > 0); 5383Debug.Assert(dataGridViewRow.Index == rowIndex); 5464Debug.Assert(this.Rows.Count > 1); 5465Debug.Assert(this.newRowIndex != -1); 5475Debug.Assert(this.newRowIndex == this.Rows.Count - 1); 5478Debug.Assert(dataGridViewRow.Index == -1); 5482Debug.Assert(this.newRowIndex == -1); 5487Debug.Assert((this.Rows.GetRowState(this.newRowIndex) & DataGridViewElementStates.Visible) != 0); 5488Debug.Assert(this.ptCurrentCell.Y == this.newRowIndex); 5555Debug.Assert(dataGridViewColumn.Visible && !dataGridViewColumn.Frozen); 5663Debug.Assert(this.noSelectionChangeCount == 0); 5799Debug.Assert(this.ptCurrentCell.X != -1); 5984Debug.Assert(sender == this.editingControl || sender == this.editingPanel); 5985Debug.Assert(this.ptCurrentCell.X != -1); 5995Debug.Assert(sender == this.editingControl || sender == this.editingPanel); 5996Debug.Assert(this.ptCurrentCell.X != -1); 6006Debug.Assert(sender == this.editingControl || sender == this.editingPanel); 6012Debug.Assert(sender == this.editingControl || sender == this.editingPanel); 6018Debug.Assert(sender == this.editingControl || sender == this.editingPanel); 6024Debug.Assert(sender == this.editingControl || sender == this.editingPanel); 6027Debug.Assert(this.editingControl != null); 6028Debug.Assert(!this.dataGridViewState1[DATAGRIDVIEWSTATE1_customCursorSet]); 6043Debug.Assert(sender == this.editingControl || sender == this.editingPanel); 6046Debug.Assert(this.editingControl != null); 6065Debug.Assert(sender == this.editingControl || sender == this.editingPanel); 6071Debug.Assert(sender == this.editingControl || sender == this.editingPanel); 6162Debug.Assert(proposed >= this.Columns[this.trackColumn].MinimumThickness); 6163Debug.Assert(proposed <= DataGridViewBand.maxBandThickness); 6271Debug.Assert(this.editingPanel == null || this.editingPanel.Controls.Count == 0); 6280Debug.Assert(success); 6292Debug.Assert(this.dataGridViewState1[DATAGRIDVIEWSTATE1_currentCellInEditMode]); 6368Debug.Assert(this.autoSizeRowsMode == DataGridViewAutoSizeRowsMode.None); 6416Debug.Assert(rowIndex >= 0); 6417Debug.Assert(rowIndex < this.Rows.Count); 6418Debug.Assert((this.Rows.GetRowState(rowIndex) & DataGridViewElementStates.Visible) != 0); 6419Debug.Assert((this.Rows.GetRowState(rowIndex) & DataGridViewElementStates.Frozen) == 0); 6455Debug.Assert(numDisplayedScrollingRows > 0); 6458Debug.Assert(rowIndexTmp != -1); 6470Debug.Assert(this.displayedBandsInfo.FirstDisplayedScrollingRow != -1); 6497Debug.Assert(rowIndexTmp != -1); 6520Debug.Assert(firstDisplayedFrozenRowIndex != -1); 6656Debug.Assert(numDisplayedScrollingCols > 0); 6660Debug.Assert(dataGridViewColumnTmp != null); 6672Debug.Assert(this.displayedBandsInfo.FirstDisplayedScrollingCol != -1); 6699Debug.Assert(dataGridViewColumnTmp != null); 7041Debug.Assert(dataGridViewCell != null); 7042Debug.Assert(rowIndex >= 0); 7181Debug.Assert(columnIndex >= -1 && columnIndex < this.Columns.Count); 7182Debug.Assert(rowIndex >= -1 && rowIndex < this.Rows.Count); 7186Debug.Assert(dataGridViewRow != null); 7372Debug.Assert(rowIndex != -1); 7543Debug.Assert(dataGridViewColumn != null); 7605Debug.Assert(dataGridViewColumn != null); 7908Debug.Assert(firstVisibleColumn != null); 7909Debug.Assert(lastVisibleColumn != null); 7931Debug.Assert(firstVisibleRowIndex != -1); 7932Debug.Assert(lastVisibleRowIndex != -1); 7975Debug.Assert(lRowIndex != -1); 7976Debug.Assert(uRowIndex != -1); 7977Debug.Assert(lColumn != null); 7978Debug.Assert(uColumn != null); 7979Debug.Assert(lColumn.Index == uColumn.Index || this.Columns.DisplayInOrder(lColumn.Index, uColumn.Index)); 7980Debug.Assert(lRowIndex <= uRowIndex); 8007Debug.Assert(dataGridViewColumn != null); 8013Debug.Assert(prevDataGridViewColumn != null); 8062Debug.Assert(dataGridViewColumn != null); 8068Debug.Assert(nextDataGridViewColumn != null); 8092Debug.Assert(rowIndex != -1); 8098Debug.Assert(nextRowIndex != -1); 8109Debug.Assert(dataGridViewColumn != null); 8115Debug.Assert(prevDataGridViewColumn != null); 8169Debug.Assert(dataGridViewColumn != null); 8175Debug.Assert(nextDataGridViewColumn != null); 8255Debug.Assert(columnIndex >= 0 && columnIndex < this.Columns.Count); 8348Debug.Assert(dataGridViewColumn != null); 8397Debug.Assert(this.RightToLeftInternal || (x >= data.X - 1 && x < data.Right), "x must be inside the horizontal bounds of this.layout.Data"); 8398Debug.Assert(!this.RightToLeftInternal || (x >= data.X && x <= data.Right), "x must be inside the horizontal bounds of this.layout.Data"); 8463Debug.Assert(dataGridViewColumn.Visible && !dataGridViewColumn.Frozen); 8494Debug.Assert(xOffset > 0); 8525Debug.Assert(index < this.Columns.Count); 8526Debug.Assert(this.Columns[index].Visible); 8577Debug.Assert(dataGridViewColumn.Visible && !dataGridViewColumn.Frozen); 8623Debug.Fail("Could not find column in GetColumnXFromIndex"); 8649Debug.Assert(!this.vertScrollBar.Enabled || 8680Debug.Assert(this.displayedBandsInfo.FirstDisplayedScrollingRow >= 0); 8713Debug.Assert(this.displayedBandsInfo.FirstDisplayedScrollingRow >= 0); 8731Debug.Assert(mouseY > rectScrollingArea.Bottom); 8777Debug.Assert(this.displayedBandsInfo.FirstDisplayedScrollingCol >= 0); 8831Debug.Assert((!this.RightToLeftInternal && mouseX > rectScrollingArea.Right) || (this.RightToLeftInternal && mouseX < rectScrollingArea.Left)); 8897Debug.Assert(this.displayedBandsInfo.FirstDisplayedScrollingRow >= 0); 9117Debug.Assert(rowIndex >= 0 && rowIndex < this.Rows.Count); 9202Debug.Assert(y >= data.Y-1 && y < data.Bottom, "y must be inside the vertical bounds of the data area."); 9231Debug.Assert((this.Rows.GetRowState(indexTmp) & DataGridViewElementStates.Visible) != 0 && 9254Debug.Assert(yOffset > 0); 9283Debug.Assert(index >= 0 && index < this.Rows.Count); 9284Debug.Assert((this.Rows.GetRowState(index) & DataGridViewElementStates.Visible) != 0); 9319Debug.Assert(indexTmp != -1); 9324Debug.Assert((this.Rows.GetRowState(indexTmp) & DataGridViewElementStates.Visible) != 0 && 9340Debug.Assert(this.displayedBandsInfo.FirstDisplayedScrollingRow != -1); 9356Debug.Fail("Could not find row in GetRowYFromIndex"); 9449Debug.Assert(xColumnLeftEdge == GetColumnXFromIndex(hti.col)); 9551Debug.Assert(yRowTopEdge == GetRowYFromIndex(hti.row)); 9628Debug.Assert(xColumnLeftEdge == GetColumnXFromIndex(hti.col)); 9629Debug.Assert(yRowTopEdge == GetRowYFromIndex(hti.row)); 9706Debug.Assert(dataGridViewColumn != null); 9765Debug.Assert(rowIndex >= 0); 9786Debug.Assert(this.dataGridViewOper[DATAGRIDVIEWOPER_trackColSelect] || this.dataGridViewOper[DATAGRIDVIEWOPER_trackCellSelect]); 9847Debug.Assert(dataGridViewEditingCell != null); 9853Debug.Assert(this.ptCurrentCell.X == dataGridViewCell.ColumnIndex); 9889Debug.Assert(dataGridViewCell != null); 9890Debug.Assert(this.editingControl != null); 9947Debug.Assert(dataGridViewCell != null); 9948Debug.Assert(dataGridViewCell.DataGridView == this); 9993Debug.Assert(columnIndex >= 0 && columnIndex < this.Columns.Count); 10039Debug.Assert(rowIndex >= 0 && rowIndex < this.Rows.Count); 10063Debug.Assert(lo <= hi); 10064Debug.Assert(lo < this.Rows.Count); 10065Debug.Assert(hi < this.Rows.Count); 10095Debug.Assert(lo <= hi); 10096Debug.Assert(lo > -1); 10354Debug.Assert(this.layout.Data.Height >= 0); 10376Debug.Assert(this.layout.RowHeaders.Height >= 0); 10397Debug.Assert(this.layout.Data.Width >= 0); 10405Debug.Assert(this.layout.ColumnHeaders.Width >= 0); 10438Debug.Assert(this.layout.Data.Height >= 0); 10449Debug.Assert(this.layout.Data.Width >= 0); 10457Debug.Assert(this.layout.ColumnHeaders.Width >= 0); 10491Debug.Assert(this.horizScrollBar.Maximum > 0); 10533Debug.Assert(this.vertScrollBar.Maximum > 0); 10581Debug.Assert(success); 10602Debug.Fail("Unexpected autoSizeRowsMode value in MapAutoSizeRowsModeToRowMode"); 10627Debug.Assert(this.DataSource != null, "this method should only be called when we have a data connection"); 10628Debug.Assert(dataGridViewColumn.DataPropertyName.Length != 0, "this method should be called only for columns which have DataPropertyName set"); 10693Debug.Assert(this.ptCurrentCell.X >= 0 && this.ptCurrentCell.X < this.Columns.Count); 10694Debug.Assert(this.ptCurrentCell.Y >= 0 && this.ptCurrentCell.Y < this.Rows.Count); 10711Debug.Assert(dataGridViewColumn.Index >= 0); 10712Debug.Assert(dataGridViewColumn.Index < this.Columns.Count); 10713Debug.Assert(dataGridViewColumn.DataGridView == this); 10732Debug.Assert(autoSizeColumnMode != DataGridViewAutoSizeColumnMode.NotSet); 10759Debug.Assert(rowIndex >= 0); 10765Debug.Assert(rowIndex == this.Rows.Count - 1); 10797Debug.Assert(rowIndex >= 0); 10988Debug.Assert(dataGridViewRow.Cells.Count < newColumnCount); 11004Debug.Assert(weightSum <= (float)ushort.MaxValue); 11007Debug.Assert(dataGridViewColumns != null); 11061Debug.Assert(weightSum <= (float)ushort.MaxValue); 11084Debug.Assert(dataGridViewColumn.CellType != null); 11101Debug.Assert(dataGridViewColumn.CellType != null); 11176Debug.Assert(dataGridViewRows != null); 11216Debug.Assert(!this.AllowUserToAddRowsInternal); 11339Debug.Assert(dataGridViewColumn != null); 11353Debug.Assert(autoSizeColumnMode != DataGridViewAutoSizeColumnMode.NotSet); 11436Debug.Assert(autoSizeColumnMode != DataGridViewAutoSizeColumnMode.NotSet); 11486Debug.Assert(autoSizeColumnMode != DataGridViewAutoSizeColumnMode.NotSet); 11770Debug.Assert(dataGridViewCell != null); 11856Debug.Assert(dataGridViewCell != null); 11892Debug.Assert(dataGridViewCell != null); 11974Debug.Assert(dataGridViewCell != null); 12022Debug.Assert(rowIndex < this.Rows.Count && columnIndex < this.Columns.Count); 12053Debug.Assert(this.noDimensionChangeCount >= 0); 12059Debug.Assert(dataGridViewCell.RowIndex >= -1); 12060Debug.Assert(dataGridViewCell.ColumnIndex >= -1); 12088Debug.Assert(columnIndex >= 0); 12089Debug.Assert(rowIndex >= 0); 12155Debug.Assert(rowIndex < this.Rows.Count && columnIndex < this.Columns.Count); 12186Debug.Assert(this.noDimensionChangeCount >= 0); 12203Debug.Assert(dataGridViewCell != null); 12235Debug.Assert(dataGridViewCell != null); 12268Debug.Assert(dataGridViewCell != null); 12282Debug.Assert(hti.Type != DataGridViewHitTestType.None && 12285Debug.Assert(this.ptMouseDownCell.X == hti.col); 12286Debug.Assert(this.ptMouseDownCell.Y == hti.row); 12337Debug.Assert(this.Columns[columnIndex].Resizable == DataGridViewTriState.True); 12438Debug.Assert(hti.Type == DataGridViewHitTestType.Cell); 12510Debug.Assert(this.MultiSelect || this.individualSelectedCells.Count <= 1); 12545Debug.Assert(success); 12569Debug.Assert(this.MultiSelect || this.selectedBandIndexes.Count <= 1); 12622Debug.Assert(this.selectedBandIndexes.Contains(hti.col)); 12626Debug.Assert(success); 12642Debug.Assert(this.selectedBandIndexes.Count <= 1); 12705Debug.Assert(this.selectedBandIndexes.Count <= 1); 12721Debug.Assert(success); 12746Debug.Assert(this.MultiSelect || this.selectedBandIndexes.Count <= 1); 12794Debug.Assert(this.selectedBandIndexes.Contains(hti.row) == 12801Debug.Assert(this.selectedBandIndexes.Contains(hti.row)); 12805Debug.Assert(success); 12822Debug.Assert(this.selectedBandIndexes.Count <= 1); 12885Debug.Assert(this.selectedBandIndexes.Count <= 1); 12932Debug.Assert(dataGridViewCell != null); 12966Debug.Assert(dataGridViewCell != null); 12997Debug.Assert(dataGridViewCell != null); 13028Debug.Assert(hti.Type != DataGridViewHitTestType.None && 13040Debug.Assert(!this.dataGridViewState2[DATAGRIDVIEWSTATE2_messageFromEditingCtrls]); 13065Debug.Assert(dataGridViewCell != null); 13133Debug.Assert(this.MultiSelect); 13154Debug.Assert(success); 13171Debug.Assert(dataGridViewCell.RowIndex >= 0); 13233Debug.Assert(dataGridViewCellStyle != null); 13452Debug.Assert(rowIndex < this.Rows.Count && columnIndex < this.Columns.Count); 13484Debug.Assert(this.noDimensionChangeCount >= 0); 13504Debug.Assert(rowIndex < this.Rows.Count && columnIndex < this.Columns.Count); 13538Debug.Assert(this.noDimensionChangeCount >= 0); 13828Debug.Assert(dataGridViewColumn != null); 13835Debug.Assert(dataGridViewColumn != null); 13836Debug.Assert(newDisplayIndex != dataGridViewColumn.DisplayIndex); 13895Debug.Assert(this.dataGridViewOper[DATAGRIDVIEWOPER_inDisplayIndexAdjustments]); 13908Debug.Assert(this.dataGridViewOper[DATAGRIDVIEWOPER_inDisplayIndexAdjustments]); 14003Debug.Assert(columnIndex >= 0 && columnIndex < this.Columns.Count); 14086Debug.Assert(autoSizeColumnCriteriaInternal != DataGridViewAutoSizeColumnCriteriaInternal.None); 14087Debug.Assert(autoSizeColumnCriteriaInternal != DataGridViewAutoSizeColumnCriteriaInternal.Fill); 14119Debug.Assert(this.sortOrder != SortOrder.None); 14156Debug.Assert(hti.Type == DataGridViewHitTestType.ColumnHeader); 14243Debug.Assert(this.MultiSelect || this.selectedBandIndexes.Count <= 1); 14271Debug.Assert(this.individualSelectedCells.Count == 0); 14311Debug.Assert(success); 14317Debug.Assert(success); 14323Debug.Assert(success); 14328Debug.Assert(this.CurrentCellAddress == new Point(-1, -1)); 14333Debug.Assert(this.selectedBandIndexes.Contains(hti.col)); 14475Debug.Assert(dataGridViewColumn != null); 14499Debug.Assert(dataGridViewColumn.Width == minimumWidth); 14525Debug.Assert(dataGridViewColumn != null); 14579Debug.Assert(dataGridViewColumn != null); 14580Debug.Assert(dataGridViewColumn.DataGridView == null); 14596Debug.Assert(hti.col >= 0); 14597Debug.Assert(this.MultiSelect); 14617Debug.Assert(dataGridViewColumn != null); 14624Debug.Assert(dataGridViewColumn != null); 14631Debug.Assert(dataGridViewColumn != null); 14638Debug.Assert(dataGridViewColumn != null); 14645Debug.Assert(dataGridViewColumn != null); 14652Debug.Assert(dataGridViewColumn != null); 14659Debug.Assert(dataGridViewColumn != null); 14662Debug.Assert(dataGridViewColumn != null); 14669Debug.Assert(dataGridViewColumn != null); 14672Debug.Assert(dataGridViewColumn != null); 14693Debug.Assert(success); 14723Debug.Assert(dataGridViewColumn != null); 14806Debug.Assert(this.Columns.DisplayInOrder(dataGridViewColumn.Index, this.displayedBandsInfo.FirstDisplayedScrollingCol)); 14849Debug.Assert(autoSizeColumnMode != DataGridViewAutoSizeColumnMode.NotSet); 15041Debug.Assert(this.ptCurrentCell.Y >= 0); 15046Debug.Assert(this.newRowIndex != -1); 15047Debug.Assert(this.AllowUserToAddRowsInternal); 15233Debug.Assert(!this.ReadOnly); 15252Debug.Fail("Unexpected DataGridViewElementStates param in DataGridView.OnDataGridViewElementStateChanging"); 15269Debug.Assert((this.Rows.GetRowState(rowIndex) & DataGridViewElementStates.Visible) != 0); 15273Debug.Assert(this.dataConnection != null); 15274Debug.Assert(this.dataConnection.CurrencyManager != null); 15275Debug.Assert(this.dataConnection.CurrencyManager.Position == this.ptCurrentCell.Y); 15311Debug.Fail("Unexpected DataGridViewElementStates param in DataGridView.OnDataGridViewElementStateChanging"); 15330Debug.Assert(!this.Columns[dataGridViewCell.ColumnIndex].ReadOnly); 15331Debug.Assert(!this.Rows[dataGridViewCell.RowIndex].ReadOnly); 15332Debug.Assert(!this.ReadOnly); 15351Debug.Fail("Unexpected DataGridViewElementStates param in DataGridView.OnDataGridViewElementStateChanging"); 15357Debug.Fail("Unexpected DataGridViewElement type in DataGridView.OnDataGridViewElementStateChanging"); 15772Debug.Assert(this.ptCurrentCell.X == -1); 15780Debug.Assert(success); 15786Debug.Assert(rowIndex >= 0); 15787Debug.Assert(insertionCount > 0); 15801Debug.Assert(rowIndex >= 0); 15809Debug.Assert(this.ptCurrentCell.X == -1); 15817Debug.Assert(success); 15823Debug.Assert(rowIndex >= 0); 15824Debug.Assert(dataGridViewRows != null); 15825Debug.Assert(dataGridViewRows.Length > 0); 15839Debug.Assert(dataGridViewRows != null); 15840Debug.Assert(dataGridViewRows.Length > 0); 15848Debug.Assert(this.ptCurrentCell.X == -1); 15850Debug.Assert(success); 15856Debug.Assert(dataGridViewColumn != null); 15953Debug.Assert(dataGridViewRow.Cells.Count < newColumnCount); 16015Debug.Assert(success); 16077Debug.Assert(dataGridViewRows != null); 16145Debug.Assert(dataGridViewCell != null); 16203Debug.Assert(dataGridViewCell != null); 16237Debug.Assert(dataGridViewCell != null); 16372Debug.Assert(dgvcme != null); 16382Debug.Assert(dgvcme != null); 16437Debug.Assert(dgvcme != null); 16453Debug.Assert(this.Columns[columnIndex].Resizable == DataGridViewTriState.True); 16466Debug.Assert(this.columnHeadersHeightSizeMode == DataGridViewColumnHeadersHeightSizeMode.EnableResizing); 16473Debug.Assert(dgvcme != null); 16489Debug.Assert(this.Rows[rowIndex].Resizable == DataGridViewTriState.True); 16502Debug.Assert(this.rowHeadersWidthSizeMode == DataGridViewRowHeadersWidthSizeMode.EnableResizing); 16530Debug.Assert(this.ptMouseDownCell.Y != -2); 16924Debug.Assert(this.cumulativeVerticalWheelDelta > -NativeMethods.WHEEL_DELTA); 16925Debug.Assert(this.cumulativeVerticalWheelDelta < NativeMethods.WHEEL_DELTA); 16926Debug.Assert(this.cumulativeHorizontalWheelDelta > -NativeMethods.WHEEL_DELTA); 16927Debug.Assert(this.cumulativeHorizontalWheelDelta < NativeMethods.WHEEL_DELTA); 17020Debug.Assert(this.displayedBandsInfo.FirstDisplayedScrollingRow >= 0); 17028Debug.Assert(totalVisibleFrozenHeight == this.Rows.GetRowsHeight(DataGridViewElementStates.Visible | DataGridViewElementStates.Frozen)); 17029Debug.Assert(this.displayedBandsInfo.FirstDisplayedScrollingRow >= 0); 17326Debug.Assert(dataGridViewColumn.Index >= 0); 17327Debug.Assert(dataGridViewColumn.DataGridView == null); 17351Debug.Assert(this.ptCurrentCell.X == -1); 17359Debug.Assert(success); 17375Debug.Assert(autoSizeColumnMode != DataGridViewAutoSizeColumnMode.NotSet); 17401Debug.Assert(this.ptCurrentCell.X == -1); 17409Debug.Assert(success); 17474Debug.Assert(dataGridViewColumn != null); 17475Debug.Assert(dataGridViewColumn.Index >= 0 && dataGridViewColumn.Index < this.Columns.Count); 17533Debug.Assert(success); 17541Debug.Assert(success); 17557Debug.Assert(columnIndex == 0); 17599Debug.Assert(this.Columns[i].IsDataBound, "two columns w/ the same DataPropertyName should be DataBound at the same time"); 17600Debug.Assert(this.Columns[i].HeaderCell.SortGlyphDirection == dataGridViewColumn.HeaderCell.SortGlyphDirection, "DataBound columns should have the same SortGlyphDirection as the one on the DataGridView"); 17641Debug.Assert(this.horizontalOffset >= dataGridViewColumn.Thickness); 17690Debug.Assert(rowIndexDeleted >= 0 && rowIndexDeleted < this.Rows.Count); 17705Debug.Assert(this.newRowIndex != -1); 17706Debug.Assert(this.newRowIndex == this.Rows.Count-1); 17733Debug.Assert(rowIndexDeleted < this.ptCurrentCell.Y); 17741Debug.Assert(success); 17749Debug.Assert(success); 17992Debug.Assert(rowIndex >= 0); 18114Debug.Assert(columnIndex >= 0 && rowIndex >= 0); 18187Debug.Assert(rowIndex < this.Rows.Count && columnIndex < this.Columns.Count); 18211Debug.Assert(this.noDimensionChangeCount >= 0); 18239Debug.Assert(rowIndex >= 0); 18410Debug.Assert(hti.Type == DataGridViewHitTestType.RowHeader); 18501Debug.Assert(success); 18523Debug.Assert(this.MultiSelect || this.selectedBandIndexes.Count <= 1); 18552Debug.Assert(this.individualSelectedCells.Count == 0); 18580Debug.Assert(this.selectedBandIndexes.Contains(hti.row) == 18594Debug.Assert(success); 18600Debug.Assert(success); 18609Debug.Assert(success); 18614Debug.Assert(this.CurrentCellAddress == new Point(-1, -1)); 18619Debug.Assert(this.selectedBandIndexes.Contains(hti.row)); 18795Debug.Assert(rowIndex != -1); 18796Debug.Assert(this.autoSizeRowsMode == DataGridViewAutoSizeRowsMode.None); 18822Debug.Assert(columnIndex >= 0 && rowIndex >= 0); 18835Debug.Assert(rowIndex < this.Rows.Count && columnIndex < this.Columns.Count); 18859Debug.Assert(this.noDimensionChangeCount >= 0); 18938Debug.Assert(hti.row >= 0); 18939Debug.Assert(this.MultiSelect); 19030Debug.Assert(success); 19099Debug.Assert(rowIndex >= -1); 19294Debug.Assert(this.noDimensionChangeCount >= 0); 19318Debug.Assert(rowIndex < this.Rows.Count && columnIndex < this.Columns.Count); 19341Debug.Assert(this.noDimensionChangeCount >= 0); 19492Debug.Assert(dataGridViewColumnHeaderCell != null); 19515Debug.Assert(this.Columns[i].IsDataBound, "two columns w/ the same DataPropertyName should be DataBound at the same time"); 19541Debug.Assert(success); 19658Debug.Assert(success); 19666Debug.Assert(success); 19697Debug.Assert(rowIndexTmp != -1); 19725Debug.Assert((this.Rows.GetRowState(rowIndexTmp) & DataGridViewElementStates.Visible) != 0); 19727Debug.Assert(numDisplayedScrollingRows > 0); 19730Debug.Assert(rowIndexTmp != -1); 19830Debug.Assert(bounds.Left == 0); 19831Debug.Assert(bounds.Top == 0); 19883Debug.Fail("DataGridView.PaintBorder - Unexpected BorderStyle value."); 19912Debug.Assert(cellBounds.Width > 0); 19981Debug.Assert(dataGridViewColumn.Visible && !dataGridViewColumn.Frozen); 19989Debug.Assert(cellBounds.Width > 0); 20030Debug.Assert(clipRegion != null); 20094Debug.Assert(this.dataGridViewOper[DATAGRIDVIEWOPER_trackColHeadersResize] || this.dataGridViewOper[DATAGRIDVIEWOPER_trackRowResize]); 20099Debug.Assert(this.dataGridViewOper[DATAGRIDVIEWOPER_trackRowHeadersResize] || 20170Debug.Assert((this.Rows.GetRowState(indexTmp) & DataGridViewElementStates.Frozen) == 0); 20171Debug.Assert((this.Rows.GetRowState(indexTmp) & DataGridViewElementStates.Visible) != 0); 20307Debug.Assert(this.inPerformLayoutCount >= 0); 20338Debug.Assert(this.editingControl != null); 20392Debug.Assert(this.editingControl != null); 20481Debug.Assert(rowIndex >= 0); 20549Debug.Assert(dataGridViewRow.Index == -1); 20561Debug.Assert(dataGridViewRow.Index == -1); 20738Debug.Assert(success); 20764Debug.Assert(this.ptAnchorCell.Y >= 0); 20811Debug.Assert(success); 20853Debug.Assert(success); 20913Debug.Assert(success); 20967Debug.Assert(success); 20994Debug.Assert(this.ptAnchorCell.Y >= 0); 21030Debug.Assert(success); 21072Debug.Assert(success); 21135Debug.Assert(success); 21185Debug.Assert(success); 21205Debug.Assert(this.ptAnchorCell.Y >= 0); 21268Debug.Assert(success); 21318Debug.Assert(success); 21405Debug.Assert(success); 21461Debug.Assert(success); 21498Debug.Assert(success); 21955Debug.Assert(this.ptCurrentCell.Y != -1); 21956Debug.Assert(this.CurrentCellInternal != null); 21957Debug.Assert(this.EditMode != DataGridViewEditMode.EditOnEnter || 21965Debug.Assert(success); 22311Debug.Assert(dataGridViewCell != null); 22334Debug.Assert(success); 22546Debug.Assert(success); 22552Debug.Assert(success); 22570Debug.Assert(this.ptAnchorCell.X >= 0); 22587Debug.Assert(success); 22597Debug.Assert(success); 22603Debug.Assert(success); 22622Debug.Assert(success); 22642Debug.Assert(success); 22648Debug.Assert(success); 22685Debug.Assert(success); 22695Debug.Assert(success); 22701Debug.Assert(success); 22720Debug.Assert(success); 22740Debug.Assert(success); 22746Debug.Assert(success); 22803Debug.Assert(success); 22813Debug.Assert(success); 22819Debug.Assert(success); 22846Debug.Assert(success); 22864Debug.Assert(success); 22870Debug.Assert(success); 22887Debug.Assert(success); 22920Debug.Assert(success); 22926Debug.Assert(success); 22937Debug.Assert(this.ptAnchorCell.X >= 0); 22949Debug.Assert(success); 22965Debug.Assert(success); 22976Debug.Assert(success); 22982Debug.Assert(success); 22997Debug.Assert(success); 23010Debug.Assert(success); 23016Debug.Assert(success); 23032Debug.Assert(this.ptAnchorCell.X >= 0); 23035Debug.Assert(success); 23050Debug.Assert(success); 23061Debug.Assert(success); 23067Debug.Assert(success); 23082Debug.Assert(success); 23095Debug.Assert(success); 23101Debug.Assert(success); 23116Debug.Assert(this.ptAnchorCell.X >= 0); 23132Debug.Assert(success); 23156Debug.Assert(success); 23167Debug.Assert(success); 23173Debug.Assert(success); 23196Debug.Assert(success); 23207Debug.Assert(success); 23213Debug.Assert(success); 23226Debug.Assert(success); 23270Debug.Assert(firstDisplayedScrollingRowIndex != -1); 23288Debug.Assert(nextScreenVisibleRowIndexTmp != -1); 23324Debug.Assert(success); 23351Debug.Assert(this.ptAnchorCell.Y >= 0); 23367Debug.Assert(success); 23382Debug.Assert(this.ptAnchorCell.Y >= 0); 23415Debug.Assert(this.ptAnchorCell.Y >= 0); 23519Debug.Assert(previousScreenVisibleRowIndexTmp != -1); 23543Debug.Assert(previousScreenVisibleRowIndex != -1); 23566Debug.Assert(success); 23590Debug.Assert(this.ptAnchorCell.Y >= 0); 23621Debug.Assert(this.ptAnchorCell.Y >= 0); 23654Debug.Assert(this.ptAnchorCell.Y >= 0); 23785Debug.Assert(success); 23791Debug.Assert(success); 23825Debug.Assert(success); 23835Debug.Assert(success); 23841Debug.Assert(success); 23860Debug.Assert(success); 23880Debug.Assert(success); 23886Debug.Assert(success); 23923Debug.Assert(success); 23933Debug.Assert(success); 23939Debug.Assert(success); 23958Debug.Assert(success); 23978Debug.Assert(success); 23984Debug.Assert(success); 24044Debug.Assert(success); 24054Debug.Assert(success); 24060Debug.Assert(success); 24087Debug.Assert(success); 24105Debug.Assert(success); 24111Debug.Assert(success); 24128Debug.Assert(success); 24161Debug.Assert(success); 24167Debug.Assert(success); 24181Debug.Assert(this.ptAnchorCell.X >= 0); 24191Debug.Assert(success); 24198Debug.Assert(success); 24209Debug.Assert(success); 24215Debug.Assert(success); 24230Debug.Assert(success); 24243Debug.Assert(success); 24249Debug.Assert(success); 24268Debug.Assert(this.ptAnchorCell.X >= 0); 24271Debug.Assert(success); 24278Debug.Assert(success); 24289Debug.Assert(success); 24295Debug.Assert(success); 24310Debug.Assert(success); 24323Debug.Assert(success); 24329Debug.Assert(success); 24343Debug.Assert(this.ptAnchorCell.X >= 0); 24363Debug.Assert(success); 24378Debug.Assert(success); 24389Debug.Assert(success); 24395Debug.Assert(success); 24418Debug.Assert(success); 24429Debug.Assert(success); 24435Debug.Assert(success); 24448Debug.Assert(success); 24481Debug.Assert(this.MultiSelect || this.selectedBandIndexes.Count <= 1); 24498Debug.Assert(!this.selectedBandIndexes.Contains(this.ptCurrentCell.X)); 24506Debug.Assert(this.MultiSelect || this.selectedBandIndexes.Count <= 1); 24523Debug.Assert(!this.selectedBandIndexes.Contains(this.ptCurrentCell.Y)); 24772Debug.Assert(success); 24797Debug.Assert(this.ptAnchorCell.Y >= 0); 24831Debug.Assert(success); 24865Debug.Assert(success); 24889Debug.Assert(this.ptAnchorCell.Y >= 0); 24916Debug.Assert(success); 24957Debug.Assert(success); 24979Debug.Assert(this.ptAnchorCell.Y >= 0); 25008Debug.Assert(success); 25042Debug.Assert(success); 25095Debug.Assert(success); 25136Debug.Assert(success); 25157Debug.Assert(this.ptAnchorCell.Y >= 0); 25207Debug.Assert(success); 25249Debug.Assert(success); 25322Debug.Assert(success); 25369Debug.Assert(success); 25398Debug.Assert(success); 25443Debug.Assert(dataGridViewCell != null); 25450Debug.Assert(success); 25462Debug.Assert(dataGridViewCurrentCell != null); 25475Debug.Assert(this.dataGridViewState1[DATAGRIDVIEWSTATE1_currentCellInEditMode]); 25477Debug.Assert(dataGridViewEditingCell != null); 25503Debug.Assert(this.newRowIndex == this.Rows.Count - 1); 25510Debug.Assert(this.IsCurrentCellInEditMode); 25556Debug.Assert(dgvcme.Clicks == 1); 25639Debug.Assert(this.ptCurrentCell.Y != -1); 25659Debug.Assert(this.dataGridViewState1[DATAGRIDVIEWSTATE1_currentCellInEditMode]); 25663Debug.Assert(dataGridViewEditingCell != null); 25715Debug.Assert(list.Count == rowsCount); 25793Debug.Assert(this.noSelectionChangeCount > 0); 25819Debug.Assert(this.noSelectionChangeCount > 0); 25840Debug.Assert(dataGridViewCell.ColumnIndex != columnIndexException || dataGridViewCell.RowIndex != rowIndexException); 25858Debug.Assert(this.noSelectionChangeCount > 0); 25910Debug.Assert(this.noSelectionChangeCount > 0); 26080Debug.Assert(rowIndex >= 0); 26081Debug.Assert(rowIndex < this.Rows.Count); 26124Debug.Assert(columnIndex >= 0 && columnIndex < this.Columns.Count); 26248Debug.Assert(this.displayedBandsInfo.FirstDisplayedScrollingCol >= 0); 26264Debug.Assert(this.displayedBandsInfo.FirstDisplayedScrollingCol >= 0); 26309Debug.Assert(columnIndex >= 0 && columnIndex < this.Columns.Count); 26310Debug.Assert(this.displayedBandsInfo.FirstDisplayedScrollingCol >= -1 && this.displayedBandsInfo.FirstDisplayedScrollingCol < this.Columns.Count); 26311Debug.Assert(this.displayedBandsInfo.LastTotallyDisplayedScrollingCol >= -1 && this.displayedBandsInfo.LastTotallyDisplayedScrollingCol < this.Columns.Count); 26312Debug.Assert(rowIndex >= 0 && rowIndex < this.Rows.Count); 26313Debug.Assert(this.displayedBandsInfo.FirstDisplayedScrollingRow >= -1 && this.displayedBandsInfo.FirstDisplayedScrollingRow < this.Rows.Count); 26314Debug.Assert(this.Columns[columnIndex].Visible); 26315Debug.Assert((this.Rows.GetRowState(rowIndex) & DataGridViewElementStates.Visible) != 0); 26371Debug.Assert(rowIndex >= 0 && rowIndex < this.Rows.Count); 26402Debug.Assert(firstDisplayedScrollingRow != -1); 26424Debug.Assert(rowCount != 0); 26425Debug.Assert(deltaY != 0); 26426Debug.Assert(this.displayedBandsInfo.FirstDisplayedScrollingRow >= this.Rows.GetRowCount(DataGridViewElementStates.Visible | DataGridViewElementStates.Frozen)); 26447Debug.Assert(rowsRect.X > 0); 26453Debug.Assert(rowsRect.Height >= 0); 26458Debug.Assert(this.displayedBandsInfo.FirstDisplayedScrollingRow > -1); 26482Debug.Assert(this.displayedBandsInfo.FirstDisplayedScrollingRow >= 0); 26484Debug.Assert(firstVisibleScrollingRow != -1); 26486Debug.Assert(newScrolledOffRowCount >= rowCount); 26493Debug.Assert(rows != 0); 26494Debug.Assert((rows > 0 && (scrollEventType == ScrollEventType.SmallIncrement || scrollEventType == ScrollEventType.LargeIncrement)) || 26498Debug.Assert(this.displayedBandsInfo.FirstDisplayedScrollingRow >= 0); 26508Debug.Assert(newFirstVisibleScrollingRow != -1); 26525Debug.Assert(this.displayedBandsInfo.FirstDisplayedScrollingRow == oldFirstVisibleScrollingRow); 26546Debug.Assert(this.displayedBandsInfo.FirstDisplayedScrollingRow == newFirstVisibleScrollingRow); 26560Debug.Assert(this.displayedBandsInfo.FirstDisplayedScrollingRow >= 0); 26585Debug.Assert(newFirstVisibleScrollingRow != -1); 26706Debug.Assert(this.noDimensionChangeCount >= 0); 26707Debug.Assert(this.noSelectionChangeCount >= 0); 26734Debug.Assert(index >= 0); 26803Debug.Assert(this.columnHeadersHeight != columnHeadersHeight); 26804Debug.Assert(columnHeadersHeight >= minimumColumnHeadersHeight); 26805Debug.Assert(columnHeadersHeight <= maxHeadersThickness); 26863Debug.Assert(rowIndex >= 0 && 26926Debug.Assert(oldCurrentCellX == this.ptCurrentCell.X); 26927Debug.Assert(oldCurrentCellY == this.ptCurrentCell.Y); 27022Debug.Assert(oldCurrentCellY >= 0); 27118Debug.Assert(oldCurrentCellX == this.ptCurrentCell.X); 27119Debug.Assert(oldCurrentCellY == this.ptCurrentCell.Y); 27163Debug.Assert(oldCurrentCellY >= 0); 27193Debug.Assert(columnIndexFrom >= 0 && columnIndexTo >= 0); 27194Debug.Assert((this.Columns[columnIndexFrom]).DisplayIndex <= (this.Columns[columnIndexTo]).DisplayIndex); 27195Debug.Assert(rowIndexFrom >= 0 && rowIndexTo >= 0); 27196Debug.Assert(rowIndexFrom <= rowIndexTo); 27197Debug.Assert(this.noSelectionChangeCount > 0); 27223Debug.Assert(dataGridViewColumn != null); 27251Debug.Assert(dataGridViewColumn != null); 27277Debug.Assert(this.noSelectionChangeCount > 0); 27307Debug.Assert(columnIndexFrom >= 0 && columnIndexTo >= 0); 27308Debug.Assert((this.Columns[columnIndexFrom]).DisplayIndex <= (this.Columns[columnIndexTo]).DisplayIndex); 27309Debug.Assert(this.noSelectionChangeCount > 0); 27323Debug.Assert(this.selectedBandIndexes.Contains(columnIndex)); 27331Debug.Assert(dataGridViewColumn != null); 27348Debug.Assert(this.selectedBandIndexes.Contains(columnIndexTo)); 27356Debug.Assert(rowIndexFrom >= 0 && rowIndexTo >= 0); 27357Debug.Assert(rowIndexFrom <= rowIndexTo); 27358Debug.Assert(this.noSelectionChangeCount > 0); 27376Debug.Assert(!this.selectedBandIndexes.Contains(rowIndex)); 27385Debug.Assert(this.selectedBandIndexes.Contains(rowIndex)); 27486Debug.Assert(columnIndex >= 0 && rowIndex >= 0 && 27558Debug.Assert(columnIndex >= 0 && columnIndex < this.Columns.Count); 27593Debug.Assert(rowIndex >= 0 && rowIndex < this.Rows.Count); 27662Debug.Assert(this.individualSelectedCells.Contains(dataGridViewCell)); 27678Debug.Assert(this.selectedBandIndexes.Contains(columnIndex)); 27712Debug.Assert(this.selectedBandIndexes.Contains(rowIndex)); 27774Debug.Assert(this.individualSelectedCells.Count <= 1); 27787Debug.Assert(this.selectedBandIndexes.Count <= 1); 27823Debug.Assert(this.selectedBandIndexes.Count <= 1); 27839Debug.Assert(this.selectedBandIndexes.Count <= 1); 27863Debug.Assert(this.selectedBandIndexes.Count <= 1); 27880Debug.Assert(this.selectedBandIndexes.Contains(rowIndex) == 27889Debug.Assert(this.selectedBandIndexes.Contains(rowIndex) == 27903Debug.Assert(this.selectedBandIndexes.Count <= 1); 27919Debug.Assert(this.selectedBandIndexes.Count <= 1); 27946Debug.Assert(success); 27970Debug.Assert(!this.selectedBandIndexes.Contains(columnIndex)); 27976Debug.Assert(this.selectedBandIndexes.Contains(columnIndex)); 27989Debug.Assert(this.MultiSelect || this.selectedBandIndexes.Count <= 1); 28001Debug.Assert(this.selectedBandIndexes.Count <= 1); 28085Debug.Assert(!this.selectedBandIndexes.Contains(rowIndex)); 28092Debug.Assert(this.selectedBandIndexes.Contains(rowIndex)); 28105Debug.Assert(this.MultiSelect || this.selectedBandIndexes.Count <= 1); 28117Debug.Assert(this.selectedBandIndexes.Count <= 1); 28231Debug.Assert(!(comparer != null && this.DataSource != null)); 28232Debug.Assert(direction == ListSortDirection.Ascending || direction == ListSortDirection.Descending); 28252Debug.Assert(rowVFIndex != -1); 28254Debug.Assert(0 == this.Rows.GetRowCount(DataGridViewElementStates.Visible | DataGridViewElementStates.Frozen)); 28266Debug.Assert(dataGridViewColumn != null); 28310Debug.Assert(rowVIndex != -1); 28314Debug.Assert(rowVIndex != -1); 28323Debug.Assert(this.dataGridViewOper[DATAGRIDVIEWOPER_inSort]); 28345Debug.Assert(rowIndex1 != this.newRowIndex); 28346Debug.Assert(rowIndex2 != this.newRowIndex); 28492Debug.Assert(this.displayedBandsInfo.FirstDisplayedScrollingRow >= 0); 28512Debug.Assert(this.displayedBandsInfo.FirstDisplayedScrollingRow >= 0); 28671Debug.Assert(success); 28729Debug.Assert(dataGridViewColumn != null); 28732Debug.Assert(lastVisibleRowIndex != -1); 28837Debug.Assert(success); 28866Debug.Assert(this.editingPanel != null); 28877Debug.Assert(this.editingControl != null); 28947Debug.Assert(dataGridViewColumnTmp != null); 28951Debug.Assert(ColumnNeedsDisplayedState(dataGridViewColumnTmp)); 28963Debug.Assert(numDisplayedScrollingCols > 0); 28967Debug.Assert(dataGridViewColumnTmp != null); 28971Debug.Assert(ColumnNeedsDisplayedState(dataGridViewColumnTmp)); 29105Debug.Assert(rowVisible); 29161Debug.Assert(rowIndexTmp != -1); 29176Debug.Assert(numDisplayedScrollingRows > 0); 29179Debug.Assert(rowIndexTmp != -1); 29252Debug.Assert(anchorColumnIndex >= 0); 29253Debug.Assert(anchorRowIndex >= 0); 29254Debug.Assert(newEdgeColumnIndex >= 0); 29255Debug.Assert(newEdgeRowIndex >= 0); 29256Debug.Assert(this.noSelectionChangeCount > 0); 29279Debug.Assert(dataGridViewColumn != null); 29296Debug.Assert(dataGridViewColumn != null); 29359Debug.Assert(dataGridViewColumn != null); 29374Debug.Assert(dataGridViewColumn != null); 29396Debug.Assert(dataGridViewColumn != null); 29397Debug.Assert(oldEdgeRowIndex < anchorRowIndex); 29415Debug.Assert(dataGridViewColumn != null); 29429Debug.Assert(dataGridViewColumn != null); 29430Debug.Assert(oldEdgeRowIndex <= anchorRowIndex); 29452Debug.Assert(dataGridViewColumn != null); 29468Debug.Assert(dataGridViewColumn != null); 29492Debug.Assert(dataGridViewColumn != null); 29505Debug.Assert(dataGridViewColumn != null); 29529Debug.Assert(dataGridViewColumn != null); 29545Debug.Assert(dataGridViewColumn != null); 29565Debug.Assert(oldEdgeRowIndex >= anchorRowIndex); 29566Debug.Assert(dataGridViewColumn != null); 29585Debug.Assert(dataGridViewColumn != null); 29619Debug.Assert(dataGridViewColumn != null); 29658Debug.Assert(dataGridViewColumn != null); 29678Debug.Assert(oldEdgeRowIndex >= anchorRowIndex); 29753Debug.Assert(this.dataGridViewOper[DATAGRIDVIEWOPER_trackRowSelect] || this.dataGridViewOper[DATAGRIDVIEWOPER_trackCellSelect]); 29807Debug.Assert(this.editingPanel != null); 29818Debug.Assert(this.editingControl != null); 29875Debug.Assert(hti.row == -1); 29879Debug.Assert(hti.col == -1); 29883Debug.Assert(hti.row == -1); 29884Debug.Assert(hti.col == -1);
winforms\Managed\System\WinForms\DataGridViewRow.cs (31)
202Debug.Assert(this.Index >= -1); 682Debug.Assert(inheritedCellStyle != null); 688Debug.Assert(cellStyle != null); 692Debug.Assert(rowHeadersStyle != null); 695Debug.Assert(dataGridViewStyle != null); 824Debug.Assert(dataGridViewStyle.Alignment != DataGridViewContentAlignment.NotSet); 838Debug.Assert(dataGridViewStyle.WrapMode != DataGridViewTriState.NotSet); 871Debug.Assert(inheritedRowStyle != null); 872Debug.Assert(rowIndex >= 0); 873Debug.Assert(this.DataGridView != null); 879Debug.Assert(rowStyle != null); 883Debug.Assert(dataGridViewStyle != null); 886Debug.Assert(rowsDefaultCellStyle != null); 889Debug.Assert(alternatingRowsDefaultCellStyle != null); 1061Debug.Assert(dataGridViewStyle.Alignment != DataGridViewContentAlignment.NotSet); 1079Debug.Assert(dataGridViewStyle.WrapMode != DataGridViewTriState.NotSet); 1227Debug.Assert(this.Cells.Count == dataGridView.Columns.Count); 1265Debug.Assert(this.Index == -1); 1266Debug.Assert(!this.Selected); 1368Debug.Assert(rowIndex >= -1); 1376Debug.Assert(rowIndex >= -1); 1499Debug.Assert(this.DataGridView != null); 1507Debug.Assert(this.DataGridView != null); 1624Debug.Assert(cellBounds.Width > 0); 1701Debug.Assert(dataGridViewColumn.Visible && !dataGridViewColumn.Frozen); 1711Debug.Assert(cellBounds.Width > 0); 1799Debug.Assert(cellBounds.Width > 0); 1829Debug.Assert(this.Index == -1); 1873Debug.Assert(values != null); 2182Debug.Assert(index >= 0); 2498Debug.Assert(false, "we should have found already the selected cell");
winforms\Managed\System\WinForms\DataGridViewRowCancelEventArgs.cs (2)
24Debug.Assert(dataGridViewRow != null); 25Debug.Assert(dataGridViewRow.Index >= 0);
winforms\Managed\System\WinForms\DataGridViewRowCollection.cs (115)
340Debug.Assert(this.DataGridView != null); 353Debug.Assert(dataGridViewRow.Cells.Count == this.DataGridView.Columns.Count); 356Debug.Assert(values == null); 358Debug.Assert((dataGridViewRow.State & (DataGridViewElementStates.Selected | DataGridViewElementStates.Displayed)) == 0); 374Debug.Assert(this.DataGridView.AllowUserToAddRowsInternal); 375Debug.Assert(this.DataGridView.NewRowIndex == this.Count - 1); 389Debug.Assert(dataGridViewCell.OwningRow == dataGridViewRow); 401Debug.Assert((rowState & (DataGridViewElementStates.Selected | DataGridViewElementStates.Displayed)) == 0); 411Debug.Assert(dataGridViewRow.State == SharedRowState(index)); 421Debug.Assert(this.DataGridView != null); 488Debug.Assert(this.DataGridView != null); 516Debug.Assert(rowTemplate.Cells.Count == this.DataGridView.Columns.Count); 518Debug.Assert((rowTemplateState & (DataGridViewElementStates.Selected | DataGridViewElementStates.Displayed)) == 0); 524Debug.Assert(dataGridViewCell.OwningRow == rowTemplate); 536Debug.Assert(this.DataGridView.AllowUserToAddRowsInternal); 537Debug.Assert(this.DataGridView.NewRowIndex == this.Count - 1); 548Debug.Assert(this.DataGridView != null); 574Debug.Assert(this.DataGridView.AllowUserToAddRowsInternal); 575Debug.Assert(this.DataGridView.NewRowIndex == this.Count - 1); 582Debug.Assert(dataGridViewRow.Cells.Count == this.DataGridView.Columns.Count); 589Debug.Assert(dataGridViewCell.OwningRow == dataGridViewRow); 604Debug.Assert((dataGridViewRow.State & (DataGridViewElementStates.Selected | DataGridViewElementStates.Displayed)) == 0); 606Debug.Assert(this.rowStates.Count == this.SharedList.Count); 617Debug.Assert(dataGridViewRow.State == SharedRowState(index)); 641Debug.Assert(this.DataGridView != null); 645Debug.Assert(this.DataGridView.AllowUserToAddRowsInternal); 646Debug.Assert(this.DataGridView.NewRowIndex == this.Count - 1); 647Debug.Assert(!newRow); 662Debug.Assert(this.DataGridView != null); 709Debug.Assert(this.DataGridView.AllowUserToAddRowsInternal); 710Debug.Assert(this.DataGridView.NewRowIndex == this.Count - 1); 818Debug.Assert(this.DataGridView != null); 849Debug.Assert(dataGridViewRow.Index == -1); 863Debug.Assert(this.DataGridView != null); 877Debug.Assert(this.DataGridView.AllowUserToAddRowsInternal); 878Debug.Assert(this.DataGridView.NewRowIndex == this.Count - 1); 895Debug.Assert(dataGridViewRow.Cells.Count == this.DataGridView.Columns.Count); 900Debug.Assert(dataGridViewCell.OwningRow == dataGridViewRow); 912Debug.Assert((dataGridViewRow.State & (DataGridViewElementStates.Selected | DataGridViewElementStates.Displayed)) == 0); 920Debug.Assert(dataGridViewRow.State == SharedRowState(index)); 923Debug.Assert(this.rowStates.Count == this.SharedList.Count); 1003Debug.Assert(visibleRowIndex < GetRowCount(DataGridViewElementStates.Visible)); 1020Debug.Assert(false, "we should have found the row already"); 1159Debug.Assert(skipRows >= 0); 1339Debug.Assert(toRowIndex >= fromRowIndex); 1340Debug.Assert((GetRowState(toRowIndex) & includeFilter) == includeFilter); 1407Debug.Assert(toRowIndex >= fromRowIndex); 1408Debug.Assert((GetRowState(toRowIndex) & includeFilter) == includeFilter); 1424Debug.Assert(toRowIndex >= fromRowIndex); 1425Debug.Assert(toRowIndex == this.items.Count || (GetRowState(toRowIndex) & includeFilter) == includeFilter); 1456Debug.Assert(dataGridViewRow.Index == rowIndex); 1470Debug.Assert(this.DataGridView != null); 1554Debug.Assert(this.DataGridView.AllowUserToAddRowsInternal); 1559Debug.Assert(rowTemplate.Cells.Count == this.DataGridView.Columns.Count); 1561Debug.Assert((rowTemplateState & (DataGridViewElementStates.Selected | DataGridViewElementStates.Displayed)) == 0); 1567Debug.Assert(dataGridViewCell.OwningRow == rowTemplate); 1582Debug.Assert(this.DataGridView != null); 1601Debug.Assert(this.DataGridView.AllowUserToAddRowsInternal); 1625Debug.Assert(this.DataGridView != null); 1626Debug.Assert(rowIndex >= 0 && rowIndex <= this.Count); 1627Debug.Assert(dataGridViewRow != null); 1628Debug.Assert(dataGridViewRow.DataGridView == null); 1629Debug.Assert(!this.DataGridView.NoDimensionChangeAllowed); 1630Debug.Assert(this.DataGridView.NewRowIndex == -1 || rowIndex != this.Count); 1631Debug.Assert(!dataGridViewRow.Selected); 1647Debug.Assert(dataGridViewRow.Cells.Count == this.DataGridView.Columns.Count); 1654Debug.Assert(dataGridViewCell.OwningRow == dataGridViewRow); 1669Debug.Assert((dataGridViewRow.State & (DataGridViewElementStates.Selected | DataGridViewElementStates.Displayed)) == 0); 1671Debug.Assert(this.rowStates.Count == this.SharedList.Count); 1682Debug.Assert(dataGridViewRow.State == SharedRowState(rowIndex)); 1711Debug.Assert(this.DataGridView != null); 1731Debug.Assert(this.DataGridView.AllowUserToAddRowsInternal); 1783Debug.Assert(this.rowStates.Count == this.SharedList.Count); 1812Debug.Assert(this.rowStates.Count == this.SharedList.Count); 1836Debug.Assert(this.DataGridView != null); 1858Debug.Assert(dataGridViewRow.Index == -1); 1861Debug.Assert(this.rowStates.Count == this.SharedList.Count); 1875Debug.Assert(this.DataGridView != null); 1901Debug.Assert(this.DataGridView.AllowUserToAddRowsInternal); 1923Debug.Assert(dataGridViewRow.Cells.Count == this.DataGridView.Columns.Count); 1928Debug.Assert(dataGridViewCell.OwningRow == dataGridViewRow); 1943Debug.Assert((dataGridViewRow.State & (DataGridViewElementStates.Selected | DataGridViewElementStates.Displayed)) == 0); 1945Debug.Assert(this.rowStates.Count == this.SharedList.Count); 1953Debug.Assert(dataGridViewRow.State == SharedRowState(rowIndexInserted)); 1965Debug.Assert(includeFilter == DataGridViewElementStates.Displayed || 2000Debug.Assert(includeFilter == DataGridViewElementStates.Displayed || 2042Debug.Assert(e.Action != CollectionChangeAction.Remove); 2090Debug.Assert(this.DataGridView != null); 2148Debug.Assert(rowCount == 1); 2198Debug.Fail("Unexpected cca value in DataGridViewRowCollecttion.OnCollectionChanged"); 2214Debug.Assert(this.DataGridView != null); 2297Debug.Assert(this.DataGridView.AllowUserToAddRowsInternal); 2328Debug.Assert(index >= 0 && index < this.Count); 2329Debug.Assert(this.DataGridView != null); 2330Debug.Assert(!this.DataGridView.NoDimensionChangeAllowed); 2341Debug.Assert(this.DataGridView != null); 2358Debug.Assert(dataGridViewRow != null); 2359Debug.Assert(dataGridViewRow.Index == -1); 2374Debug.Assert(index >= 0); 2375Debug.Assert(index < this.Count); 2398Debug.Assert(state == DataGridViewElementStates.Displayed || state == DataGridViewElementStates.Selected || state == DataGridViewElementStates.ReadOnly || state == DataGridViewElementStates.Resizable || state == DataGridViewElementStates.Frozen || state == DataGridViewElementStates.Visible); 2460Debug.Fail("Unexpected DataGridViewElementStates parameter in DataGridViewRowCollection.SetRowState."); 2557Debug.Assert(rowHeightIncrement != 0); 2569Debug.Assert(rowHeightIncrement != 0); 2672Debug.Assert(rowComparer != null); 2673Debug.Assert(this.Count > 0); 2711Debug.Assert(i >= left && j <= right, "(i>=left && j<=right) Sort failed - Is your IComparer bogus?"); 2789Debug.Assert(customComparer != null); 2804Debug.Assert(this.dataGridView.AllowUserToAddRowsInternal); 2813Debug.Assert(dataGridViewRow != null); 2814Debug.Assert(this.sortedColumnIndex >= 0); 2879Debug.Assert(value1 is DataGridViewRow); 2880Debug.Assert(value2 is DataGridViewRow); 2881Debug.Assert(value1 != null); 2882Debug.Assert(value2 != null);
winforms\Managed\System\WinForms\DataGridViewRowErrorTextNeededEventArgs.cs (1)
20Debug.Assert(rowIndex >= -1);
winforms\Managed\System\WinForms\DataGridViewRowEventArgs.cs (1)
24Debug.Assert(dataGridViewRow.Index >= -1);
winforms\Managed\System\WinForms\DataGridViewRowHeaderCell.cs (18)
233Debug.Assert((!this.DataGridView.RightToLeftInternal && firstCell) || (this.DataGridView.RightToLeftInternal && lastCell)); 278Debug.Assert(csv); 445Debug.Assert(this.DataGridView != null); 453Debug.Assert(cellStyle != null); 457Debug.Assert(rowHeadersStyle != null); 460Debug.Assert(dataGridViewStyle != null); 592Debug.Assert(dataGridViewStyle.Alignment != DataGridViewContentAlignment.NotSet); 606Debug.Assert(dataGridViewStyle.WrapMode != DataGridViewTriState.NotSet); 767Debug.Assert(paint || computeContentBounds || computeErrorIconBounds); 768Debug.Assert(!paint || !computeContentBounds || !computeErrorIconBounds); 769Debug.Assert(!computeContentBounds || !computeErrorIconBounds || !paint); 770Debug.Assert(!computeErrorIconBounds || !paint || !computeContentBounds); 771Debug.Assert(cellStyle != null); 820Debug.Assert(this.ButtonState == ButtonState.Pushed); 964Debug.Assert(valBounds.Width >= 0); 965Debug.Assert(valBounds.Height >= 0); 1344Debug.Assert(this.Owner.DataGridView.RowHeadersVisible, "if the rows are not visible how did you get the row headers acc obj?"); 1398Debug.Assert(this.Owner.DataGridView.TopLeftHeaderCell.AccessibilityObject == this.Owner.DataGridView.AccessibilityObject.GetChild(0).GetChild(0));
winforms\Managed\System\WinForms\DataGridViewRowHeightInfoNeededEventArgs.cs (4)
80Debug.Assert(rowIndex >= -1); 81Debug.Assert(height > 0); 82Debug.Assert(minimumHeight > 0); 83Debug.Assert(height >= minimumHeight);
winforms\Managed\System\WinForms\DataGridViewRowHeightInfoPushedEventArgs.cs (1)
22Debug.Assert(rowIndex >= -1);
winforms\Managed\System\WinForms\DataGridViewRowPostPaintEventArgs.cs (3)
66Debug.Assert(dataGridView != null); 265Debug.Assert(graphics != null); 266Debug.Assert(inheritedRowStyle != null);
winforms\Managed\System\WinForms\DataGridViewRowPrePaintEventArgs.cs (3)
68Debug.Assert(dataGridView != null); 284Debug.Assert(graphics != null); 285Debug.Assert(inheritedRowStyle != null);
winforms\Managed\System\WinForms\DataGridViewRowsAddedEventArgs.cs (2)
23Debug.Assert(rowIndex >= 0); 24Debug.Assert(rowCount >= 1);
winforms\Managed\System\WinForms\DataGridViewSelectedCellCollection.cs (3)
164Debug.Assert(!Contains(dataGridViewCell)); 196Debug.Assert(dataGridViewCells != null); 199Debug.Assert(!Contains(dataGridViewCell));
winforms\Managed\System\WinForms\DataGridViewSortCompareEventArgs.cs (2)
27Debug.Assert(dataGridViewColumn != null); 28Debug.Assert(dataGridViewColumn.Index >= 0);
winforms\Managed\System\WinForms\DataGridViewTextBoxCell.cs (12)
192Debug.Assert(cellStyle.WrapMode != DataGridViewTriState.NotSet); 193Debug.Assert(this.DataGridView != null); 532Debug.Assert(this.DataGridView != null && 535Debug.Assert(!this.ReadOnly); 602Debug.Assert(e.ColumnIndex == this.ColumnIndex); 679Debug.Assert(paint || computeContentBounds || computeErrorIconBounds); 680Debug.Assert(!paint || !computeContentBounds || !computeErrorIconBounds); 681Debug.Assert(!computeContentBounds || !computeErrorIconBounds || !paint); 682Debug.Assert(!computeErrorIconBounds || !paint || !computeContentBounds); 683Debug.Assert(cellStyle != null); 793Debug.Assert(cellEdited || formattedString == null); 794Debug.Assert(paint || computeContentBounds);
winforms\Managed\System\WinForms\DataGridViewTopLeftHeaderCell.cs (8)
262Debug.Assert(paint || computeContentBounds || computeErrorIconBounds); 263Debug.Assert(!paint || !computeContentBounds || !computeErrorIconBounds); 264Debug.Assert(!computeContentBounds || !computeErrorIconBounds || !paint); 265Debug.Assert(!computeErrorIconBounds || !paint || !computeContentBounds); 266Debug.Assert(cellStyle != null); 291Debug.Assert(this.ButtonState == ButtonState.Pushed); 372Debug.Assert(computeContentBounds); 588Debug.Assert(this.Owner.DataGridView.RowHeadersVisible, "if the row headers are not visible how did you get the top left header cell acc object?");
winforms\Managed\System\WinForms\DataGridViewTopRowAccessibleObject.cs (1)
156Debug.Assert(index >= 0);
winforms\Managed\System\WinForms\DataGridViewUtilities.cs (1)
434Debug.Assert(cellStyle.Alignment == DataGridViewContentAlignment.NotSet, "this is the only alignment left");
winforms\Managed\System\WinForms\DataObject.cs (84)
75Debug.WriteLineIf(CompModSwitches.DataObject.TraceVerbose, "Constructed DataObject based on IDataObject"); 77Debug.Assert(innerData != null, "You must have an innerData on all DataObjects"); 89Debug.WriteLineIf(CompModSwitches.DataObject.TraceVerbose, "Constructed DataObject based on IComDataObject"); 92Debug.Assert(innerData != null, "You must have an innerData on all DataObjects"); 103Debug.WriteLineIf(CompModSwitches.DataObject.TraceVerbose, "Constructed DataObject standalone"); 105Debug.Assert(innerData != null, "You must have an innerData on all DataObjects"); 113Debug.WriteLineIf(CompModSwitches.DataObject.TraceVerbose, "Constructed DataObject base on Object: " + data.ToString()); 124Debug.Assert(innerData != null, "You must have an innerData on all DataObjects"); 134Debug.Assert(innerData != null, "You must have an innerData on all DataObjects"); 184Debug.WriteLineIf(CompModSwitches.DataObject.TraceVerbose, "Request data: " + format + ", " + autoConvert.ToString()); 185Debug.Assert(innerData != null, "You must have an innerData on all DataObjects"); 195Debug.WriteLineIf(CompModSwitches.DataObject.TraceVerbose, "Request data: " + format); 205Debug.WriteLineIf(CompModSwitches.DataObject.TraceVerbose, "Request data: " + format.FullName); 206Debug.Assert(format != null, "Must specify a format type"); 220Debug.WriteLineIf(CompModSwitches.DataObject.TraceVerbose, "Check data: " + format.FullName); 221Debug.Assert(format != null, "Must specify a format type"); 226Debug.WriteLineIf(CompModSwitches.DataObject.TraceVerbose, " ret: " + b.ToString()); 237Debug.WriteLineIf(CompModSwitches.DataObject.TraceVerbose, "Check data: " + format + ", " + autoConvert.ToString()); 238Debug.Assert(innerData != null, "You must have an innerData on all DataObjects"); 240Debug.WriteLineIf(CompModSwitches.DataObject.TraceVerbose, " ret: " + b.ToString()); 251Debug.WriteLineIf(CompModSwitches.DataObject.TraceVerbose, "Check data: " + format); 253Debug.WriteLineIf(CompModSwitches.DataObject.TraceVerbose, " ret: " + b.ToString()); 267Debug.WriteLineIf(CompModSwitches.DataObject.TraceVerbose, "Check formats: " + autoConvert.ToString()); 268Debug.Assert(innerData != null, "You must have an innerData on all DataObjects"); 278Debug.WriteLineIf(CompModSwitches.DataObject.TraceVerbose, "Check formats:"); 655Debug.WriteLineIf(CompModSwitches.DataObject.TraceVerbose, "DAdvise"); 673Debug.WriteLineIf(CompModSwitches.DataObject.TraceVerbose, "DUnadvise"); 691Debug.WriteLineIf(CompModSwitches.DataObject.TraceVerbose, "EnumDAdvise"); 709Debug.WriteLineIf(CompModSwitches.DataObject.TraceVerbose, "EnumFormatEtc: " + dwDirection.ToString()); 731Debug.WriteLineIf(CompModSwitches.DataObject.TraceVerbose, "GetCanonicalFormatEtc"); 749Debug.WriteLineIf(CompModSwitches.DataObject.TraceVerbose, "GetData"); 797Debug.WriteLineIf(CompModSwitches.DataObject.TraceVerbose, "GetDataHere"); 816Debug.WriteLineIf(CompModSwitches.DataObject.TraceVerbose, "QueryGetData"); 824Debug.WriteLineIf(CompModSwitches.DataObject.TraceVerbose, "QueryGetData::returning S_FALSE because cfFormat == 0"); 858Debug.WriteLineIf(CompModSwitches.DataObject.TraceVerbose, "SetData"); 1170Debug.WriteLineIf(CompModSwitches.DataObject.TraceVerbose, "Set data: " + format + ", " + autoConvert.ToString() + ", " + data.ToString()); 1171Debug.Assert(innerData != null, "You must have an innerData on all DataObjects"); 1181Debug.WriteLineIf(CompModSwitches.DataObject.TraceVerbose, "Set data: " + format + ", " + data.ToString()); 1182Debug.Assert(innerData != null, "You must have an innerData on all DataObjects"); 1193Debug.WriteLineIf(CompModSwitches.DataObject.TraceVerbose, "Set data: " + format.FullName + ", " + data.ToString()); 1194Debug.Assert(innerData != null, "You must have an innerData on all DataObjects"); 1204Debug.WriteLineIf(CompModSwitches.DataObject.TraceVerbose, "Set data: " + data.ToString()); 1205Debug.Assert(innerData != null, "You must have an innerData on all DataObjects"); 1221Debug.WriteLineIf(CompModSwitches.DataObject.TraceVerbose, "FormatEnumerator: Constructed: " + parent.ToString()); 1225Debug.WriteLineIf(CompModSwitches.DataObject.TraceVerbose, "FormatEnumerator: Constructed: " + parent.ToString() + ", FORMATETC[]" + formats.Length.ToString(CultureInfo.InvariantCulture)); 1252Debug.WriteLineIf(CompModSwitches.DataObject.TraceVerbose, "FormatEnumerator: Constructed: " + parent.ToString() + ", string[]" + formats.Length.ToString(CultureInfo.InvariantCulture)); 1311Debug.WriteLineIf(CompModSwitches.DataObject.TraceVerbose, "FormatEnumerator: Next"); 1336Debug.WriteLineIf(CompModSwitches.DataObject.TraceVerbose, "FormatEnumerator: Skip"); 1345Debug.WriteLineIf(CompModSwitches.DataObject.TraceVerbose, "FormatEnumerator: Reset"); 1351Debug.WriteLineIf(CompModSwitches.DataObject.TraceVerbose, "FormatEnumerator: Clone"); 1367Debug.WriteLineIf(CompModSwitches.DataObject.TraceVerbose, "OleConverter: Constructed OleConverter"); 1534Debug.Assert(innerData != null, "You must have an innerData on all DataObjects"); 1579Debug.Assert(innerData != null, "You must have an innerData on all DataObjects"); 1682Debug.Fail(e.ToString()); 1856Debug.WriteLineIf(IntSecurity.SecurityDemand.TraceVerbose, "FileIO(" + fullPath + ") Demanded"); 1985Debug.Assert(innerData != null, "You must have an innerData on all DataObjects"); 2038Debug.Assert(innerData != null, "You must have an innerData on all DataObjects"); 2111Debug.WriteLineIf(CompModSwitches.DataObject.TraceVerbose, "DataStore: Constructed DataStore"); 2115Debug.WriteLineIf(CompModSwitches.DataObject.TraceVerbose, "DataStore: GetData: " + format + ", " + autoConvert.ToString()); 2153Debug.WriteLineIf(CompModSwitches.DataObject.TraceVerbose, "DataStore: GetData: " + format); 2158Debug.WriteLineIf(CompModSwitches.DataObject.TraceVerbose, "DataStore: GetData: " + format.FullName); 2163Debug.WriteLineIf(CompModSwitches.DataObject.TraceVerbose, "DataStore: SetData: " + format + ", " + autoConvert.ToString() + ", " + data.ToString()); 2181Debug.WriteLineIf(CompModSwitches.DataObject.TraceVerbose, "DataStore: SetData: " + format + ", " + data.ToString()); 2186Debug.WriteLineIf(CompModSwitches.DataObject.TraceVerbose, "DataStore: SetData: " + format.FullName + ", " + data.ToString()); 2191Debug.WriteLineIf(CompModSwitches.DataObject.TraceVerbose, "DataStore: SetData: " + data.ToString()); 2202Debug.WriteLineIf(CompModSwitches.DataObject.TraceVerbose, "DataStore: GetDataPresent: " + format.FullName); 2207Debug.Assert(format != null, "Null format passed in"); 2208Debug.WriteLineIf(CompModSwitches.DataObject.TraceVerbose, "DataStore: GetDataPresent: " + format + ", " + autoConvert.ToString()); 2211Debug.Assert(data != null, "data must be non-null"); 2216Debug.WriteLineIf(CompModSwitches.DataObject.TraceVerbose, "DataStore: got " + formats.Length.ToString(CultureInfo.InvariantCulture) + " formats from get formats"); 2217Debug.Assert(formats != null, "Null returned from GetFormats"); 2219Debug.Assert(formats[i] != null, "Null format inside of formats at index " + i.ToString(CultureInfo.InvariantCulture)); 2221Debug.WriteLineIf(CompModSwitches.DataObject.TraceVerbose, "DataStore: GetDataPresent: returning true"); 2225Debug.WriteLineIf(CompModSwitches.DataObject.TraceVerbose, "DataStore: GetDataPresent: returning false"); 2231Debug.WriteLineIf(CompModSwitches.DataObject.TraceVerbose, "DataStore: GetDataPresent: " + format); 2236Debug.WriteLineIf(CompModSwitches.DataObject.TraceVerbose, "DataStore: GetFormats: " + autoConvert.ToString()); 2237Debug.Assert(data != null, "data collection can't be null"); 2238Debug.Assert(data.Keys != null, "data Keys collection can't be null"); 2242Debug.Assert(baseVar != null, "Collections should never return NULL arrays!!!"); 2244Debug.WriteLineIf(CompModSwitches.DataObject.TraceVerbose, "DataStore: applying autoConvert"); 2248Debug.Assert(data[baseVar[i]] != null, "Null item in data collection with key '" + baseVar[i] + "'"); 2252Debug.Assert(cur != null, "GetMappedFormats returned null for '" + baseVar[i] + "'"); 2266Debug.WriteLineIf(CompModSwitches.DataObject.TraceVerbose, "DataStore: returing " + baseVar.Length.ToString(CultureInfo.InvariantCulture) + " formats from GetFormats"); 2270Debug.WriteLineIf(CompModSwitches.DataObject.TraceVerbose, "DataStore: GetFormats");
winforms\Managed\System\WinForms\DateTimePicker.cs (1)
291Debug.Assert(calendarFontHandleWrapper == null, "font handle out of sync with Font");
winforms\Managed\System\WinForms\Design\ComponentEditorForm.cs (6)
420Debug.Assert((newPage >= 0) && (newPage < pageSites.Length), 517Debug.Assert(activePage != -1); 558Debug.Fail(e.ToString()); 680Debug.Assert(hbrushDither == IntPtr.Zero, "Brush should not be recreated."); 688Debug.Assert(hbitmapTemp != IntPtr.Zero, 694Debug.Assert(hbrushDither != IntPtr.Zero,
winforms\Managed\System\WinForms\Design\ComponentEditorPage.cs (1)
238Debug.Assert(loading > 0, "Unbalanced Enter/ExitLoadingMode calls");
winforms\Managed\System\WinForms\Design\PropertyTab.cs (1)
50Debug.Fail("Failed to find bitmap '" + bmpName + "' for class " + GetType().FullName, ex.ToString());
winforms\Managed\System\WinForms\DomainUpDown.cs (5)
462Debug.Assert(domainItems != null, "Domain values array is null"); 463Debug.Assert(index < domainItems.Count && index >= -1, "SelectValue: index out of range"); 482Debug.Assert(domainIndex >=0 || UserEdit == true, "UserEdit should be true when domainIndex < 0 " + UserEdit); 496Debug.Assert(sorted == true, "Sorted == false"); 594Debug.Assert(!UserEdit, "UserEdit should be false");
winforms\Managed\System\WinForms\DropTarget.cs (9)
26Debug.WriteLineIf(CompModSwitches.DragDrop.TraceInfo, "DropTarget created"); 63Debug.WriteLineIf(CompModSwitches.DragDrop.TraceInfo, "OleDragEnter recieved"); 67Debug.WriteLineIf(CompModSwitches.DragDrop.TraceInfo, "\t" + (ptl.x) + "," + (ptl.y)); 68Debug.Assert(pDataObj != null, "OleDragEnter didn't give us a valid data object."); 82Debug.WriteLineIf(CompModSwitches.DragDrop.TraceInfo, "OleDragOver recieved"); 86Debug.WriteLineIf(CompModSwitches.DragDrop.TraceInfo, "\t" + (ptl.x) + "," + (ptl.y)); 94Debug.WriteLineIf(CompModSwitches.DragDrop.TraceInfo, "OleDragLeave recieved"); 99Debug.WriteLineIf(CompModSwitches.DragDrop.TraceInfo, "OleDrop recieved"); 103Debug.WriteLineIf(CompModSwitches.DragDrop.TraceInfo, "\t" + (ptl.x) + "," + (ptl.y));
winforms\Managed\System\WinForms\ErrorProvider.cs (7)
483Debug.Assert(sender == errorManager, "who else can send us messages?"); 675Debug.Assert(dsInit != null, "ErrorProvider: ISupportInitializeNotification.Initialized event received, but current DataSource does not support ISupportInitializeNotification!"); 676Debug.Assert(dsInit.IsInitialized, "ErrorProvider: DataSource sent ISupportInitializeNotification.Initialized event but before it had finished initializing."); 1008Debug.Assert(mirrordc == null, "Why is mirrordc non-null?"); 1029Debug.Assert(mirrordc == null, "Why is mirrordc non-null? Did you not call RestoreMirrorDC?"); 1100Debug.Assert(timer != null); 1506Debug.Fail("Unknown ErrorIconAlignment value");
winforms\Managed\System\WinForms\FileDialog.cs (13)
104Debug.WriteLineIf(IntSecurity.SecurityDemand.TraceVerbose, "FileDialogCustomization Demanded"); 126Debug.WriteLineIf(IntSecurity.SecurityDemand.TraceVerbose, "FileDialogCustomization Demanded"); 150Debug.WriteLineIf(IntSecurity.SecurityDemand.TraceVerbose, "FileDialogCustomization Demanded"); 202Debug.WriteLineIf(IntSecurity.SecurityDemand.TraceVerbose, "FileDialogCustomization Demanded"); 246Debug.WriteLineIf(IntSecurity.SecurityDemand.TraceVerbose, "FileIO(" + fileNames[0] + ") Demanded"); 258Debug.WriteLineIf(IntSecurity.SecurityDemand.TraceVerbose, "FileDialogCustomization Demanded"); 298Debug.WriteLineIf(IntSecurity.SecurityDemand.TraceVerbose, "FileIO(" + file + ") Demanded"); 432Debug.WriteLineIf(IntSecurity.SecurityDemand.TraceVerbose, "FileDialogCustomization Demanded"); 490Debug.WriteLineIf(IntSecurity.SecurityDemand.TraceVerbose, "FileDialogCustomization Demanded"); 560Debug.WriteLineIf(IntSecurity.SecurityDemand.TraceVerbose, "FileDialogCustomization Demanded"); 584Debug.WriteLineIf(IntSecurity.SecurityDemand.TraceVerbose, "FileDialogCustomization Demanded"); 879Debug.Assert(!extensions[j].StartsWith("."), 881Debug.Assert(currentExtension.Length == 0 || currentExtension.StartsWith("."),
winforms\Managed\System\WinForms\FileDialog_Vista.cs (1)
132System.Diagnostics.Debug.Assert(0==(UnexpectedOptions & options), "Unexpected FileDialog options");
winforms\Managed\System\WinForms\FlowLayoutPanel.cs (2)
45Debug.Assert(FlowDirection == value, "FlowDirection should be the same as we set it"); 58Debug.Assert(WrapContents == value, "WrapContents should be the same as we set it");
winforms\Managed\System\WinForms\FlowLayoutSettings.cs (2)
33Debug.Assert(FlowDirection == value, "FlowDirection should be the same as we set it"); 45Debug.Assert(WrapContents == value, "WrapContents should be the same as we set it");
winforms\Managed\System\WinForms\FolderBrowserDialog.cs (1)
134Debug.WriteLineIf(IntSecurity.SecurityDemand.TraceVerbose, "FileIO(" + selectedPath + ") Demanded");
winforms\Managed\System\WinForms\FontDialog.cs (1)
609Debug.Assert(cf.nSizeMin <= cf.nSizeMax, "min and max font sizes are the wrong way around");
winforms\Managed\System\WinForms\Form.cs (64)
278Debug.Assert(formState[FormStateAllowTransparency] == 0, "Failed to set formState[FormStateAllowTransparency]"); 279Debug.Assert(formState[FormStateBorderStyle] == (int)FormBorderStyle.Sizable, "Failed to set formState[FormStateBorderStyle]"); 280Debug.Assert(formState[FormStateTaskBar] == 1, "Failed to set formState[FormStateTaskBar]"); 281Debug.Assert(formState[FormStateControlBox] == 1, "Failed to set formState[FormStateControlBox]"); 282Debug.Assert(formState[FormStateKeyPreview] == 0, "Failed to set formState[FormStateKeyPreview]"); 283Debug.Assert(formState[FormStateLayered] == 0, "Failed to set formState[FormStateLayered]"); 284Debug.Assert(formState[FormStateMaximizeBox] == 1, "Failed to set formState[FormStateMaximizeBox]"); 285Debug.Assert(formState[FormStateMinimizeBox] == 1, "Failed to set formState[FormStateMinimizeBox]"); 286Debug.Assert(formState[FormStateHelpButton] == 0, "Failed to set formState[FormStateHelpButton]"); 287Debug.Assert(formState[FormStateStartPos] == (int)FormStartPosition.WindowsDefaultLocation, "Failed to set formState[FormStateStartPos]"); 288Debug.Assert(formState[FormStateWindowState] == (int)FormWindowState.Normal, "Failed to set formState[FormStateWindowState]"); 289Debug.Assert(formState[FormStateShowWindowOnCreate] == 0, "Failed to set formState[FormStateShowWindowOnCreate]"); 290Debug.Assert(formState[FormStateAutoScaling] == 1, "Failed to set formState[FormStateAutoScaling]"); 291Debug.Assert(formState[FormStateSetClientSize] == 0, "Failed to set formState[FormStateSetClientSize]"); 292Debug.Assert(formState[FormStateTopMost] == 0, "Failed to set formState[FormStateTopMost]"); 293Debug.Assert(formState[FormStateSWCalled] == 0, "Failed to set formState[FormStateSWCalled]"); 294Debug.Assert(formState[FormStateMdiChildMax] == 0, "Failed to set formState[FormStateMdiChildMax]"); 295Debug.Assert(formState[FormStateRenderSizeGrip] == 0, "Failed to set formState[FormStateRenderSizeGrip]"); 296Debug.Assert(formState[FormStateSizeGripStyle] == 0, "Failed to set formState[FormStateSizeGripStyle]"); 303Debug.Assert(formState[FormStateIsWindowActivated] == 0, "Failed to set formState[FormStateIsWindowActivated]"); 304Debug.Assert(formState[FormStateIsTextEmpty] == 0, "Failed to set formState[FormStateIsTextEmpty]"); 305Debug.Assert(formState[FormStateIsActive] == 0, "Failed to set formState[FormStateIsActive]"); 306Debug.Assert(formState[FormStateIconSet] == 0, "Failed to set formState[FormStateIconSet]"); 380Debug.WriteLineIf(Control.FocusTracing.TraceVerbose, "Form::set_Active - " + this.Name); 432Debug.WriteLineIf(IntSecurity.SecurityDemand.TraceVerbose, "GetParent Demanded"); 624Debug.Assert(!DesignMode, "Form designer should not allow base size set in design mode."); 670Debug.Assert(AutoSize == value, "Error detected setting Form.AutoSize."); 1420Debug.Assert(ctlClient == null, "why isn't ctlClient null"); 1425Debug.Assert(ctlClient != null, "why is ctlClient null"); 1448Debug.WriteLineIf(IntSecurity.SecurityDemand.TraceVerbose, "Checking for restricted window..."); 1449Debug.Indent(); 1461Debug.WriteLineIf(IntSecurity.SecurityDemand.TraceVerbose, "WindowAdornmentModification Demanded"); 1465Debug.WriteLineIf(IntSecurity.SecurityDemand.TraceVerbose, "Caught security exception, we are restricted..."); 1469Debug.WriteLineIf(IntSecurity.SecurityDemand.TraceVerbose, "Caught non-security exception..."); 1470Debug.Unindent(); 1475Debug.Unindent(); 1882Debug.WriteLineIf(IntSecurity.SecurityDemand.TraceVerbose, "GetParent Demanded"); 2633Debug.WriteLineIf(Control.FocusTracing.TraceVerbose, "Form::SetVisibleCore(" + value.ToString() + ") - " + this.Name); 3083Debug.WriteLineIf(IntSecurity.SecurityDemand.TraceVerbose, "ModifyFocus Demanded"); 3105Debug.WriteLineIf(IntSecurity.SecurityDemand.TraceVerbose, "ModifyFocus Demanded"); 3356Debug.WriteLineIf(CompModSwitches.RichLayout.TraceInfo, "ApplyAutoScaling... "); 3357Debug.Indent(); 3369Debug.WriteLineIf(CompModSwitches.RichLayout.TraceInfo, "base =" + baseVar); 3371Debug.WriteLineIf(CompModSwitches.RichLayout.TraceInfo, "new(f)=" + newVarF); 3373Debug.WriteLineIf(CompModSwitches.RichLayout.TraceInfo, "new(i)=" + newVar); 3381Debug.WriteLineIf(CompModSwitches.RichLayout.TraceInfo, "scale=" + percX + ", " + percY); 3389Debug.Unindent(); 4078Debug.Assert( IsHandleCreated, "Attempt to set focus to a form that has not yet created its handle." ); 5696Debug.Assert(IsRestrictedWindow, "This should only be called for restricted windows"); 5745Debug.WriteLineIf(IntSecurity.SecurityDemand.TraceVerbose, "ModifyFocus Demanded"); 5786Debug.WriteLineIf(CompModSwitches.RichLayout.TraceInfo, GetType().Name + "::ScaleCore(" + x + ", " + y + ")"); 6401Debug.Assert(cc != null); 6501Debug.Assert(IsHandleCreated, "shouldn't call when handle == 0"); 6527Debug.Assert( IsMdiContainer, "Not an MDI container!" ); 6694Debug.WriteLineIf(ToolStrip.MDIMergeDebug.TraceVerbose, "UpdateMdiControlStrip: Detected ControlBox on ActiveMDI child, adding in MDIControlStrip."); 6695Debug.WriteLineIf(ToolStrip.MDIMergeDebug.TraceVerbose && this.Menu != null, "UpdateMdiControlStrip: Bailing as we detect there's already an HMenu to do this for us."); 6705Debug.WriteLineIf(ToolStrip.MDIMergeDebug.TraceVerbose, "UpdateMdiControlStrip: built up an MDI control strip for " + ActiveMdiChildInternal.Text + " with " + MdiControlStrip.Items.Count.ToString(CultureInfo.InvariantCulture) + " items."); 6706Debug.WriteLineIf(ToolStrip.MDIMergeDebug.TraceVerbose, "UpdateMdiControlStrip: merging MDI control strip into source menustrip - items before: " + sourceMenuStrip.Items.Count.ToString(CultureInfo.InvariantCulture)); 6708Debug.WriteLineIf(ToolStrip.MDIMergeDebug.TraceVerbose, "UpdateMdiControlStrip: merging MDI control strip into source menustrip - items after: " + sourceMenuStrip.Items.Count.ToString(CultureInfo.InvariantCulture)); 7282Debug.Assert(Properties.GetObject(PropFormMdiParent) != null, "how is formMdiParent null?"); 7283Debug.Assert(IsHandleCreated, "how is handle 0?"); 7623Debug.Assert(NativeMethods.Util.SignedLOWORD(m.WParam) == NativeMethods.Util.SignedHIWORD(m.WParam), "Non-square pixels!"); 7753Debug.Assert(lParam != IntPtr.Zero); 7889Debug.Fail("TTM_ADDTOOL failed for security tip");
winforms\Managed\System\WinForms\GDI\WindowsGraphicsWrapper.cs (2)
104Debug.Assert( this.wg != null, "WindowsGraphics is null." ); 122Debug.Assert( disposing, "We should always dispose of this guy and not let GC do it for us!" );
winforms\Managed\System\WinForms\GroupBoxRenderer.cs (1)
211Debug.Assert(textBounds.Y <= boxBounds.Y, "if text below box, need to render area of box above text");
winforms\Managed\System\WinForms\Help.cs (20)
127Debug.WriteLineIf(Help.WindowsFormsHelpTrace.TraceVerbose, "Help:: ShowHelp"); 146Debug.WriteLineIf(Help.WindowsFormsHelpTrace.TraceVerbose, "Help:: ShowHelpIndex"); 158Debug.WriteLineIf(Help.WindowsFormsHelpTrace.TraceVerbose, "Help:: ShowPopup"); 191Debug.WriteLineIf(Help.WindowsFormsHelpTrace.TraceVerbose, "Help:: ShowHTML10Help:: " + url + ", " + command.ToString("G") + ", " + param); 253Debug.Fail("Cannot handle HTML parameter of type: " + htmlParam.GetType()); 279Debug.WriteLineIf(Help.WindowsFormsHelpTrace.TraceVerbose, "Help:: ShowHTMLHelp:: " + url + ", " + command.ToString("G") + ", " + param); 290Debug.WriteLineIf(IntSecurity.SecurityDemand.TraceVerbose, "WebPermission Demanded"); 294Debug.WriteLineIf(IntSecurity.SecurityDemand.TraceVerbose, "UnmanagedCode Demanded"); 322Debug.WriteLineIf(Help.WindowsFormsHelpTrace.TraceVerbose, "\tExecuting '" + file.ToString() + "'"); 327Debug.WriteLineIf(Help.WindowsFormsHelpTrace.TraceVerbose, "Help:: Resolve " + partialUri); 328Debug.Indent(); 348Debug.WriteLineIf(Help.WindowsFormsHelpTrace.TraceVerbose, "file, check for existence"); 366Debug.WriteLineIf(Help.WindowsFormsHelpTrace.TraceVerbose, "try appbase relative"); 385Debug.WriteLineIf(Help.WindowsFormsHelpTrace.TraceVerbose, "file, check for existence"); 402Debug.Unindent(); 409Debug.WriteLineIf(Help.WindowsFormsHelpTrace.TraceVerbose, "Help:: GetHelpFileType " + url); 412Debug.WriteLineIf(Help.WindowsFormsHelpTrace.TraceVerbose, "\tnull, must be Html File"); 419Debug.WriteLineIf(Help.WindowsFormsHelpTrace.TraceVerbose, "\tfile"); 423Debug.WriteLineIf(Help.WindowsFormsHelpTrace.TraceVerbose, "\tchm or col, HtmlHelp 1.0 file"); 428Debug.WriteLineIf(Help.WindowsFormsHelpTrace.TraceVerbose, "\tnot file, or odd extension, but be HTML");
winforms\Managed\System\WinForms\HelpProvider.cs (4)
197Debug.WriteLineIf(Help.WindowsFormsHelpTrace.TraceVerbose, "HelpProvider:: Mouse down w/ helpstring"); 208Debug.WriteLineIf(Help.WindowsFormsHelpTrace.TraceVerbose, "HelpProvider:: F1 help"); 226Debug.WriteLineIf(Help.WindowsFormsHelpTrace.TraceVerbose, "HelpProvider:: back to helpstring"); 237Debug.WriteLineIf(Help.WindowsFormsHelpTrace.TraceVerbose, "HelpProvider:: contents");
winforms\Managed\System\WinForms\HtmlDocument.cs (2)
48Debug.Assert(this.NativeHtmlDocument2 != null, "The document should implement IHtmlDocument2"); 933Debug.Assert(success, "failed to add event");
winforms\Managed\System\WinForms\HtmlElement.cs (2)
55Debug.Assert(this.NativeHtmlElement != null, "The element object should implement IHTMLElement"); 1464Debug.Assert(success, "failed to add event");
winforms\Managed\System\WinForms\HtmlElementCollection.cs (1)
41Debug.Assert(this.NativeHtmlElementCollection != null, "The element collection object should implement IHTMLElementCollection");
winforms\Managed\System\WinForms\HtmlElementEventArgs.cs (1)
29Debug.Assert(this.NativeHTMLEventObj != null, "The event object should implement IHTMLEventObj");
winforms\Managed\System\WinForms\HtmlHistory.cs (1)
36Debug.Assert(this.NativeOmHistory != null, "The history object should implement IOmHistory");
winforms\Managed\System\WinForms\HtmlShimManager.cs (2)
126Debug.Assert(addedShim != null, "Why are we calling this with a null shim?"); 142Debug.Assert(unloadedWindow != null, "Why are we calling this with a null window?");
winforms\Managed\System\WinForms\HtmlWindow.cs (2)
43Debug.Assert(this.NativeHtmlWindow != null, "The window object should implement IHTMLWindow2"); 701Debug.Assert(success, "failed to add event");
winforms\Managed\System\WinForms\HtmlWindowCollection.cs (1)
33Debug.Assert(this.NativeHTMLFramesCollection2 != null, "The window collection object should implement IHTMLFramesCollection2");
winforms\Managed\System\WinForms\ImageList.cs (13)
339Debug.Fail("Unknown color depth"); 482Debug.Assert(HandleCreated, "Calling AddIconToHandle when there is no handle"); 496Debug.Assert(HandleCreated, "Calling AddToHandle when there is no handle"); 514Debug.Assert(nativeImageList == null, "Handle already created, this may be a source of temporary GDI leaks"); 534Debug.Fail("Unknown color depth in ImageList"); 553Debug.Assert(originals != null, "Handle not yet created, yet original images are gone"); 978Debug.Assert(image != null, "image is null"); 986Debug.Assert(customTransparentColor.Equals(Color.Transparent), 1058Debug.Assert(owner != null, "ImageCollection has no owner (ImageList)"); 1059Debug.Assert( (owner.originals == null) == (owner.HandleCreated), " Either we should have the original images, or the handle should be created"); 1070Debug.Assert(owner != null, "ImageCollection has no owner (ImageList)"); 1235Debug.Assert((this.Count == imageInfoCollection.Count), "The count of these two collections should be equal."); 1252Debug.Assert((this.Count == imageInfoCollection.Count), "The count of these two collections should be equal.");
winforms\Managed\System\WinForms\ImageListStreamer.cs (1)
138Debug.Assert(idxOffset + compressedIdx == output.Length, "RLE Compression failure in ImageListStreamer -- didn't fill array");
winforms\Managed\System\WinForms\InputLanguage.cs (2)
239Debug.Assert(encoding.Length == 8, "unexpected key in registry: hklm\\SYSTEM\\CurrentControlSet\\Control\\Keyboard Layouts\\" + encoding); 264Debug.Assert(encoding.Length == 8, "unexpected key in registry: hklm\\SYSTEM\\CurrentControlSet\\Control\\Keyboard Layouts\\" + encoding);
winforms\Managed\System\WinForms\KeysConverter.cs (2)
95Debug.Assert(displayOrder == null); 105Debug.Assert(keyNames == null);
winforms\Managed\System\WinForms\Label.cs (2)
1684Debug.Assert(!AutoSize || (AutoSize && !SelfSizing) || Size == PreferredSize, 1818set { Debug.Assert(false, "Setting the image list in this class is not supported");}
winforms\Managed\System\WinForms\Layout\CommonProperties.cs (31)
176Debug.Assert(value != GetAutoSize(element), "PERF: Caller should guard against setting AutoSize to original value."); 186Debug.Assert(GetAutoSize(element) == value, "Error detected setting AutoSize."); 192Debug.Assert(value != GetMargin(element), "PERF: Caller should guard against setting Margin to original value."); 196Debug.Assert(GetMargin(element) == value, "Error detected setting Margin."); 206Debug.Assert(value != GetMaximumSize(element, new Size(-7109, -7107)), 221Debug.Assert(GetMaximumSize(element, new Size(-7109, -7107)) == value, "Error detected setting MaximumSize."); 227Debug.Assert(value != GetMinimumSize(element, new Size(-7109, -7107)), 241Debug.Assert(GetMinimumSize(element, new Size(-7109, -7107)) == value, "Error detected setting MinimumSize."); 249Debug.Assert(value != GetPadding(element, new Padding(-7105)), 256Debug.Assert(GetPadding(element, new Padding(-7105)) == value, "Error detected setting Padding."); 325Debug.Assert(xGetPreferredSizeCache(element) == Size.Empty, "Error detected in xClearPreferredSizeCache."); 360Debug.Assert(value == Size.Empty || value != xGetPreferredSizeCache(element), "PERF: Caller should guard against setting PreferredSizeCache to original value."); 365Debug.Assert(xGetPreferredSizeCache(element) == value, "Error detected in xGetPreferredSizeCache."); 390Debug.Assert( 406Debug.Assert( 421Debug.Assert(((xGetDock(element) != DockStyle.None) && element.ParticipatesInLayout) == result, 475Debug.Assert(value != GetSelfAutoSizeInDefaultLayout(element), "PERF: Caller should guard against setting AutoSize to original value."); 481Debug.Assert(GetSelfAutoSizeInDefaultLayout(element) == value, "Error detected setting AutoSize."); 496Debug.Assert(mode == DockAnchorMode.Anchor || value == DefaultAnchor, "xGetAnchor needs to return DefaultAnchor when docked."); 510Debug.Assert(result == (GetAutoSize(element) && xGetDock(element) == DockStyle.None), 526Debug.Assert(ClientUtils.IsEnumValid(value, (int)value, (int)DockStyle.None, (int)DockStyle.Fill), "Illegal value returned form xGetDock."); 528Debug.Assert(mode == DockAnchorMode.Dock || value == DefaultDock, 540Debug.Assert(value != xGetAnchor(element), "PERF: Caller should guard against setting Anchor to original value."); 550Debug.Assert(xGetAnchor(element) == value, "Error detected setting Anchor."); 551Debug.Assert(GetLayoutState(element)[_dockModeSection] == (int) DockAnchorMode.Anchor, 559Debug.Assert(value != xGetDock(element), "PERF: Caller should guard against setting Dock to original value."); 560Debug.Assert(ClientUtils.IsEnumValid(value, (int)value, (int)DockStyle.None, (int)DockStyle.Fill), "Illegal value passed to xSetDock."); 569Debug.Assert(xGetDock(element) == value, "Error detected setting Dock."); 570Debug.Assert((GetLayoutState(element)[_dockModeSection] == (int) DockAnchorMode.Dock) 609Debug.Assert(value != GetFlowBreak(element), "PERF: Caller should guard against setting FlowBreak to original value."); 617Debug.Assert(GetFlowBreak(element) == value, "Error detected setitng SetFlowBreak.");
winforms\Managed\System\WinForms\Layout\DockAndAnchorLayout.cs (39)
78Debug.Assert((CommonProperties.GetAutoSizeMode(element) == AutoSizeMode.GrowAndShrink || newSize.Height >= oldBounds.Height && newSize.Width >= oldBounds.Width), 93Debug.Assert((CommonProperties.GetAutoSizeMode(element) == AutoSizeMode.GrowAndShrink || newBounds.Contains(oldBounds)), "How did we resize in such a way we no longer contain our old bounds?"); 120Debug.Assert((growthDirection & GrowthDirection.Left) == GrowthDirection.None 123Debug.Assert((growthDirection & GrowthDirection.Upward) == GrowthDirection.None 132Debug.WriteLineIf(CompModSwitches.RichLayout.TraceInfo, "\t\t'" + element + "' is anchored at " + GetCachedBounds(element).ToString()); 141Debug.WriteLineIf(CompModSwitches.RichLayout.TraceInfo, "\t\t...anchor dim (l,t,r,b) {" 151Debug.WriteLineIf(CompModSwitches.RichLayout.TraceInfo, "\t\t...adjusting right"); 155Debug.WriteLineIf(CompModSwitches.RichLayout.TraceInfo, "\t\t...adjusting left"); 160Debug.WriteLineIf(CompModSwitches.RichLayout.TraceInfo, "\t\t...adjusting left & right"); 166Debug.WriteLineIf(CompModSwitches.RichLayout.TraceInfo, "\t\t...adjusting bottom"); 170Debug.WriteLineIf(CompModSwitches.RichLayout.TraceInfo, "\t\t...adjusting top"); 175Debug.WriteLineIf(CompModSwitches.RichLayout.TraceInfo, "\t\t...adjusting top & bottom"); 219Debug.WriteLineIf(CompModSwitches.RichLayout.TraceInfo, "\t\t...new anchor dim (l,t,r,b) {" 230Debug.WriteLineIf(CompModSwitches.RichLayout.TraceInfo, "\tAnchor Processing"); 231Debug.WriteLineIf(CompModSwitches.RichLayout.TraceInfo, "\t\tdisplayRect: " + container.DisplayRectangle.ToString()); 246Debug.Assert(GetAnchorInfo(element) != null, "AnchorInfo should be initialized before LayoutAnchorControls()."); 253Debug.WriteLineIf(CompModSwitches.RichLayout.TraceInfo, "\tDock Processing"); 254Debug.Assert(!HasCachedBounds(container), 270Debug.Assert(element.Bounds == GetCachedBounds(element), "Why do we have cachedBounds for a docked element?"); 321Debug.Assert(mdiClient == null, "How did we end up with multiple MdiClients?"); 332Debug.Fail("Unsupported value for dock."); 398Debug.Assert((measureOnly && (newSize.Width >= remainingSize.Width)) || (newSize.Width == remainingSize.Width), 413Debug.Assert((measureOnly && (newSize.Height >= remainingSize.Height)) || (newSize.Height == remainingSize.Height), 448Debug.Assert((desiredSize.Width >= 0 && desiredSize.Height >= 0), "Error detected in xGetDockSize: Element size was negative."); 489Debug.WriteLineIf(CompModSwitches.RichLayout.TraceInfo, "\tanchor : " + anchor.ToString()); 490Debug.WriteLineIf(CompModSwitches.RichLayout.TraceInfo, "\tdock : " + dock.ToString()); 539Debug.Assert(!HasCachedBounds(element.Container), 548Debug.WriteLineIf(CompModSwitches.RichLayout.TraceInfo, "Update anchor info"); 549Debug.Indent(); 550Debug.WriteLineIf(CompModSwitches.RichLayout.TraceInfo, element.Container == null ? "No parent" : "Parent"); 569Debug.WriteLineIf(CompModSwitches.RichLayout.TraceInfo, "Parent displayRectangle" + parentDisplayRect); 619Debug.WriteLineIf(CompModSwitches.RichLayout.TraceInfo, "anchor info (l,t,r,b): (" + anchorInfo.Left + ", " + anchorInfo.Top + ", " + anchorInfo.Right + ", " + anchorInfo.Bottom + ")"); 621Debug.Unindent(); 657Debug.Assert(GetAnchor(element) == value, "Error setting Anchor value."); 665Debug.Assert(!HasCachedBounds(element.Container), 697Debug.Assert(GetDock(element) == value, "Error setting Dock value."); 754Debug.Assert(element.Container == container,"We have non-children in our containers cached bounds store."); 796Debug.Assert(specified == BoundsSpecified.None || GetCachedBounds(element) == element.Bounds, 805Debug.Assert(!HasCachedBounds(container),
winforms\Managed\System\WinForms\Layout\FlowLayout.cs (6)
125Debug.Assert(wrapContents == true || breakIndex == container.Children.Count, 152Debug.Assert(dummy == endIndex, "EndIndex / BreakIndex mismatch."); 164Debug.Assert(startIndex < endIndex, "Loop should be in forward Z-order."); 284Debug.Assert(GetWrapContents(container) == value, "GetWrapContents should return the same value as we set"); 298Debug.Assert(GetFlowDirection(container) == value, "GetFlowDirection should return the same value as we set"); 560Debug.Assert(Element == value, "Element should be the same as we set it to");
winforms\Managed\System\WinForms\Layout\LayoutUtils.cs (25)
96Debug.Assert((topBits != 0 && (middleBits == 0 && bottomBits == 0)) 106Debug.Assert(result >= 0x00 && result <=0x0A, "ContentAlignmentToIndex result out of range."); 107Debug.Assert(result != 0x00 || alignment == ContentAlignment.TopLeft, "Error detected in ContentAlignmentToIndex."); 108Debug.Assert(result != 0x01 || alignment == ContentAlignment.TopCenter, "Error detected in ContentAlignmentToIndex."); 109Debug.Assert(result != 0x02 || alignment == ContentAlignment.TopRight, "Error detected in ContentAlignmentToIndex."); 110Debug.Assert(result != 0x03, "Error detected in ContentAlignmentToIndex."); 111Debug.Assert(result != 0x04 || alignment == ContentAlignment.MiddleLeft, "Error detected in ContentAlignmentToIndex."); 112Debug.Assert(result != 0x05 || alignment == ContentAlignment.MiddleCenter, "Error detected in ContentAlignmentToIndex."); 113Debug.Assert(result != 0x06 || alignment == ContentAlignment.MiddleRight, "Error detected in ContentAlignmentToIndex."); 114Debug.Assert(result != 0x07, "Error detected in ContentAlignmentToIndex."); 115Debug.Assert(result != 0x08 || alignment == ContentAlignment.BottomLeft, "Error detected in ContentAlignmentToIndex."); 116Debug.Assert(result != 0x09 || alignment == ContentAlignment.BottomCenter, "Error detected in ContentAlignmentToIndex."); 117Debug.Assert(result != 0x0A || alignment == ContentAlignment.BottomRight, "Error detected in ContentAlignmentToIndex."); 124Debug.Assert(threeBitFlag >= 0x00 && threeBitFlag <= 0x04 && threeBitFlag != 0x03, "threeBitFlag out of range."); 126Debug.Assert((result & 0x03) == result, "Result out of range."); 415Debug.Assert(align != ContentAlignment.MiddleCenter, "Result is ambiguous with an alignment of MiddleCenter."); 460Debug.Fail("Unsupported value for region1Align."); 464Debug.Assert(Rectangle.Union(region1, region2) == bounds, 472Debug.Assert(region1.Right == region2.Left, "Adjacency error."); 477Debug.Assert(region2.Right == region1.Left, "Adjacency error."); 482Debug.Assert(region1.Bottom == region2.Top, "Adjacency error."); 487Debug.Assert(region2.Bottom == region1.Top, "Adjacency error."); 492Debug.Fail("Unsupported value for region1Align."); 495Debug.Assert(Rectangle.Union(region1, region2) == bounds, "region1 and region2 do not add up to bounds."); 734Debug.Assert(elementCausingLayout != null, "LayoutTransaction.DoLayout - elementCausingLayout is null, no layout performed - did you mix up your parameters?");
winforms\Managed\System\WinForms\Layout\TableLayout.cs (29)
395Debug.Assert(maxColumns > 0, "maxColumn must be positive"); 509Debug.Assert(numRows <= maxRows, "number of rows allocated shouldn't exceed max number of rows"); 510Debug.Assert(numColumns <= maxColumns, "number of columns allocated shouldn't exceed max number of columns"); 564Debug.Assert(fixedLayoutInfo.IsAbsolutelyPositioned, "should only check for those elements which are absolutely positioned"); 876Debug.Assert(min <= max, "Error computing min/max strip size. (Min expected to be less than max)."); 1010Debug.Assert((strip.MinSize == style.Size), "absolutely sized strip's size should be set before we call ApplyStyles"); 1019Debug.Assert(style.SizeType == SizeType.AutoSize, "Unsupported SizeType."); 1145Debug.Assert((dontHonorConstraint || (usedSpace == SumStrips(strips, 0, strips.Length))), "Error computing usedSpace."); 1175Debug.Assert(currentRow <= layoutInfo.RowStart, "RowStart should increase in forward Z-order."); 1185Debug.Assert(currentCol <= layoutInfo.ColumnStart, "ColumnStart should increase in forward Z-order."); 1285Debug.Fail("Why are we here when child or container is null?"); 1318Debug.Assert(GetLayoutInfo(element) == value, "GetLayoutInfo should return the same value as we set it to"); 1531Debug.Assert(_cols.Length != value.Length, "PERF: should not allocate strips, we've already got an array"); 1543Debug.Assert(_rows.Length != value.Length, "PERF: should not allocate strips, we've already got an array"); 1588Debug.Assert(ChildInfoValid, "Fetching invalid information"); 1596Debug.Assert(ChildInfoValid, "Fetching invalid information"); 1606Debug.Assert(ChildInfoValid, "Fetching invalid information"); 1720Debug.Assert(ChildInfoValid, "Fetched invalid information"); 1941Debug.Assert(!IsReserved(column, rowOffset), "we should not be reserving already reserved space."); 1955Debug.Assert(IsReserved(column, rowOffset), "IsReserved/Reserved mismatch."); 2089Debug.Assert(!cellsOccupied1.IntersectsWith(cellsOccupied2), "controls overlap in the same cell"); 2093Debug.Assert(containerInfo.ColumnStyles.Count >= layoutInfo1.ColumnStart + layoutInfo1.ColumnSpan, "length of column style too short"); 2094Debug.Assert(containerInfo.ColumnStyles.Count >= layoutInfo1.ColumnStart + layoutInfo2.ColumnSpan, "length of column style too short"); 2096Debug.Assert(containerInfo.ColumnStyles[k].SizeType == SizeType.Absolute, "column " + k + " is not absolutely sized"); 2099Debug.Assert(containerInfo.ColumnStyles[k].SizeType == SizeType.Absolute, "column " + k + " is not absolutely sized"); 2106Debug.Assert(containerInfo.RowStyles.Count >= layoutInfo1.RowStart + layoutInfo1.RowSpan, "length of row style too short"); 2107Debug.Assert(containerInfo.RowStyles.Count >= layoutInfo2.RowStart + layoutInfo2.RowSpan, "length of row style too short"); 2109Debug.Assert(containerInfo.RowStyles[k].SizeType == SizeType.Absolute, "column " + k + " is not absolutely sized"); 2112Debug.Assert(containerInfo.RowStyles[k].SizeType == SizeType.Absolute, "column " + k + " is not absolutely sized");
winforms\Managed\System\WinForms\LinkLabel.cs (8)
599Debug.Assert(text != null, "string should not be null"); 673Debug.Assert(regionIndex == (textRegions.Length - 1), "Failed to consume all link label visual regions"); 1379Debug.Assert(g != null, "Must pass valid graphics"); 1380Debug.Assert(foreBrush != null, "Must pass valid foreBrush"); 1381Debug.Assert(linkBrush != null, "Must pass valid linkBrush"); 1459Debug.Assert(finalrect != RectangleF.Empty, "finalrect should be initialized"); 1896Debug.Assert( CanUseTextRenderer || base.UseCompatibleTextRendering, "Using GDI text rendering when CanUseTextRenderer reported false." ); 2625Debug.Assert(link1 != null && link2 != null, "Null objects sent for comparison");
winforms\Managed\System\WinForms\ListBindingConverter.cs (1)
156Debug.Assert(ctor != null, "Failed to find Binding ctor for types!");
winforms\Managed\System\WinForms\ListBox.cs (12)
1582Debug.Assert(IsHandleCreated, "Shouldn't be calling Native methods before the handle is created."); 1606Debug.Assert(IsHandleCreated, "Shouldn't be calling Native methods before the handle is created."); 1625Debug.Assert(IsHandleCreated, "Shouldn't be calling Native methods before the handle is created."); 1642Debug.Assert(insertIndex == index, "NativeListBox inserted at " + insertIndex + " not the requested index of " + index); 1650Debug.Assert(IsHandleCreated, "Shouldn't be calling Native methods before the handle is created."); 1668Debug.Assert(IsHandleCreated, "Should only call Native methods after the handle has been created"); 1669Debug.Assert(selectionMode != SelectionMode.None, "Guard against setting selection for None selection mode outside this code."); 1685Debug.Assert(IsHandleCreated, "Should only call native methods if handle is created"); 2583Debug.Assert(lastMask > mask, "We have overflowed our state mask."); 3073Debug.Assert(index >= 0 && index <= Count, "Wrong index for insert"); 4435Debug.Assert(owner != null, $"{nameof(owner)} should not be null"); 4436Debug.Assert(childId > 0, $"{nameof(childId)} has unexpected value");
winforms\Managed\System\WinForms\ListControl.cs (3)
730Debug.Assert(sender == this.dataSource, "how can we get dispose notification for anything other than our dataSource?"); 736Debug.Assert(dsInit != null, "ListControl: ISupportInitializeNotification.Initialized event received, but current DataSource does not support ISupportInitializeNotification!"); 737Debug.Assert(dsInit.IsInitialized, "ListControl: DataSource sent ISupportInitializeNotification.Initialized event but before it had finished initializing.");
winforms\Managed\System\WinForms\ListManagerBindingsCollection.cs (1)
30Debug.Assert(bindingManagerBase != null, "How could a listmanagerbindingscollection not have a bindingManagerBase associated with it!");
winforms\Managed\System\WinForms\ListView.cs (73)
863Debug.Assert(!this.listViewState[LISTVIEWSTATE_flipViewToLargeIconAndSmallIcon] || this.View == View.SmallIcon, "we need this bit only in SmallIcon view"); 864Debug.Assert(!this.listViewState[LISTVIEWSTATE_flipViewToLargeIconAndSmallIcon] || this.ComctlSupportsVisualStyles, "we need this bit only when loading ComCtl 6.0"); 870Debug.Assert(!value || this.View == View.SmallIcon, "we need this bit only in SmallIcon view"); 871Debug.Assert(!value || this.ComctlSupportsVisualStyles, "we need this bit only when loading ComCtl 6.0"); 1664Debug.Assert(retval, "LVM_SETTILEVIEWINFO failed"); 2379Debug.Assert(listItemSorter != null, "null sorter!"); 2687Debug.Assert(item != null, "Item was null in ITEMPREPAINT"); 2872Debug.Fail("Exception occurred attempting to setup custom draw. Disabling custom draw for this control", e.ToString()); 2993Debug.Assert(fi.Exists, "who deleted our temp file?"); 3006Debug.Assert(fi.Exists, "who deleted our temp file?"); 3145Debug.Assert(false, "these are all the search directions"); 3231Debug.Assert(this.BackgroundImage != null, "we need to generate random numbers only when saving the background image to disk"); 3272Debug.Assert(item.listView == this, "Can't GetDisplayIndex if the list item doesn't belong to us"); 3273Debug.Assert(item.ID != -1, "ListViewItem has no ID yet"); 3277Debug.Assert(listItemsArray == null, "listItemsArray not null, even though handle created"); 3292Debug.Assert(displayIndex != -1, "This item is in the list view -- why can't we find a display index for it?"); 3298Debug.Assert(listItemsArray != null, "listItemsArray is null, but the handle isn't created"); 3394Debug.Assert(IsHandleCreated, "How did we add items without a handle?"); 3698Debug.Assert(this.groups != null && this.groups.Count > 0, "this method should be used only when the user adds a group, not when we add our own DefaultGroup"); 3699Debug.Assert(group != this.DefaultGroup, "this method should be used only when the user adds a group, not when we add our own DefaultGroup"); 3736Debug.Assert(IsHandleCreated,"InsertGroupNative precondition: list-view handle must be created"); 3737Debug.Assert(group == DefaultGroup || this.Groups.Contains(group),"Make sure ListView.Groups contains this group before adding the native LVGROUP. Otherwise, custom-drawing may break."); 3744Debug.Assert(retval != -1,"Failed to insert group"); 3783Debug.Assert(itemList != null, "In Begin/EndUpdate with no delayed array!"); 3811Debug.Assert(!listItemsTable.ContainsKey(itemID), "internal hash table inconsistent -- inserting item, but it's already in the hash table"); 3820Debug.Assert(listItemsArray != null, "listItemsArray is null, but the handle isn't created"); 3828Debug.Assert(listItemsArray == null, "listItemsArray not null, even though handle created"); 3845Debug.Assert(!this.FlipViewToLargeIconAndSmallIcon, "if we added even 1 item then we should have been done w/ FlipViewToLargeIconAndSmallIcon"); 3858Debug.Assert(IsHandleCreated, "InsertItemsNative precondition: list-view handle must be created"); 3884Debug.Assert(this.Items.Contains(li), "Make sure ListView.Items contains this item before adding the native LVITEM. Otherwise, custom-drawing may break."); 4397Debug.Assert(listItemsArray == null, "listItemsArray not null, even though handle created"); 4700Debug.Assert(retval != 0); 4759Debug.Assert(IsHandleCreated,"RemoveGroupNative precondition: list-view handle must be created"); 4760Debug.Assert(ComctlSupportsVisualStyles, "we should have checked this already"); 4762Debug.Assert(retval != -1,"Failed to remove group"); 4871Debug.Assert((mask & ~(NativeMethods.LVCF_FMT | NativeMethods.LVCF_TEXT | NativeMethods.LVCF_IMAGE)) == 0, "Unsupported mask in setColumnInfo"); 5001Debug.Assert(this.savedCheckedItems.Contains(item), "somehow we lost track of one item"); 5081Debug.Assert(IsHandleCreated, "How did we add items without a handle?"); 5093Debug.Assert(index == -1 || this.IsHandleCreated, "How did we add items without a handle?"); 5115Debug.Assert(IsHandleCreated, "SetItemText with no handle"); 5307Debug.Assert(IsHandleCreated,"UpdateGroupNative precondition: list-view handle must be created"); 5308Debug.Assert(ComctlSupportsVisualStyles, "we should have checked this already"); 5317Debug.Assert(retval != -1, "Failed to set group info"); 5334Debug.Assert(retval != -1, "Error enabling group view"); 5340Debug.Assert(ComctlSupportsVisualStyles, "this function works only when ComCtl 6.0 and higher is loaded"); 5341Debug.Assert(this.viewStyle == View.Tile, "this function should be called only in Tile view"); 5353Debug.Assert(retval,"LVM_SETTILEVIEWINFO failed"); 5512Debug.Fail("Exception occurred attempting to setup header custom draw. Disabling custom draw for the column header", e.ToString()); 5628Debug.Assert(this.listViewState[LISTVIEWSTATE_headerControlTracking], "HDN_ENDTRACK and HDN_BEGINTRACK are out of sync..."); 7020Debug.Assert(owner.savedSelectedItems != null || count == 0, "if the count of selectedItems is greater than 0 then the selectedItems should have been saved by now"); 7049Debug.Assert(fidx != -1, "Invalid index returned from LVM_GETNEXTITEM"); 7055Debug.Assert(owner.savedSelectedItems != null, "Null selected items collection"); 7391Debug.Assert(fidx != -1, "Invalid index returned from LVM_GETNEXTITEM"); 7397Debug.Assert(owner.savedSelectedItems != null, "Null selected items collection"); 8212Debug.Assert(columnCount >= 1, "Column mismatch"); 8311Debug.Assert(innerList != null, "Can't pass in null innerList"); 8871Debug.Assert(owner.listItemsArray == null, "listItemsArray not null, even though handle created"); 8875Debug.Assert(owner.listItemsArray != null, "listItemsArray is null, but the handle isn't created"); 8902Debug.Assert(!this.owner.FlipViewToLargeIconAndSmallIcon || this.Count == 0, "the FlipView... bit is turned off after adding 1 item."); 8935Debug.Assert(!this.owner.FlipViewToLargeIconAndSmallIcon || this.Count == 0, "the FlipView... bit is turned off after adding 1 item."); 8978Debug.Assert(!owner.VirtualMode, "in virtual mode, this method does not make any sense"); 9006Debug.Assert(item != null, "Failed to get item at index " + i.ToString(CultureInfo.InvariantCulture)); 9023Debug.Assert(owner.listItemsArray == null, "listItemsArray not null, even though handle created"); 9034Debug.Assert(!this.owner.FlipViewToLargeIconAndSmallIcon, "we only set this when comctl 6.0 is loaded"); 9051Debug.Assert(owner.listItemsArray != null, "listItemsArray is null, but the handle isn't created"); 9072Debug.Assert(owner.listItemsArray == null, "listItemsArray not null, even though handle created"); 9076Debug.Assert(owner.listItemsArray != null, "listItemsArray is null, but the handle isn't created"); 9098Debug.Assert(!this.owner.FlipViewToLargeIconAndSmallIcon || this.Count == 0, "the FlipView... bit is turned off after adding 1 item."); 9119Debug.Assert(!owner.VirtualMode, "in virtual mode, this function does not make any sense"); 9131Debug.Assert(!this.owner.FlipViewToLargeIconAndSmallIcon || this.Count == 0, "the FlipView... bit is turned off after adding 1 item."); 9150Debug.Assert(!this.owner.FlipViewToLargeIconAndSmallIcon || this.Count == 0, "the FlipView... bit is turned off after adding 1 item."); 9162Debug.Assert(owner.listItemsArray == null, "listItemsArray not null, even though handle created"); 9171Debug.Assert(owner.listItemsArray != null, "listItemsArray is null, but the handle isn't created");
winforms\Managed\System\WinForms\ListViewGroup.cs (1)
620Debug.Assert(listView.IsHandleCreated, "MoveGroupItems pre-condition: listView handle must be created");
winforms\Managed\System\WinForms\ListViewInsertionMark.cs (1)
133Debug.Assert(listView.IsHandleCreated, "ApplySavedState Precondition: List-view handle must be created");
winforms\Managed\System\WinForms\ListViewItem.cs (12)
96set { Debug.Assert(false, "We should never set the image list"); } 507Debug.Assert(this.group == value, "BUG: group member variable wasn't updated!"); 1041Debug.Fail("we handled all the 4 directions"); 1085Debug.Assert(this.listView == null || !this.listView.VirtualMode, "ListViewItem::Host can't be used w/ a virtual item"); 1086Debug.Assert(parent == null || !parent.VirtualMode, "ListViewItem::Host can't be used w/ a virtual list"); 1102Debug.Assert(this.listView != null, "This method is used only when items are parented in a list view"); 1103Debug.Assert(!this.listView.VirtualMode, "we need to update the group only when the user specifies the list view items in localizable forms"); 1127Debug.Assert(listView.IsHandleCreated, "Should only invoke UpdateStateToListView when handle is created."); 1160Debug.Assert(!updateOwner || listView.SendMessage(NativeMethods.LVM_ISGROUPVIEWENABLED, 0, 0) != IntPtr.Zero, "Groups not enabled"); 1161Debug.Assert(!updateOwner || listView.SendMessage(NativeMethods.LVM_HASGROUP, lvItem.iGroupId, 0) != IntPtr.Zero, "Doesn't contain group id: " + lvItem.iGroupId.ToString(CultureInfo.InvariantCulture)); 1346Debug.Assert(listView != null && listView.VirtualMode, "ListViewItem::SetItemIndex should be used only when the list is virtual"); 1347Debug.Assert(index > -1, "can't set the index on a virtual list view item to -1");
winforms\Managed\System\WinForms\MaskedTextBox.cs (24)
166Debug.Assert(maskedTextProvider != null, "Initializing from a null MaskProvider ref."); 630Debug.Fail("Invalid InsertKeyMode. This code path should have never been executed."); 1217Debug.Fail("Could not get IME input context."); 1389Debug.Assert( !this.flagState[IS_NULL_MASK], "This method must be called when a Mask is provided." ); 1704Debug.Assert( !this.flagState[IS_NULL_MASK], "This method must be called when a Mask is provided." ); 1705Debug.Assert( keyCode == Keys.Delete || keyCode == Keys.Back, "Delete called with keyCode == " + keyCode.ToString() ); 1706Debug.Assert( startPosition >= 0 && ((startPosition + selectionLen) <= this.maskedTextProvider.Length), "Invalid position range." ); 1905Debug.Assert( !this.flagState[IS_NULL_MASK], "This method must be called when a Mask is provided." ); 1983Debug.Assert( !this.flagState[IS_NULL_MASK], "This method must be called when a Mask is provided." ); 2291Debug.Assert( !this.flagState[IS_NULL_MASK], "This method must be called when a Mask is provided." ); 2383Debug.Assert( !this.flagState[IS_NULL_MASK], "This method must be called when a Mask is provided." ); 2384Debug.Assert(text != null, "text is null."); 2513Debug.Assert( !this.flagState[IS_NULL_MASK], "This method must be called when a Mask is provided." ); 2625Debug.Assert( !this.flagState[IS_NULL_MASK], "This method must be called when a Mask is provided." ); 2763Debug.Assert( newProvider != null, "Initializing from a null MaskProvider ref." ); 2812Debug.Assert( srcPos != MaskedTextProvider.InvalidIndex, "InvalidIndex unexpected at this time." ); 2970Debug.Assert( !this.flagState[IS_NULL_MASK], "This method must be called when a Mask is provided." ); 2990Debug.Assert( !this.flagState[IS_NULL_MASK], "This method must be called when a Mask is provided." ); 3038Debug.Assert( !this.flagState[IS_NULL_MASK], "This method must be called when a Mask is provided." ); 3087Debug.Assert( !this.flagState[IS_NULL_MASK], "This method must be called when a Mask is provided." ); 3146Debug.Assert( !this.flagState[IS_NULL_MASK], "This method must be called when a Mask is provided." ); 3168Debug.Fail(ex.ToString()); 3290Debug.Assert( !this.flagState[IS_NULL_MASK], "This method must be called when a Mask is provided." ); 3309Debug.Assert( !this.flagState[IS_NULL_MASK], "This method must be called when a Mask is provided." );
winforms\Managed\System\WinForms\MaskInputRejectedEventArgs.cs (1)
22Debug.Assert(!MaskedTextProvider.GetOperationResultFromHint(rejectionHint), "Rejection hint is not on a failure.");
winforms\Managed\System\WinForms\MDIControlStrip.cs (1)
149Debug.Assert(Items.Count <= 4, "Too many items in the MDIControlStrip. How did we get into this situation?");
winforms\Managed\System\WinForms\MdiWindowListStrip.cs (2)
115Debug.WriteLineIf(ToolStrip.MDIMergeDebug.TraceVerbose,"\tPopulateItems: Added " + windowListItem.Text); 125Debug.WriteLineIf(ToolStrip.MDIMergeDebug.TraceVerbose, "\tPopulateItems: Added " + moreWindowsMenuItem.Text);
winforms\Managed\System\WinForms\Menu.cs (2)
185Debug.Assert(true, "Should never get called"); 327Debug.WriteLineIf(IntSecurity.SecurityDemand.TraceVerbose, "ControlFromHandleOrLocation Demanded");
winforms\Managed\System\WinForms\MenuItem.cs (11)
919Debug.Assert(uniqueID >= firstUniqueID); // ...check for ID range exhaustion (unlikely!) 997Debug.Fail("Weakref for menu item has expired or has been removed! Who is trying to access this ID?"); 1054Debug.Assert(((uint) (ulong) msaaMenuInfoPtr) < firstUniqueID); // ...check for incursion into menu item ID range (unlikely!) 1059Debug.Assert(msaaMenuInfoPtr != IntPtr.Zero); 1078Debug.Assert(!this.created, "base.ItemsChanged should have wiped out our handles"); 1493Debug.WriteLineIf(Control.PaletteTracing.TraceVerbose, Handle + ": Force set palette in MenuItem drawitem"); 1707Debug.Assert(item.data == this, "bad item passed to MenuItemData.removeItem"); 1728Debug.Assert(baseItem == null, "why isn't baseItem null?"); 1799Debug.Assert(forms != null, "Didn't get a list of the MDI Forms."); 1826Debug.Assert(forms != null, "Didn't get a list of the MDI Forms."); 1828Debug.Assert(active != null, "Didn't get the active MDI child");
winforms\Managed\System\WinForms\MenuStrip.cs (2)
220Debug.WriteLineIf(ToolStrip.SnapFocusDebug.TraceVerbose, "[ProcessMenuKey] set focus to menustrip"); 249Debug.WriteLineIf(ToolStrip.SnapFocusDebug.TraceVerbose, "[MenuStrip.ProcessCmdKey] Rolling up the menu and invoking the system menu");
winforms\Managed\System\WinForms\MessageBox.cs (1)
100Debug.Fail("Why are we being called when there's nothing to pop?");
winforms\Managed\System\WinForms\MonthCalendar.cs (7)
1060Debug.Assert(res != 0, "MCM_GETTODAY failed"); 1488Debug.Assert(calendarHeight > INSERT_HEIGHT_SIZE, "Divide by 0"); 1494Debug.Assert(minSize.Width > INSERT_WIDTH_SIZE, "Divide by 0"); 1924Debug.Assert(reqSize > 0, "Requesting a ridiculously small buffer"); 1937Debug.Assert(actualSize >= reqSize, "Tried to round up, but got it wrong"); 2138Debug.Assert(lower.Ticks <= upper.Ticks, "lower must be less than upper"); 2334Debug.Assert(mcCurView == (NativeMethods.MONTCALENDAR_VIEW_MODE)nmmcvm.uOldView, "Calendar view mode is out of sync with native control");
winforms\Managed\System\WinForms\MouseEvent.cs (1)
61Debug.Assert((button & (MouseButtons.Left | MouseButtons.None | MouseButtons.Right | MouseButtons.Middle | MouseButtons.XButton1 | MouseButtons.XButton2)) ==
winforms\Managed\System\WinForms\NativeMethods.cs (2)
3672Debug.Assert( lf != null, "lf is null" ); 6393System.Diagnostics.Debug.Assert(fileName != null && fileName.Length > 0, "Cannot get local path, fileName is not valid");
winforms\Managed\System\WinForms\NativeWindow.cs (33)
277Debug.WriteLineIf(WndProcChoice.TraceVerbose, "Init wndProcFlags"); 278Debug.Indent(); 288Debug.WriteLineIf(WndProcChoice.TraceVerbose, "Debugger is attached, using debuggable WndProc"); 293Debug.WriteLineIf(WndProcChoice.TraceVerbose, "After reg check 0x" + intWndProcFlags.ToString("X", CultureInfo.InvariantCulture)); 295Debug.WriteLineIf(WndProcChoice.TraceVerbose, "Debugger present"); 302Debug.WriteLineIf(WndProcChoice.TraceVerbose, "After config check 0x" + intWndProcFlags.ToString("X", CultureInfo.InvariantCulture)); 310Debug.WriteLineIf(WndProcChoice.TraceVerbose, "After config & debugger check 0x" + intWndProcFlags.ToString("X", CultureInfo.InvariantCulture)); 321Debug.WriteLineIf(WndProcChoice.TraceVerbose, "Final 0x" + intWndProcFlags.ToString("X", CultureInfo.InvariantCulture)); 323Debug.Unindent(); 342Debug.Assert(handle != IntPtr.Zero, "Should never insert a zero handle into the hash"); 403Debug.Assert(window.previousWindow.nextWindow == null, "Last window in chain should have null next ptr"); 446Debug.Fail("native window hash table insert failed! Load factor too high, or our double hashing function is incorrect."); 497Debug.Assert(wndProcFlags == 0x00, "Re-entrancy into IsDebuggerInstalled()"); 501Debug.WriteLineIf(WndProcChoice.TraceVerbose, ".NETFramework key not found"); 507Debug.WriteLineIf(WndProcChoice.TraceVerbose, "DbgJITDebugLaunchSetting value found, debugger is installed"); 548Debug.WriteLineIf(WndProcChoice.TraceVerbose, "Debugger present, checking for debuggable entry assembly"); 552Debug.WriteLineIf(WndProcChoice.TraceVerbose, "Debuggable attribute on assembly"); 560Debug.WriteLineIf(WndProcChoice.TraceVerbose, "Entry assembly is debuggable"); 590Debug.Assert(handle != IntPtr.Zero, "handle is 0"); 614Debug.Assert(defWindowProc != IntPtr.Zero, "defWindowProc is 0"); 618Debug.WriteLineIf(WndProcChoice.TraceVerbose, "Using debuggable wndproc"); 622Debug.WriteLineIf(WndProcChoice.TraceVerbose, "Using normal wndproc"); 630Debug.Assert(defWindowProc != windowProcPtr, "Uh oh! Subclassed ourselves!!!"); 711Debug.WriteLineIf(IntSecurity.SecurityDemand.TraceVerbose, "CreateAnyWindow Demanded"); 717Debug.WriteLineIf(IntSecurity.SecurityDemand.TraceVerbose, "TopLevelWindow Demanded"); 775Debug.WriteLineIf(CoreSwitches.PerfTrack.Enabled, "Handle created of type '" + cp.ClassName + "' with caption '" + cp.Caption + "' from NativeWindow of type '" + GetType().FullName + "'"); 839Debug.Assert(previousWindow != this, "Looping in our linked list"); 955Debug.Fail("NativeWindow hashtable capacity overflow"); 992Debug.Assert(handle != IntPtr.Zero, "Zero handles cannot be stored in the table"); 1079Debug.Assert(userDefWindowProc != IntPtr.Zero, "We have active windows but no user window proc?"); 1188Debug.Assert(handle != IntPtr.Zero, "Incorrect handle"); 1245Debug.Assert(handleCount > 0, "Underflow on handle count"); 1491Debug.Assert(hWnd != IntPtr.Zero, "Windows called us with an HWND of 0");
winforms\Managed\System\WinForms\NotifyIcon.cs (3)
954Debug.Assert(m.LParam != IntPtr.Zero, "m.lparam is null"); 960Debug.Assert(menuItem != null, "UniqueID is not associated with a menu item"); 1036Debug.Assert(reference != null, "NotifyIcon was garbage collected while it was still visible. How did we let that happen?");
winforms\Managed\System\WinForms\NumericUpDown.cs (8)
227Debug.Assert(maximum == value, "Maximum != what we just set it to!"); 254Debug.Assert(minimum.Equals(value), "Minimum != what we just set it to!"); 424Debug.Assert(minimum <= maximum, 599Debug.Assert(UserEdit == true, "ParseEditText() - UserEdit == false"); 755Debug.Assert(text == text.ToUpper(CultureInfo.InvariantCulture), "GetPreferredSize assumes hex digits to be uppercase."); 791Debug.Assert(minimum <= currentValue && currentValue <= maximum, 795Debug.Assert(ChangingText == false, "ChangingText should have been set to false"); 895Debug.Assert(largestDigit != -1 && digitWidth != -1, "Failed to find largest digit.");
winforms\Managed\System\WinForms\OpenFileDialog.cs (3)
144Debug.WriteLineIf(IntSecurity.SecurityDemand.TraceVerbose, "FileDialogOpenFile Demanded"); 184Debug.WriteLineIf(IntSecurity.SecurityDemand.TraceVerbose, "FileDialogOpenFile Demanded in OpenFileDialog.RunFileDialog"); 196Debug.WriteLineIf(IntSecurity.SecurityDemand.TraceVerbose, "FileDialogOpenFile Demanded in OpenFileDialog.RunFileDialog");
winforms\Managed\System\WinForms\Padding.cs (4)
265Debug.Assert(ShouldSerializeAll(), "_all is true, but ShouldSerializeAll() is false."); 266Debug.Assert(All == Left && Left == Top && Top == Right && Right == Bottom, "_all is true, but All/Left/Top/Right/Bottom inconsistent."); 268Debug.Assert(All == -1, "_all is false, but All != -1."); 269Debug.Assert(!ShouldSerializeAll(), "ShouldSerializeAll() should not be true when all flag is not set.");
winforms\Managed\System\WinForms\PaintEvent.cs (2)
83Debug.Assert(dc != IntPtr.Zero, "dc is not initialized."); 182Debug.Assert(dc == IntPtr.Zero || savedGraphicsState != null, "Called ResetGraphics more than once?");
winforms\Managed\System\WinForms\PictureBox.cs (2)
470Debug.Fail("Unsupported PictureBoxSizeMode value: " + mode); 1426Debug.Assert(pictureBoxState[PICTUREBOXSTATE_inInitialization]);
winforms\Managed\System\WinForms\Printing\PrintPreviewControl.cs (2)
418Debug.Assert(pageInfo != null, "Must call ComputePreview first"); 465Debug.Assert(pageInfo != null, "ReviewPrintController did not give us preview info");
winforms\Managed\System\WinForms\PropertyGrid.cs (30)
280Debug.WriteLine(ex.ToString()); 1409Debug.Assert(selectedViewTab < viewTabs.Length && selectedViewTab >= 0, "Invalid tab selection!"); 1846Debug.Assert(viewTabs[i] != null, "Null item in tab array!"); 1871Debug.Fail("Bad Tab. We're not going to show it. ", e.ToString()); 1919Debug.Assert(viewTabs != null, "Tab array destroyed!"); 1935Debug.Fail("Bad tab. We're going to remove it.", e.ToString()); 2054Debug.Assert(tab != null, "Failed to create tab!"); 2206Debug.Assert(designerEventService != null, "GetFlag(GotDesignerEventService) inconsistent with designerEventService == null"); 2393Debug.Assert(viewTabs != null, "Invalid tab array"); 2394Debug.Assert(viewTabs.Length == viewTabScopes.Length && viewTabScopes.Length == viewTabButtons.Length,"Uh oh, tab arrays aren't all the same length! tabs=" + viewTabs.Length.ToString(CultureInfo.InvariantCulture) + ", scopes=" + viewTabScopes.Length.ToString(CultureInfo.InvariantCulture) + ", buttons=" + viewTabButtons.Length.ToString(CultureInfo.InvariantCulture)); 2400Debug.Assert(viewTabs[i] != null, "Invalid tab array entry"); 2415Debug.Fail("Bad Tab. Disable for now.", e.ToString()); 2487Debug.Fail("Failed to add a large property grid toolstrip button, " + ex.ToString()); 4011Debug.Fail("Bad Tab. It's going away.", e.ToString()); 4070Debug.Assert(viewTabs != null && viewTabs.Length > 0, "Holy Moly! We don't have any tabs left!"); 4083Debug.Assert(viewTabs != null, "Tab array destroyed!"); 4191Debug.Assert(oldObject != null && newObject != null && oldObject.GetType() == newObject.GetType()); 4249Debug.Assert(viewTabButtons != null, "No view tab buttons to select!"); 4254Debug.Fail("Failed to find the tab!"); 4301Debug.Assert(viewTabs[PROPERTIES].GetType() == DefaultTabType, "First item is not property tab!"); 4335Debug.Assert(tab < viewTabs.Length, "Trying to select invalid tab!"); 4336Debug.Assert(view < viewSortButtons.Length, "Can't select view type > 1"); 4414Debug.Fail("Failed to load Alpha bitmap", e.ToString()); 4424Debug.Fail("Failed to load category bitmap", e.ToString()); 4472Debug.Fail(ex.ToString()); 4491Debug.Fail(e.ToString()); 4540Debug.Assert(viewTabButtons != null && viewTabButtons.Length > EVENTS && viewTabButtons[EVENTS] != null, "Events button is not at EVENTS position"); 5356Debug.Assert(fileId != IntPtr.Zero, "Invalid file Id"); 5363Debug.Assert(File.Exists(fullFileName), "Automation log file does not exist"); 5393Debug.Assert(filePath != null, "Could not get value of the TEMP environment variable");
winforms\Managed\System\WinForms\PropertyGridInternal\ArrayElementGridEntry.cs (2)
65Debug.Assert(owner is Array, "Owner is not array type!"); 70Debug.Assert(owner is Array, "Owner is not array type!");
winforms\Managed\System\WinForms\PropertyGridInternal\GridEntry.cs (18)
146Debug.Assert( this.ownerGrid != null, "GridEntry w/o PropertyGrid owner, text rendering will fail." ); 316Debug.Assert(value == null || !Disposed, "Why are we putting new children in after we are disposed?"); 830Debug.Assert(gridHost != null, "No propEntryHost!"); 851Debug.Assert(value != this, "how can we be our own parent?"); 1161Debug.Fail(e.ToString()); 1181Debug.Assert(!Disposed, "Why are we creating children after we are disposed?"); 1535Debug.Assert(tab != null, "No current tab!"); 1636Debug.Fail("Bad property '" + peParent.PropertyLabel + "." + pd.Name + "': " + w.ToString()); 1690Debug.Fail("Failed to get properties: " + e.GetType().Name + "," + e.Message + "\n" + e.StackTrace); 1770Debug.Fail("Bad Type Converter! " + t.GetType().Name + ", " + t.Message + "," + converter.ToString(), t.ToString()); 1863Debug.Assert(gridHost != null, "No propEntryHost"); 2090Debug.Assert(gridHost != null, "No propEntryHost"); 2124Debug.Assert(bkBrush != null, "We didn't find a good background brush for PaintValue"); 2306Debug.Assert(gridHost != null, "No prop entry host!"); 2584Debug.Assert(o != null, "Collection contains a null element. But how? Garbage collector hole? GDI+ corrupting memory?"); 2736Debug.Assert(owner != null, "GridEntryAccessibleObject must have a valid owner GridEntry"); 2993Debug.Assert(Parent != null, "GridEntry AO does not have a parent AO"); 3137Debug.Fail("Attribute '" + a.GetType().FullName + "' does not have a typeid.");
winforms\Managed\System\WinForms\PropertyGridInternal\GridErrorDlg.cs (1)
381Debug.Assert(ownerItem != null, "AccessibleObject owner cannot be null");
winforms\Managed\System\WinForms\PropertyGridInternal\GridToolTip.cs (2)
125Debug.Assert(index != -1, "Failed to find control in tooltip array"); 210Debug.Fail("TTM_ADDTOOL failed for " + c.GetType().Name);
winforms\Managed\System\WinForms\PropertyGridInternal\MergePropertyDescriptor.cs (5)
154Debug.Assert(component is Array, "MergePropertyDescriptor::CanResetValue called with non-array value"); 275Debug.Assert(component is Array, "MergePropertyDescriptor::GetValue called with non-array value"); 343Debug.Assert(component is Array, "MergePropertyDescriptor::ResetValue called with non-array value"); 391Debug.Assert(component is Array, "MergePropertyDescriptor::SetValue called with non-array value"); 414Debug.Assert(component is Array, "MergePropertyDescriptor::ShouldSerializeValue called with non-array value");
winforms\Managed\System\WinForms\PropertyGridInternal\MultiPropertyDescriptorGridEntry.cs (3)
114Debug.WriteLineIf(CompModSwitches.DebugGridView.TraceVerbose && mergedProps == null, "PropertyGridView: MergedProps returned null!"); 278Debug.Assert(propertyInfo is MergePropertyDescriptor, "Did not get a MergePropertyDescriptor!!!"); 279Debug.Assert(obj is object[], "Did not get an array of objects!!");
winforms\Managed\System\WinForms\PropertyGridInternal\MultiSelectRootGridEntry.cs (1)
67Debug.WriteLineIf(CompModSwitches.DebugGridView.TraceVerbose && mergedProps == null, "PropertyGridView: MergedProps returned null!");
winforms\Managed\System\WinForms\PropertyGridInternal\PropertyDescriptorGridEntry.cs (1)
463Debug.Assert(propInfo != null, "Can't create propEntry because of null prop info");
winforms\Managed\System\WinForms\PropertyGridInternal\PropertyGridView.cs (102)
845Debug.WriteLineIf(GridViewDebugPaint.TraceVerbose, "Adjusting paint origin to (" + newOrigin.X.ToString(CultureInfo.InvariantCulture) + "," + newOrigin.Y.ToString(CultureInfo.InvariantCulture) + ")"); 853Debug.WriteLineIf(CompModSwitches.DebugGridView.TraceVerbose, "PropertyGridView:CancelSplitterMove"); 869Debug.WriteLineIf(CompModSwitches.DebugGridView.TraceVerbose, "PropertyGridView:ClearGridEntryEvents"); 893Debug.WriteLineIf(CompModSwitches.DebugGridView.TraceVerbose, "PropertyGridView:ClearProps"); 919Debug.WriteLineIf(CompModSwitches.DebugGridView.TraceVerbose, "PropertyGridView:CloseDropDown"); 984Debug.WriteLineIf(CompModSwitches.DebugGridView.TraceVerbose, "PropertyGridView:CommonEditorHide"); 1033Debug.WriteLineIf(CompModSwitches.DebugGridView.TraceVerbose, "PropertyGridView:CommonEditorSetup"); 1040Debug.WriteLineIf(CompModSwitches.DebugGridView.TraceVerbose, "PropertyGridView:CommonEditorUse"); 1041Debug.WriteLineIf(GridViewDebugPaint.TraceVerbose, "Showing common editors"); 1043Debug.Assert(ctl != null, "Null control passed to CommonEditorUse"); 1080Debug.WriteLineIf(CompModSwitches.DebugGridView.TraceVerbose, "PropertyGridView:CountPropsFromOutLine"); 1120Debug.Fail(e.ToString()); 1133Debug.WriteLineIf(CompModSwitches.DebugGridView.TraceVerbose, "PropertyGridView:Dispose"); 1273Debug.WriteLineIf(GridViewDebugPaint.TraceVerbose, "Drawing label for property " + gridEntry.PropertyLabel); 1302Debug.Fail(ex.ToString()); 1315Debug.WriteLineIf(GridViewDebugPaint.TraceVerbose, "Drawing value for property " + gridEntry.PropertyLabel); 1400Debug.WriteLineIf(CompModSwitches.DebugGridView.TraceVerbose, "PropertyGridView:DoubleClickRow"); 1404Debug.WriteLineIf(GridViewDebugPaint.TraceVerbose, "Property " + gridEntry.PropertyLabel + " double clicked"); 1487Debug.Fail(ex.ToString()); 1679Debug.WriteLineIf(CompModSwitches.DebugGridView.TraceVerbose, "PropertyGridView:DropDownControl"); 1680Debug.WriteLineIf(GridViewDebugPaint.TraceVerbose, "DropDownControl(ctl = " + ctl.GetType().Name + ")"); 1775Debug.WriteLineIf(CompModSwitches.DebugGridView.TraceVerbose, "DropDownHolder:DropDownUpdate"); 1858Debug.WriteLineIf(CompModSwitches.DebugGridView.TraceVerbose, "PropertyGridView:FilterKeyPress()"); 1933Debug.WriteLineIf(CompModSwitches.DebugGridView.TraceVerbose, "PropertyGridView::Flush()"); 1959Debug.Fail(ex.ToString()); 2011Debug.Fail(e.ToString()); 2082Debug.WriteLineIf(CompModSwitches.DebugGridView.TraceVerbose, "PropertyGridView:GetGridEntriesFromOutline"); 2119Debug.Fail("We have a bad client width!"); 2255Debug.WriteLineIf(CompModSwitches.DebugGridView.TraceVerbose, "PropertyGridView:InvalidateRows"); 2257Debug.WriteLineIf(GridViewDebugPaint.TraceVerbose, "Invalidating rows " + startRow.ToString(CultureInfo.InvariantCulture) + " through " + endRow.ToString(CultureInfo.InvariantCulture)); 2325Debug.WriteLineIf(CompModSwitches.DebugGridView.TraceVerbose, "PropertyGridView: move not needed, returning"); 2405Debug.WriteLineIf(CompModSwitches.DebugGridView.TraceVerbose, "PropertyGridView:OnChildLostFocus"); 2419Debug.WriteLineIf(CompModSwitches.DebugGridView.TraceVerbose, "PropertyGridView:OnGotFocus"); 2507Debug.WriteLineIf(CompModSwitches.DebugGridView.TraceVerbose, "PropertyGridView:OnListChange"); 2522Debug.WriteLineIf(CompModSwitches.DebugGridView.TraceVerbose, "PropertyGridView:OnListClick"); 2553Debug.WriteLineIf(GridViewDebugPaint.TraceVerbose, "Drawing list item, value='" + text + "'"); 2585Debug.WriteLineIf(CompModSwitches.DebugGridView.TraceVerbose, "PropertyGridView:OnLostFocus"); 2586Debug.WriteLineIf(GridViewDebugPaint.TraceVerbose, "PropertyGridView lost focus"); 2597Debug.WriteLineIf(GridViewDebugPaint.TraceVerbose, "removing gridEntry focus"); 2608Debug.WriteLineIf(GridViewDebugPaint.TraceVerbose, "Filling empty gridview rect=" + clearRect.ToString()); 2616Debug.WriteLineIf(CompModSwitches.DebugGridView.TraceVerbose, "PropertyGridView:OnEditChange"); 2630Debug.WriteLineIf(CompModSwitches.DebugGridView.TraceVerbose, "PropertyGridView:OnEditGotFocus"); 2653Debug.WriteLineIf(GridViewDebugPaint.TraceVerbose, "adding gridEntry focus"); 2717Debug.WriteLineIf(CompModSwitches.DebugGridView.TraceVerbose, "PropertyGridView:OnEditKeyDown"); 2740Debug.WriteLineIf(CompModSwitches.DebugGridView.TraceVerbose, "PropertyGridView:OnEditKeyPress"); 2753Debug.WriteLineIf(CompModSwitches.DebugGridView.TraceVerbose, "PropertyGridView:OnEditLostFocus"); 2788Debug.WriteLineIf(CompModSwitches.DebugGridView.TraceVerbose, "PropertyGridView:OnEditMouseDown"); 2826Debug.WriteLineIf(CompModSwitches.DebugGridView.TraceVerbose, "PropertyGridView:OnF4"); 2838Debug.WriteLineIf(CompModSwitches.DebugGridView.TraceVerbose, "PropertyGridView:OnEscape"); 3326Debug.Assert(this.cumulativeVerticalWheelDelta > -NativeMethods.WHEEL_DELTA, "cumulativeVerticalWheelDelta is too small"); 3327Debug.Assert(this.cumulativeVerticalWheelDelta < NativeMethods.WHEEL_DELTA, "cumulativeVerticalWheelDelta is too big"); 3442Debug.WriteLineIf(CompModSwitches.DebugGridView.TraceVerbose, "PropertyGridView:OnPaint"); 3443Debug.WriteLineIf(GridViewDebugPaint.TraceVerbose, "On paint called. Rect=" + pe.ClipRectangle.ToString()); 3505Debug.WriteLineIf(GridViewDebugPaint.TraceVerbose, "Drawing splitter"); 3512Debug.WriteLineIf(GridViewDebugPaint.TraceVerbose, "Drawing lines"); 3544Debug.WriteLineIf(GridViewDebugPaint.TraceVerbose, "Exception thrown during painting property " + GetGridEntryFromRow(i).PropertyLabel); 3559Debug.WriteLineIf(GridViewDebugPaint.TraceVerbose, "Filling remaining area rect=" + clearRect.ToString()); 3572Debug.Fail("Caught exception in OnPaint"); 3611Debug.Assert(gridEntry.Expandable, "non-expandable IPE firing outline click"); 3726Debug.Assert(parentIndex != -1, "parent GridEntry not found in allGridEntries"); 3749Debug.Assert(childCount == e.NewChildCount, "parent reports " + childCount + " new children, event reports " + e.NewChildCount); 3771Debug.WriteLineIf(CompModSwitches.DebugGridView.TraceVerbose, "PropertyGridView:OnResize"); 3813Debug.WriteLineIf(CompModSwitches.DebugGridView.TraceVerbose, "PropertyGridView:OnScroll(" + ScrollBar.Value.ToString(CultureInfo.InvariantCulture) + " -> " + se.NewValue.ToString(CultureInfo.InvariantCulture) +")"); 3825Debug.WriteLineIf(CompModSwitches.DebugGridView.TraceVerbose, "OnScroll: SelectedGridEntry=" + oldGridEntry.PropertyLabel); 3850Debug.WriteLineIf(CompModSwitches.DebugGridView.TraceVerbose, "PropertyGridView:PopupDialog"); 3956Debug.WriteLineIf(CompModSwitches.DebugGridView.TraceVerbose, "PropertyGridView:ProcessDialogKey"); 4044Debug.WriteLineIf(CompModSwitches.DebugGridView.TraceVerbose, "PropertyGridView:RecalculateProps"); 4101Debug.WriteLineIf(CompModSwitches.DebugGridView.TraceVerbose, "PropertyGridView:Refresh"); 4102Debug.WriteLineIf(GridViewDebugPaint.TraceVerbose, "Refresh called for rows " + rowStart.ToString(CultureInfo.InvariantCulture) + " through " + rowEnd.ToString(CultureInfo.InvariantCulture)); 4209Debug.WriteLineIf(CompModSwitches.DebugGridView.TraceVerbose, "PropertyGridView:Reset"); 4310Debug.WriteLineIf(CompModSwitches.DebugGridView.TraceVerbose, "PropertyGridView:SelectGridEntry(" + gridEntry.PropertyLabel + ")"); 4355Debug.WriteLineIf(CompModSwitches.DebugGridView.TraceVerbose, "PropertyGridView:SelectRow(" + row.ToString(CultureInfo.InvariantCulture) + ")"); 4527Debug.WriteLineIf(CompModSwitches.DebugGridView.TraceVerbose, "PropertyGridView:SetConstants"); 4557Debug.WriteLineIf(CompModSwitches.DebugGridView.TraceVerbose, "\tsize :" + size.ToString()); 4558Debug.WriteLineIf(CompModSwitches.DebugGridView.TraceVerbose, "\tlocation :" + ptOurLocation.ToString()); 4559Debug.WriteLineIf(CompModSwitches.DebugGridView.TraceVerbose, "\tvisibleRows:" + (visibleRows).ToString(CultureInfo.InvariantCulture)); 4560Debug.WriteLineIf(CompModSwitches.DebugGridView.TraceVerbose, "\tlabelWidth :" + (labelWidth).ToString(CultureInfo.InvariantCulture)); 4561Debug.WriteLineIf(CompModSwitches.DebugGridView.TraceVerbose, "\tlabelRatio :" + (labelRatio).ToString(CultureInfo.InvariantCulture)); 4562Debug.WriteLineIf(CompModSwitches.DebugGridView.TraceVerbose, "\trowHeight :" + (RowHeight).ToString(CultureInfo.InvariantCulture)); 4664Debug.WriteLineIf(CompModSwitches.DebugGridView.TraceVerbose, "PropertyGridView:SetScrollOffset(" + cOffset.ToString(CultureInfo.InvariantCulture) + ")"); 4681Debug.WriteLineIf(CompModSwitches.DebugGridView.TraceVerbose, "PropertyGridView:Commit()"); 4684Debug.WriteLineIf(CompModSwitches.DebugGridView.TraceVerbose, "PropertyGridView:Commit() returning false because an error has been thrown or we are in a property set"); 4690Debug.WriteLineIf(CompModSwitches.DebugGridView.TraceVerbose, "PropertyGridView:Commit() returning true because no change has been made"); 4727Debug.Fail("Committing with no selected row!"); 4736Debug.WriteLineIf(CompModSwitches.DebugGridView.TraceVerbose, "PropertyGridView:CommitValue(" + (value==null ? "null" :value.ToString()) + ")"); 4824Debug.WriteLineIf(CompModSwitches.DebugGridView.TraceVerbose, "PropertyGridView:CommitValue(" + (text==null ? "null" :text.ToString()) + ")"); 4835Debug.Fail("Committing with no selected row!"); 4876Debug.WriteLineIf(CompModSwitches.DebugGridView.TraceVerbose, "PropertyGridView:SetScrollBarLength"); 4963Debug.WriteLineIf(CompModSwitches.DebugGridView.TraceVerbose, "PropertyGridView:ShowFormatExceptionMessage(prop=" + propName + ")"); 5046Debug.WriteLineIf(CompModSwitches.DebugGridView.TraceVerbose, "PropertyGridView:ShowInvalidMessage(prop=" + propName + ")"); 5214Debug.WriteLineIf(CompModSwitches.DebugGridView.TraceVerbose, "PropertyGridView:UnfocusSelection()"); 5667Debug.WriteLineIf(CompModSwitches.DebugGridView.TraceVerbose, "DropDownHolder:FocusComponent()"); 5734Debug.Assert(ice != null, "How do we have a link without the InstanceCreationEditor?"); 5977Debug.WriteLineIf(CompModSwitches.DebugGridView.TraceVerbose, "DropDownHolder:SetComponent(" + (ctl.GetType().Name) + ")"); 6078Debug.WriteLineIf(CompModSwitches.DebugGridView.TraceVerbose, "DropDownHolder:WM_ACTIVATE()"); 6829Debug.WriteLineIf(CompModSwitches.DebugGridView.TraceVerbose, "DropDownHolder:Visible(" + (value.ToString()) + ")"); 7160Debug.Assert(mouseHookHandle != IntPtr.Zero, "Failed to install mouse hook"); 7161Debug.WriteLineIf(CompModSwitches.DebugGridView.TraceVerbose, "DropDownHolder:HookMouse()"); 7208Debug.WriteLineIf(CompModSwitches.DebugGridView.TraceVerbose, "DropDownHolder:UnhookMouse()"); 7235Debug.Assert(thisProcessID != 0, "Didn't get our process id!"); 7583Debug.Fail(ex.ToString()); 7607Debug.Fail(ex.ToString());
winforms\Managed\System\WinForms\PropertyGridInternal\SingleSelectRootGridEntry.cs (2)
44Debug.Assert(value != null,"Can't browse a null object!"); 314 Debug.Assert(pe != null);
winforms\Managed\System\WinForms\PropertyStore.cs (21)
220Debug.Fail("Invalid element obtained from LocateIntegerEntry"); 279Debug.Fail("Invalid element obtained from LocateObjectEntry"); 339Debug.Assert(index < length); 398Debug.Assert(length > 0); 438Debug.Assert(index < length); 515Debug.Assert(intEntries.Length - index - 1 > 0); 541Debug.Fail("Invalid element obtained from LocateIntegerEntry"); 584Debug.Assert(objEntries.Length - index - 1 > 0); 611Debug.Fail("Invalid element obtained from LocateObjectEntry"); 632Debug.Assert(storedObject == null, "object should either be null or ColorWrapper"); // could someone have SetObject to this key behind our backs? 652Debug.Assert(storedObject == null, "object should either be null or PaddingWrapper"); // could someone have SetObject to this key behind our backs? 673Debug.Assert(storedObject == null, "object should either be null or RectangleWrapper"); // could someone have SetObject to this key behind our backs? 695Debug.Assert(storedObject == null, "object should either be null or SizeWrapper"); // could someone have SetObject to this key behind our backs? 728Debug.Assert(index == 0, "LocateIntegerEntry should have given us a zero index."); 754Debug.Fail("Invalid element obtained from LocateIntegerEntry"); 788Debug.Assert(index == 0, "LocateObjectEntry should have given us a zero index."); 814Debug.Fail("Invalid element obtained from LocateObjectEntry"); 841Debug.Assert(index == idx, "GetIntegerEntry in property store broken. index is " + index + " while it should be " + idx + "length of the array is " + length); 856Debug.Assert(index == idx, "GetIntegerEntry in property store broken. index is " + index + " while it should be " + idx + "length of the array is " + length); 870Debug.Assert(index == idx, "GetObjEntry in property store broken. index is " + index + " while is should be " + idx + "length of the array is " + length); 884Debug.Assert(index == idx, "GetObjEntry in property store broken. index is " + index + " while is should be " + idx + "length of the array is " + length);
winforms\Managed\System\WinForms\RelatedCurrencyManager.cs (1)
38Debug.Assert(parentManager != null, "How could this be a null parentManager.");
winforms\Managed\System\WinForms\RelatedPropertyManager.cs (1)
31Debug.Assert(parentManager != null, "How could this be a null parentManager.");
winforms\Managed\System\WinForms\RichTextBox.cs (26)
387Debug.Assert(versionInfo != null && !string.IsNullOrEmpty(versionInfo.ProductVersion), "Couldn't get the version info for the richedit dll"); 1842Debug.Assert(cb % 2 == 0, "EditStreamProc call out of cycle. Expected to always get character boundary calls"); 2702Debug.WriteLineIf(IntSecurity.SecurityDemand.TraceVerbose, "ClipboardRead Demanded"); 3022Debug.Assert(data != null, "StreamIn passed a null stream"); 3135Debug.Assert(data != null, "StreamOut passed a null stream"); 3252Debug.WriteLineIf(RichTextDbg.TraceVerbose, "update ole callback (" + AllowDrop + ")"); 3255Debug.WriteLineIf(RichTextDbg.TraceVerbose, "binding ole callback"); 3368Debug.Assert((c.cpMax-c.cpMin)>0, "CHARRANGE was null or negative - can't do it!"); 3384Debug.Assert(len != 0, "CHARRANGE from RichTextBox was bad! - impossible?"); 3783Debug.WriteLineIf(RichTextDbg.TraceVerbose, "IRichEditOleCallback::GetNewStorage"); 3791Debug.Assert(pLockBytes != null, "pLockBytes is NULL!"); 3796Debug.Assert(storage != null, "storage is NULL!"); 3804Debug.WriteLineIf(RichTextDbg.TraceVerbose, "IRichEditOleCallback::GetInPlaceContext"); 3809Debug.WriteLineIf(RichTextDbg.TraceVerbose, "IRichEditOleCallback::ShowContainerUI"); 3816Debug.WriteLineIf(RichTextDbg.TraceVerbose, "IRichEditOleCallback::QueryInsertObject(" + lpclsid.ToString() + ")"); 3832Debug.WriteLineIf(RichTextDbg.TraceVerbose, "real clsid:" + realClsid.ToString() + " (hr=" + hr.ToString("X", CultureInfo.InvariantCulture) + ")"); 3852Debug.WriteLineIf(RichTextDbg.TraceVerbose, " denying '" + lpclsid.ToString() + "' from being inserted due to security restrictions"); 3858Debug.WriteLineIf(RichTextDbg.TraceVerbose, "IRichEditOleCallback::DeleteObject"); 3867Debug.WriteLineIf(RichTextDbg.TraceVerbose, "IRichEditOleCallback::QueryAcceptData(reco=" + reco + ")"); 3933Debug.WriteLineIf(RichTextDbg.TraceVerbose, "\tCancel data"); 3937Debug.WriteLineIf(RichTextDbg.TraceVerbose, "\tAccept data"); 3942Debug.WriteLineIf(RichTextDbg.TraceVerbose, "\tCancel data, allowdrop == false"); 3953Debug.WriteLineIf(RichTextDbg.TraceVerbose, "IRichEditOleCallback::ContextSensitiveHelp"); 3959Debug.WriteLineIf(RichTextDbg.TraceVerbose, "IRichEditOleCallback::GetClipboardData"); 3964Debug.WriteLineIf(RichTextDbg.TraceVerbose, "IRichEditOleCallback::GetDragDropEffect"); 4024Debug.WriteLineIf(RichTextDbg.TraceVerbose, "IRichEditOleCallback::GetContextMenu");
winforms\Managed\System\WinForms\SaveFileDialog.cs (5)
53Debug.WriteLineIf(IntSecurity.SecurityDemand.TraceVerbose, "FileDialogCustomization Demanded"); 76Debug.WriteLineIf(IntSecurity.SecurityDemand.TraceVerbose, "FileDialogCustomization Demanded"); 97Debug.WriteLineIf(IntSecurity.SecurityDemand.TraceVerbose, "FileDialogSaveFile Demanded"); 190Debug.WriteLineIf(IntSecurity.SecurityDemand.TraceVerbose, "FileDialogSaveFile Demanded in SaveFileDialog.RunFileDialog"); 200Debug.WriteLineIf(IntSecurity.SecurityDemand.TraceVerbose, "FileDialogSaveFile Demanded in SaveFileDialog.RunFileDialog");
winforms\Managed\System\WinForms\Screen.cs (1)
357Debug.WriteLineIf(IntSecurity.SecurityDemand.TraceVerbose, "ObjectFromWin32Handle Demanded");
winforms\Managed\System\WinForms\ScrollableControl.cs (13)
420Debug.WriteLineIf(CompModSwitches.RichLayout.TraceInfo, GetType().Name + "::ApplyScrollbarChanges(" + display + ") {"); 421Debug.Indent(); 610Debug.WriteLineIf(CompModSwitches.RichLayout.TraceInfo, "Current scrollbars(" + HScroll + ", " + VScroll + ")"); 611Debug.WriteLineIf(CompModSwitches.RichLayout.TraceInfo, "Needed scrollbars(" + needHscroll + ", " + needVscroll + ")"); 633Debug.WriteLineIf(CompModSwitches.RichLayout.TraceInfo, needLayout ? "Need layout" : "No layout changes"); 634Debug.Unindent(); 635Debug.WriteLineIf(CompModSwitches.RichLayout.TraceInfo, "}"); 906Debug.WriteLineIf(ScrollableControl.AutoScrolling.TraceVerbose, "ScrollControlIntoView(" + activeControl.GetType().FullName + ")"); 907Debug.Indent(); 917Debug.WriteLineIf(ScrollableControl.AutoScrolling.TraceVerbose, "Calculating..."); 928Debug.Unindent(); 953Debug.WriteLineIf(ScrollableControl.AutoScrolling.TraceVerbose, "not direct child, original bounds: " + bounds); 956Debug.WriteLineIf(ScrollableControl.AutoScrolling.TraceVerbose, "adjusted bounds: " + bounds);
winforms\Managed\System\WinForms\SendKeys.cs (1)
871Debug.WriteLineIf(IntSecurity.SecurityDemand.TraceVerbose, "UnmanagedCode Demanded");
winforms\Managed\System\WinForms\SplitContainer.cs (1)
1133Debug.Assert(Enabled, "SplitContainer.OnKeyDown should not be called if the button is disabled");
winforms\Managed\System\WinForms\StatusBar.cs (1)
1033Debug.Fail("OwnerDraw item out of range");
winforms\Managed\System\WinForms\SystemInformation.cs (5)
537Debug.WriteLineIf(IntSecurity.SecurityDemand.TraceVerbose, "SensitiveSystemInformation Demanded"); 712Debug.WriteLineIf(IntSecurity.SecurityDemand.TraceVerbose, "SensitiveSystemInformation Demanded"); 901Debug.WriteLineIf(IntSecurity.SecurityDemand.TraceVerbose, "SensitiveSystemInformation Demanded"); 1096Debug.WriteLineIf(IntSecurity.SecurityDemand.TraceVerbose, "SensitiveSystemInformation Demanded"); 1159Debug.WriteLineIf(IntSecurity.SecurityDemand.TraceVerbose, "SensitiveSystemInformation Demanded");
winforms\Managed\System\WinForms\TabControl.cs (1)
806Debug.Assert(0 <= index && index < tabPages.Length, "SelectedIndex returned an invalid index");
winforms\Managed\System\WinForms\TableLayoutPanel.cs (7)
85Debug.Assert(BorderStyle == value, "BorderStyle should be the same as we set it"); 107Debug.Assert(CellBorderStyle == value, "CellBorderStyle should be the same as we set it"); 137Debug.Assert(ColumnCount == value, "ColumnCount should be the same as we set it"); 231Debug.Assert(GetColumnSpan(control) == value, "GetColumnSpan should be the same as we set it"); 247Debug.Assert(GetRowSpan(control) == value, "GetRowSpan should be the same as we set it"); 265Debug.Assert(GetRow(control) == row, "GetRow should be the same as we set it"); 302Debug.Assert(GetColumn(control) == column, "GetColumn should be the same as we set it");
winforms\Managed\System\WinForms\TableLayoutSettings.cs (11)
89Debug.Assert(CellBorderStyle == value, "CellBorderStyle should be the same as we set"); 119Debug.Assert(ColumnCount == value, "the max columns should equal to the value we set it to"); 145Debug.Assert(RowCount == value, "the max rows should equal to the value we set it to"); 213Debug.Assert( _stub.IsValid, "seems like we're still partying on an object that's given over its rows and columns, that's a nono."); 262Debug.Assert(GetColumnSpan(element) == value, "column span should equal to the value we set"); 297Debug.Assert(GetRowSpan(element) == value, "row span should equal to the value we set"); 414Debug.Assert(!colSpecified || GetColumn(element) == column, "column position shoule equal to what we set"); 415Debug.Assert(!rowSpecified || GetRow(element) == row, "row position shoule equal to what we set"); 461Debug.Fail("Name property missing on control"); 538Debug.Fail("Name property missing on control"); 698Debug.Fail("Unsupported SizeType.");
winforms\Managed\System\WinForms\TableLayoutSettingsTypeConverter.cs (2)
153Debug.Fail(string.Format(CultureInfo.CurrentCulture, "Failed to parse int: {0}", attributeValue)); 229Debug.Fail(string.Format(CultureInfo.CurrentCulture, "Failed to parse float for style: {0}", floatString));
winforms\Managed\System\WinForms\TableLayoutStyle.cs (1)
74Debug.Assert(size >= 0);
winforms\Managed\System\WinForms\TabPage.cs (1)
136Debug.Assert(pd != null);
winforms\Managed\System\WinForms\TextBoxBase.cs (14)
440Debug.WriteLineIf( CompModSwitches.ImeMode.Level >= TraceLevel.Info, "Inside get_CanEnableIme(), this = " + this ); 441Debug.Indent(); 445Debug.WriteLineIf( CompModSwitches.ImeMode.Level >= TraceLevel.Info, "Value = " + canEnable ); 446Debug.Unindent(); 652Debug.WriteLineIf( CompModSwitches.ImeMode.Level >= TraceLevel.Info, "Inside get_ImeModeInternal(), this = " + this ); 653Debug.Indent(); 657Debug.WriteLineIf( CompModSwitches.ImeMode.Level >= TraceLevel.Info, "Value = " + imeMode ); 658Debug.Unindent(); 1588Debug.WriteLineIf(IntSecurity.SecurityDemand.TraceVerbose, "ClipboardRead Demanded"); 1600Debug.WriteLineIf(ControlKeyboardRouting.TraceVerbose, "TextBoxBase.ProcessDialogKey [" + keyData.ToString() + "]"); 2058Debug.Assert(IsHandleCreated, "Don't call this method until the handle is created."); 2228Debug.WriteLineIf(Control.ControlKeyboardRouting.TraceVerbose, "TextBox wants tabs"); 2232Debug.WriteLineIf(Control.ControlKeyboardRouting.TraceVerbose, "TextBox doesn't want tabs"); 2274Debug.Fail("contextmenu and contextmenustrip are both null... hmm how did we get here?");
winforms\Managed\System\WinForms\Timer.cs (5)
221Debug.Assert(DesignMode || timerWindow != null, "Why don't we have a timer HWND?"); 338Debug.Assert(Handle != IntPtr.Zero, "Timer HWND creation failed!"); 430Debug.Assert(_timerID == 0, "Destroying handle with timerID still set."); 442Debug.Assert(_timerID == 0, "Destroying handle with timerID still set."); 449Debug.Assert(m.HWnd == Handle && Handle != IntPtr.Zero, "Timer getting messages for other windows?");
winforms\Managed\System\WinForms\ToolBarButton.cs (2)
113set { Debug.Assert(false, "We should never set the image list"); } 467Debug.Assert(parent != null, "Parent should be non-null when button width is requested");
winforms\Managed\System\WinForms\ToolStrip.cs (48)
2009Debug.WriteLineIf(SelectionDebug.TraceVerbose,"[SelectDBG ClearAllSelectionsExcept] Unselecting " + DisplayedItems[i].Text); 2140Debug.WriteLineIf(ToolStrip.SnapFocusDebug.TraceVerbose, "Exiting menu mode because we're the last toolstrip in the queue, and we've disposed."); 2267Debug.WriteLineIf(SelectionDebug.TraceVerbose, "Started from a visible = false item"); 2271Debug.WriteLineIf(SelectionDebug.TraceVerbose && (current != -1), "[SelectDBG GetNextToolStripItem] Last selected item was " + ((current != -1) ? DisplayedItems[current].Text : "")); 2272Debug.WriteLineIf(SelectionDebug.TraceVerbose && (current == -1), "[SelectDBG GetNextToolStripItem] Last selected item was null"); 2292Debug.WriteLineIf(SelectionDebug.TraceVerbose, "[SelectDBG GetNextToolStripItem] selecting " + DisplayedItems[current].Text); 2641Debug.WriteLineIf(ToolStripItem.MouseDebugging.TraceVerbose, "firing mouse leave on " + lastMouseActiveItem.ToString()); 2645Debug.WriteLineIf(ToolStripItem.MouseDebugging.TraceVerbose, "setting last active item to null"); 2867Debug.WriteLineIf(SnapFocusDebug.TraceVerbose, "[ToolStrip.ProcessCmdKey] Detected a second ALT keypress while in Menu Mode."); 2983Debug.WriteLineIf(SelectionDebug.TraceVerbose, "[SelectDBG ProcessDialogKey] calling base"); 3182Debug.WriteLineIf(MenuAutoExpandDebug.TraceVerbose, "[ToolStrip.ProcessArrowKey] MenuTimer.Cancel called"); 3231Debug.WriteLineIf(SelectionDebug.TraceVerbose, "[SelectDBG NotifySelectionChange] none should be selected"); 3235Debug.WriteLineIf(SelectionDebug.TraceVerbose, "[SelectDBG NotifySelectionChange] Notify selection change: " + item.ToString() + ": " + item.Selected.ToString()); 3249Debug.Assert(ToolStripPanelRow != null, "Why is toolstrippanel row null?"); 3250Debug.Assert(this.ParentInternal as ToolStripPanel != null, "Why is our parent not a toolstrip panel?"); 3260Debug.Assert(ToolStripPanelRow != null, "Why is toolstrippanel row null?"); 3261Debug.Assert(this.ParentInternal as ToolStripPanel != null, "Why is our parent not a toolstrip panel?"); 3262Debug.Assert(ToolStripPanelRow == null || ToolStripPanelRow.ToolStripPanel.RowsInternal.Contains(ToolStripPanelRow), "Why are we in an orphaned row?"); 3465Debug.WriteLineIf(SnapFocusDebug.TraceVerbose, "uninstalling RestoreFocusFilter"); 3518Debug.WriteLineIf(ToolStripItem.MouseDebugging.TraceVerbose,"OnMouseMove called"); 3531Debug.WriteLineIf(ToolStripItem.MouseDebugging.TraceVerbose, String.Format(CultureInfo.CurrentCulture, "Item to get mouse move: {0}", (item == null) ? "null" : item.ToString())); 3533Debug.WriteLineIf(ToolStripItem.MouseDebugging.TraceVerbose, String.Format(CultureInfo.CurrentCulture, "This is a new item - last item to get was {0}", (lastMouseActiveItem == null) ? "null" : lastMouseActiveItem.ToString())); 3542Debug.WriteLineIf(ToolStripItem.MouseDebugging.TraceVerbose, String.Format(CultureInfo.CurrentCulture, "Firing MouseEnter on: {0}", (lastMouseActiveItem == null) ? "null" : lastMouseActiveItem.ToString())); 3559Debug.WriteLineIf(ToolStripItem.MouseDebugging.TraceVerbose, String.Format(CultureInfo.CurrentCulture, "Firing MouseMove on: {0}", (item == null) ? "null" : item.ToString())); 3568Debug.WriteLineIf(ToolStripItem.MouseDebugging.TraceVerbose, String.Format(CultureInfo.CurrentCulture, "Firing MouseMove on: {0}", (this == null) ? "null" : this.ToString())); 4078Debug.WriteLineIf(SnapFocusDebug.TraceVerbose, "[ToolStrip.RestoreFocus] Someone has called RestoreFocus, exiting MenuMode."); 4083Debug.WriteLineIf(SnapFocusDebug.TraceVerbose, "[ToolStrip.RestoreFocus] Setting menu auto expand to false"); 4084Debug.WriteLineIf(SnapFocusDebug.TraceVerbose, "[ToolStrip.RestoreFocus] uninstalling RestoreFocusFilter"); 4116Debug.WriteLineIf(SnapFocusDebug.TraceVerbose, "[ToolStrip RestoreFocus]: Will Restore Focus to: " + WindowsFormsUtils.GetControlInformation(hwndThatLostFocus)); 4220Debug.WriteLineIf(ToolStripItem.MouseDebugging.TraceVerbose, "[TS: ShouldSelectItem] MouseEnter already reset."); 4226Debug.WriteLineIf(ToolStripItem.MouseDebugging.TraceVerbose, "[TS: ShouldSelectItem] Mouse position has changed - call Select()."); 4230Debug.WriteLineIf(ToolStripItem.MouseDebugging.TraceVerbose, "[TS: ShouldSelectItem] Mouse hasnt actually moved yet."); 4274Debug.WriteLineIf(SnapFocusDebug.TraceVerbose,"[ToolStrip.SetFocus] Focusing toolstrip."); 4278Debug.WriteLineIf(SnapFocusDebug.TraceVerbose,"[ToolStrip.SetFocus] Entering menu mode."); 4432Debug.WriteLineIf(LayoutDebugSwitch.TraceVerbose, "Setting Displayed Items: Current bounds: " + this.Bounds.ToString()); 4463Debug.WriteLineIf(LayoutDebugSwitch.TraceVerbose, item.ToString() + Items[j].Bounds); 4543Debug.WriteLineIf(SnapFocusDebug.TraceVerbose, "[ToolStrip SnapFocus]: Caching for return focus:" + WindowsFormsUtils.GetControlInformation(otherHandle.Handle)); 4750Debug.WriteLineIf(SnapFocusDebug.TraceVerbose, "Installing restoreFocusFilter"); 4893Debug.Fail("No item matched the index??"); 5180Debug.WriteLineIf(SnapFocusDebug.TraceVerbose, "[ToolStrip.RestoreFocusFilter] Detected a click, restoring focus."); 5361Debug.WriteLineIf(ToolStrip.ItemReorderDebug.TraceVerbose, "OnDragEnter: " + e.ToString()); 5370Debug.WriteLineIf(ToolStrip.ItemReorderDebug.TraceVerbose, "OnDragLeave: " + e.ToString()); 5375Debug.WriteLineIf(ToolStrip.ItemReorderDebug.TraceVerbose, "OnDragDrop: " + e.ToString()); 5385Debug.WriteLineIf(ToolStrip.ItemReorderDebug.TraceVerbose, "OnDragOver: " + e.ToString()); 5476Debug.WriteLineIf(ToolStrip.ItemReorderDebug.TraceVerbose, "Drop relative loc " + relativeLocation); 5477Debug.WriteLineIf(ToolStrip.ItemReorderDebug.TraceVerbose, "Index " + i); 5513Debug.WriteLineIf(ToolStrip.DropTargetDebug.TraceVerbose, "MATCH " + owner.DisplayedItems[i].Text + " Bounds: " + owner.DisplayedItems[i].Bounds.ToString()); 5569Debug.Fail("Could not calculate the relative position for AllowItemReorder");
winforms\Managed\System\WinForms\ToolStripComboBox.cs (1)
654Debug.Assert(toolStripComboBox != null, "Why are we here and not a toolstrip combo?");
winforms\Managed\System\WinForms\ToolStripControlHost.cs (1)
808Debug.Fail("why are we here? control should not be null");
winforms\Managed\System\WinForms\ToolStripDropDown.cs (21)
596Debug.WriteLineIf(IntSecurity.SecurityDemand.TraceVerbose, "Checking for restricted window..."); 597Debug.Indent(); 608Debug.WriteLineIf(IntSecurity.SecurityDemand.TraceVerbose, "WindowAdornmentModification Demanded"); 612Debug.WriteLineIf(IntSecurity.SecurityDemand.TraceVerbose, "Caught exception, we are restricted..."); 615Debug.Unindent(); 876Debug.Fail("You can't set this except on ToolStripDropDownMenu"); 1233Debug.WriteLineIf(DropDownDebugBounds.TraceVerbose, "DropDownBounds for " + suggestedBounds + "is" +dropDownBounds); 1448Debug.WriteLineIf(ToolStrip.SnapFocusDebug.TraceVerbose, "[ToolStripDropDown.OnMouseUp] mouse up outside of the toolstrip - this should dismiss the entire chain"); 1505Debug.WriteLineIf(ToolStrip.SnapFocusDebug.TraceVerbose, "[ToolStripDropDown.SelectPreviousToolStrip] No previous toolstrip to select - exiting menu mode."); 1519Debug.WriteLineIf(ToolStrip.MenuAutoExpandDebug.TraceVerbose, "[ToolStripDropDown.ProcessArrowKey] MenuTimer.Cancel called"); 1588Debug.WriteLineIf(ToolStrip.SnapFocusDebug.TraceVerbose, "[ToolStripDropDown ProcessDialogKey]: Got Menu Key, finding toplevel toolstrip, calling RestoreFocus."); 1694Debug.WriteLineIf(CompModSwitches.RichLayout.TraceInfo, GetType().Name + "::ScaleCore(" + dx + ", " + dy + ")"); 1924Debug.WriteLineIf(ToolStrip.SnapFocusDebug.TraceVerbose,"[ToolStripDropDown.SetVisibleCore] Exiting menu mode because item clicked"); 1968Debug.Assert(reason != ToolStripDropDownCloseReason.ItemClicked, 2110Debug.Assert(countDropDownItemsAssignedTo > 0, "dropdown assignment underflow"); 2139Debug.WriteLineIf(ToolStrip.SnapFocusDebug.TraceVerbose, "[ToolStripDropDown.WndProc] got a WM_ACTIVATE " + (((int)m.WParam == NativeMethods.WA_ACTIVE) ? "WA_ACTIVE" : "WA_INACTIVE") + " - checkin if we need to set the active toolstrip"); 2149Debug.Fail("Why are we being activated when we're not visible? Deactivating thingee is " + WindowsFormsUtils.GetControlInformation(m.LParam)); 2153Debug.WriteLineIf(ToolStrip.SnapFocusDebug.TraceVerbose, "[ToolStripDropDown.WndProc] activating thingee is " + WindowsFormsUtils.GetControlInformation(m.LParam)); 2191Debug.WriteLineIf((DropDownActivateDebug.TraceVerbose && ActiveDropDowns.Count > 0), "Dismiss children called - COUNT " + ActiveDropDowns.Count + " \r\n" + new StackTrace().ToString()); 2229Debug.WriteLineIf(DropDownActivateDebug.TraceVerbose, "Sending WM_NCACTIVATE to toplevel hwnd" + ToolStripManager.ModalMenuFilter.ActiveHwnd); 2276Debug.Assert(start != null, "Who is passing null to GetFirstDropDown?");
winforms\Managed\System\WinForms\ToolStripDropDownButton.cs (2)
133Debug.Assert(ParentInternal != null, "Parent is null here, not going to get accurate ID"); 144Debug.Assert(ParentInternal != null, "Parent is null here, not going to get accurate ID");
winforms\Managed\System\WinForms\ToolStripDropDownItem.cs (6)
555Debug.WriteLineIf(ToolStrip.SelectionDebug.TraceVerbose, "[SelectDBG ProcessDialogKey] open submenu from toplevel item"); 578Debug.WriteLineIf(ToolStrip.SelectionDebug.TraceVerbose, "[SelectDBG ProcessDialogKey] open submenu from NON-toplevel item"); 602Debug.WriteLineIf(ToolStrip.SelectionDebug.TraceVerbose, "[SelectDBG ProcessDialogKey] close submenu from NON-toplevel item"); 623Debug.WriteLineIf(ToolStrip.SelectionDebug.TraceVerbose, "[SelectDBG ProcessDialogKey] ddi calling base"); 643Debug.Fail("Why are we here"); 951Debug.Fail("No item matched the index?");
winforms\Managed\System\WinForms\ToolStripDropDownMenu.cs (3)
724Debug.Fail("Why wasn't 'UpdateScrollButtonStatus called'? We don't have the item to scroll by"); 732Debug.Fail("We're trying to scroll up, but the top item is displayed!!!"); 744Debug.Fail("We're trying to scroll down, but the top item is displayed!!!");
winforms\Managed\System\WinForms\ToolStripDropTargetManager.cs (26)
56Debug.WriteLineIf(DragDropDebug.TraceVerbose, "Ensuring drop target registered"); 66Debug.WriteLineIf(DragDropDebug.TraceVerbose, "Attempting to unregister droptarget"); 69Debug.WriteLineIf(DragDropDebug.TraceVerbose, "An item still has allowdrop set to true - cant unregister"); 74Debug.WriteLineIf(DragDropDebug.TraceVerbose, "The ToolStrip has AllowDrop or AllowItemReorder set to true - cant unregister"); 95 Debug.WriteLineIf(DragDropDebug.TraceVerbose, "[DRAG ENTER] =============="); 100 Debug.WriteLineIf(DragDropDebug.TraceVerbose, "ItemReorderTarget taking this..."); 109Debug.WriteLineIf(DragDropDebug.TraceVerbose, "ToolStripItem taking this: " + item.ToString()); 115Debug.WriteLineIf(DragDropDebug.TraceVerbose, "ToolStrip taking this because AllowDrop set to true."); 128Debug.WriteLineIf(DragDropDebug.TraceVerbose, "No one wanted it."); 135Debug.WriteLineIf(DragDropDebug.TraceVerbose, "Calling OnDragEnter on target..."); 149 Debug.WriteLineIf(DragDropDebug.TraceVerbose, "[DRAG OVER] =============="); 156 Debug.WriteLineIf(DragDropDebug.TraceVerbose, "ItemReorderTarget taking this..."); 164Debug.WriteLineIf(DragDropDebug.TraceVerbose, "ToolStripItem taking this: " + item.ToString()); 169Debug.WriteLineIf(DragDropDebug.TraceVerbose, "ToolStrip taking this because AllowDrop set to true."); 173 Debug.WriteLineIf(DragDropDebug.TraceVerbose, "No one wanted it."); 181Debug.WriteLineIf(DragDropDebug.TraceVerbose, "NEW DROP TARGET!"); 187Debug.WriteLineIf(DragDropDebug.TraceVerbose, "Calling OnDragOver on target..."); 198Debug.WriteLineIf(DragDropDebug.TraceVerbose, "[DRAG LEAVE] =============="); 201Debug.WriteLineIf(DragDropDebug.TraceVerbose, "Calling OnDragLeave on current target..."); 221Debug.WriteLineIf(DragDropDebug.TraceVerbose, "[DRAG DROP] =============="); 224Debug.WriteLineIf(DragDropDebug.TraceVerbose, "Calling OnDragDrop on current target..."); 229Debug.Assert(false, "Why is lastDropTarget null?"); 258Debug.WriteLineIf(CompModSwitches.DragDrop.TraceInfo, "Registering as drop target: " + owner.Handle.ToString()); 262Debug.WriteLineIf(CompModSwitches.DragDrop.TraceInfo, " ret:" + n.ToString(CultureInfo.InvariantCulture)); 273Debug.WriteLineIf(CompModSwitches.DragDrop.TraceInfo, "Revoking drop target: " + owner.Handle.ToString()); 277Debug.WriteLineIf(CompModSwitches.DragDrop.TraceInfo, " ret:" + n.ToString(CultureInfo.InvariantCulture));
winforms\Managed\System\WinForms\ToolStripItem.cs (25)
233Debug.Assert(accessibleObject != null, "Failed to create accessibility object"); 2535Debug.Assert(this.Owner.Items.Contains(this), "How can there be a owner and not be in the collection?"); 2685Debug.Assert(false, "Invalid event type."); 2801Debug.Assert(Enabled, "Who called me when I am disabled?"); 2802Debug.WriteLineIf(MouseDebugging.TraceVerbose, "[" + this.Text + "] HandleClick"); 2813Debug.WriteLineIf(MouseDebugging.TraceVerbose, "[" + this.Text + "] HandleItemClick"); 2820Debug.WriteLineIf(MouseDebugging.TraceVerbose, "[" + this.Text + "] HandleItemClicked"); 2875Debug.WriteLineIf(MouseDebugging.TraceVerbose, "[" + this.Text + "] MouseEnter"); 2881Debug.WriteLineIf(MouseDebugging.TraceVerbose, "[" + this.Text + "] MouseMove"); 2899Debug.WriteLineIf(MouseDebugging.TraceVerbose, "[" + this.Text + "] MouseHover"); 2915Debug.WriteLineIf(MouseDebugging.TraceVerbose, "[" + this.Text + "] MouseLeave"); 2923Debug.WriteLineIf(MouseDebugging.TraceVerbose, "[" + this.Text + "] MouseDown"); 2937Debug.WriteLineIf(MouseDebugging.TraceVerbose, "[" + this.Text + "] MouseUp"); 2961Debug.Assert(deltaTicks >= 0, "why are deltaticks less than zero? thats some mighty fast clicking"); 3541Debug.WriteLineIf(ToolStrip.SelectionDebug.TraceVerbose, "[Selection DBG] BAILING, selection is currently suspended"); 3549Debug.Assert(state[stateSelected], "calling notify selection change changed the selection state of this item"); 3848Debug.Fail("could not determine current parent"); 3893Debug.Assert((toPointType == ToolStripPointType.ToolStripCoords), "why are we here! - investigate"); 3927Debug.WriteLineIf(ToolStrip.SelectionDebug.TraceVerbose, String.Format(CultureInfo.CurrentCulture, "[Selection DBG] WBI.Unselect: {0}", this.ToString())); 3979Debug.Assert(i < count, "Item has a parent set but the parent doesn't own the item"); 4003Debug.Assert(this.ParentInternal != null, "Tool Strip Item Parent is null"); 4065Debug.Assert(ownerItem != null, "Cannot construct a ToolStripItemAccessibleObject with a null ownerItem"); 4456Debug.Fail("No item matched the index?"); 4583set { Debug.Assert(false, "We should never set the image list"); } 4764Debug.Fail("Why are we here without an owner?");
winforms\Managed\System\WinForms\ToolStripManager.cs (48)
197Debug.Fail("passed in bogus toolstrip, why?"); 221Debug.Assert(toolStrip != null, "passed in bogus toolstrip, why?"); 222Debug.Assert(start != null, "passed in bogus start, why?"); 335Debug.Assert(start != null, "why is null passed here?"); 357Debug.WriteLineIf(ToolStrip.ControlTabDebug.TraceVerbose, "SELECTNEXTTOOLSTRIP: start: " + startTabIndex.ToString(CultureInfo.CurrentCulture) + " " + start.Name); 364Debug.WriteLineIf(ToolStrip.ControlTabDebug.TraceVerbose, "FORWARD considering selection " + toolStrip.Name + " " + toolStrip.TabIndex.ToString(CultureInfo.CurrentCulture)); 377Debug.WriteLineIf(ToolStrip.ControlTabDebug.TraceVerbose, "\tFORWARD new wrap candidate " + toolStrip.Name); 383Debug.WriteLineIf(ToolStrip.ControlTabDebug.TraceVerbose, "\tREVERSE selecting " + toolStrip.Name); 396Debug.WriteLineIf(ToolStrip.ControlTabDebug.TraceVerbose, "\tREVERSE new wrap candidate " + toolStrip.Name); 401Debug.WriteLineIf(ToolStrip.ControlTabDebug.TraceVerbose, "\tREVERSE skipping wrap candidate " + toolStrip.Name + toolStrip.TabIndex.ToString(CultureInfo.CurrentCulture)); 414Debug.WriteLineIf(ToolStrip.ControlTabDebug.TraceVerbose, "SELECTING " + nextControl.Name); 419Debug.WriteLineIf(ToolStrip.ControlTabDebug.TraceVerbose, "WRAPPING " + wrappedControl.Name); 845Debug.Assert(!InMenuMode, "How did we get here if we're already in menu mode?"); 848Debug.WriteLineIf(ToolStrip.SnapFocusDebug.TraceVerbose, "___________Entering MenuMode...."); 899Debug.WriteLineIf(ToolStrip.SnapFocusDebug.TraceVerbose, "___________Exiting MenuMode...."); 1011Debug.WriteLineIf(ToolStrip.SnapFocusDebug.TraceVerbose, "[ModalMenuFilter.CloseActiveDropDown] Calling exit because there are no more dropdowns left to activate."); 1040Debug.WriteLineIf(ToolStrip.SnapFocusDebug.TraceVerbose, "[ModalMenuFilter.ProcessMouseButtonPressed] Found a mouse down."); 1069Debug.WriteLineIf(ToolStrip.SnapFocusDebug.TraceVerbose, "[ModalMenuFilter.ProcessMouseButtonPressed] Calling exit because we're a toplevel toolstrip and we've clicked somewhere else."); 1079Debug.WriteLineIf(ToolStrip.SnapFocusDebug.TraceVerbose, "[ModalMenuFilter.ProcessMouseButtonPressed] active toolstrip is null."); 1152Debug.WriteLineIf(ToolStrip.SnapFocusDebug.TraceVerbose, "[ModalMenuFilter.SetActiveToolStripCore] Detected a new dropdown not in this chain opened, Dismissing everything in the old chain. "); 1167Debug.WriteLineIf(ToolStrip.SnapFocusDebug.TraceVerbose, "[ModalMenuFilter.SetActiveToolStripCore] Setting " + WindowsFormsUtils.GetControlInformation(toolStrip.Handle) + " active."); 1180Debug.WriteLineIf(ToolStrip.SnapFocusDebug.TraceVerbose, "[ModalMenuFilter] SuspendMenuMode"); 1186Debug.WriteLineIf(ToolStrip.SnapFocusDebug.TraceVerbose, "[ModalMenuFilter] ResumeMenuMode"); 1254Debug.WriteLineIf(ToolStrip.SnapFocusDebug.TraceVerbose, "[ModalMenuFilter.PreFilterMessage] Dismissing because: " + WindowsFormsUtils.GetControlInformation(hwndCurrentActiveWindow.Handle) + " has gotten activation. "); 1260Debug.WriteLineIf(ToolStrip.SnapFocusDebug.TraceVerbose, "[ModalMenuFilter.PreFilterMessage] Calling ProcessActivationChange because: " + WindowsFormsUtils.GetControlInformation(hwndCurrentActiveWindow.Handle) + " has gotten activation. "); 1349Debug.WriteLineIf(ToolStrip.SnapFocusDebug.TraceVerbose, "[ModalMenuFilter.PreFilterMessage] MODIFYING Keyboard message " + m.ToString()); 1355Debug.WriteLineIf(ToolStrip.SnapFocusDebug.TraceVerbose, "[ModalMenuFilter.PreFilterMessage] got Keyboard message " + m.ToString()); 1420Debug.Assert(messageHookHandle != IntPtr.Zero, "Failed to install mouse hook"); 1531Debug.WriteLineIf(Control.ControlKeyboardRouting.TraceVerbose, "ToolStripManager.ProcessCmdKey - processing: [" + keyData.ToString() + "]"); 1537Debug.WriteLineIf(Control.ControlKeyboardRouting.TraceVerbose, "ToolStripManager.ProcessCmdKey - IsValidShortcut: [" + keyData.ToString() + "]"); 1542Debug.WriteLineIf(Control.ControlKeyboardRouting.TraceVerbose, "ToolStripManager.ProcessCmdKey - Checking if it's a menu key: [" + keyData.ToString() + "]"); 1563Debug.WriteLineIf(Control.ControlKeyboardRouting.TraceVerbose, "ToolStripManager.ProcessShortcut - processing: [" + shortcut.ToString() + "]"); 1572Debug.WriteLineIf(Control.ControlKeyboardRouting.TraceVerbose, "ToolStripManager.ProcessShortcut - found item on context menu: [" + item.ToString() + "]"); 1664Debug.WriteLineIf(Control.ControlKeyboardRouting.TraceVerbose, "ToolStripManager.ProcessShortcut - found item on toolstrip: [" + item.ToString() + "]"); 1690Debug.WriteLineIf(Control.ControlKeyboardRouting.TraceVerbose, "ToolStripManager.ProcessMenuKey: [" + m.ToString() + "]"); 1696Debug.WriteLineIf(ToolStrip.SnapFocusDebug.TraceVerbose, "[ProcessMenuKey] Determining whether we should send focus to MenuStrip"); 1714Debug.WriteLineIf(ToolStrip.SnapFocusDebug.TraceVerbose, String.Format(CultureInfo.CurrentCulture, "[ProcessMenuKey] MenuStripToActivate is: {0}", menuStripToActivate)); 1737Debug.WriteLineIf(ToolStrip.SnapFocusDebug.TraceVerbose, "[ProcessMenuKey] DETECTED SHIFT+F10" + keyData.ToString()); 1742Debug.WriteLineIf(ToolStrip.SnapFocusDebug.TraceVerbose, "[ProcessMenuKey] attempting to set focus to menustrip"); 1749Debug.WriteLineIf(ToolStrip.SnapFocusDebug.TraceVerbose, "[ProcessMenuKey] ToolStripManager call MenuStrip.OnMenuKey"); 1754Debug.WriteLineIf(ToolStrip.SnapFocusDebug.TraceVerbose, "[ProcessMenuKey] Resetting MenuKeyToggle"); 1766Debug.Fail("why are we passing null to GetMainMenuStrip?"); 1900Debug.Indent(); 1924Debug.Unindent(); 1945Debug.Indent(); 2039Debug.Unindent(); 2120Debug.Indent(); 2135Debug.Unindent();
winforms\Managed\System\WinForms\ToolStripMenuItem.cs (15)
704Debug.Fail("why were we called to fetch native menu item info with nothing assigned?"); 721Debug.Fail("why were we called to fetch native menu item info with nothing assigned?"); 768Debug.Fail("why were we called to fetch native menu item info with nothing assigned?"); 913Debug.WriteLineIf(ToolStrip.MenuAutoExpandDebug.TraceVerbose, "[ToolStripMenuItem.OnDropDownHide] MenuTimer.Cancel called"); 921Debug.WriteLineIf(ToolStrip.MenuAutoExpandDebug.TraceVerbose, "[ToolStripMenuItem.OnDropDownShow] MenuTimer.Cancel called"); 946Debug.WriteLineIf(ToolStrip.MenuAutoExpandDebug.TraceVerbose, "[ToolStripMenuItem.OnMouseDown] MenuTimer.Cancel called"); 976Debug.Assert(ParentInternal != null, "Parent is null here, not going to get accurate ID"); 984Debug.Assert(ParentInternal != null, "Parent is null here, not going to get accurate ID"); 1004Debug.Assert(this.ParentInternal != null, "Why is parent null"); 1008Debug.WriteLineIf(ToolStripItem.MouseDebugging.TraceVerbose, "received mouse enter - calling drop down"); 1010Debug.WriteLineIf(ToolStrip.MenuAutoExpandDebug.TraceVerbose, "[ToolStripMenuItem.OnMouseEnter] MenuTimer.Cancel / MenuTimer.Start called"); 1023Debug.WriteLineIf(ToolStrip.MenuAutoExpandDebug.TraceVerbose, "[ToolStripMenuItem.OnMouseLeave] MenuTimer.Cancel called"); 1308Debug.WriteLineIf(ToolStrip.MenuAutoExpandDebug.TraceVerbose && currentItem != value, "[MenuTimer.CurrentItem] changed: " + ((value == null) ? "null" : value.ToString())); 1337Debug.WriteLineIf(ToolStrip.MenuAutoExpandDebug.TraceVerbose, "[MenuTimer.Transition] transitioning items " + fromItem.ToString() + " " + toItem.ToString()); 1430Debug.WriteLineIf(ToolStrip.MenuAutoExpandDebug.TraceVerbose, "[MenuTimer.OnTick] calling OnMenuAutoExpand");
winforms\Managed\System\WinForms\ToolStripPanel.cs (22)
718Debug.WriteLineIf(ToolStripPanelFeedbackDebug.TraceVerbose, "FEEDBACK: creating NEW feedback at " + screenLocation.ToString()); 724Debug.WriteLineIf(ToolStripPanelFeedbackDebug.TraceVerbose, "FEEDBACK: Showing NEW feedback at " + screenLocation.ToString()); 735Debug.WriteLineIf(ToolStripPanelFeedbackDebug.TraceVerbose, "FEEDBACK: Moving feedback to " + screenLocation.ToString()); 865Debug.Fail("somehow we've gotten ourself in a situation where we're pumping an unreasonable number of paint messages, investigate."); 970Debug.Fail("Move called on immovable object."); 976Debug.WriteLineIf(ToolStripPanelDebug.TraceVerbose, String.Format(CultureInfo.CurrentCulture, "RC.MoveControl - Point {0} is not in current rafting container drag bounds {1}, calling MoveOutsideContainer", clientLocation, DragBounds)); 1037Debug.WriteLineIf(ToolStripPanelDebug.TraceVerbose, "RC.MoveControl - Point " + clientLocation + "is in the same row as the control" + draggedControl.ToolStripPanelRow.DragBounds); 1045Debug.WriteLineIf(ToolStripPanelDebug.TraceVerbose, "RC.MoveControl - Point " + clientLocation + " is outside the current rafting row."); 1049Debug.WriteLineIf(ToolStripPanelDebug.TraceVerbose, String.Format(CultureInfo.CurrentCulture, "\tThere is no row corresponding to this point, creating a new one.")); 1080Debug.WriteLineIf(ToolStripPanelRow.ToolStripPanelRowCreationDebug.TraceVerbose, "Reusing previous row"); 1090Debug.WriteLineIf(ToolStripPanelRow.ToolStripPanelRowCreationDebug.TraceVerbose, "Inserting a new row at " + index.ToString(CultureInfo.InvariantCulture)); 1097Debug.WriteLineIf(ToolStripPanelRow.ToolStripPanelRowCreationDebug.TraceVerbose, String.Format(CultureInfo.CurrentCulture, "\tThere was a row, but we cant add the control to it, creating/inserting new row.")); 1105Debug.WriteLineIf(ToolStripPanelRow.ToolStripPanelRowCreationDebug.TraceVerbose, String.Format(CultureInfo.CurrentCulture, "\tAttempts to leave the current row failed as there's no space in the next row. Since there's only one control, just keep the row.")); 1124Debug.WriteLineIf(ToolStripPanelDebug.TraceVerbose, String.Format(CultureInfo.CurrentCulture, "\tCalling JoinRow.")); 1239Debug.Fail(String.Format(CultureInfo.CurrentCulture, "ToolStripPanelRow has not been assigned! Should be set to {0}.", i)); 1242Debug.Fail(String.Format(CultureInfo.CurrentCulture, "Detected orphan cell! {0} is in row {1}. It shouldnt have a cell in {2}! \r\n\r\nTurn on DEBUG_PAINT in ToolStripPanel and ToolStripPanelRow to investigate.", cell.Control.Name, goodRowIndex, i)); 1247Debug.Fail("why do we have a cell with a null control in this row?"); 1256Debug.Write("Row " + i.ToString(CultureInfo.CurrentCulture) + ": "); 1258Debug.Write(String.Format(CultureInfo.CurrentCulture, "[{0} {1}] ", RowsInternal[i].ControlsInternal[j].Name, ((ToolStripPanelCell)RowsInternal[i].Cells[j]).Margin)); 1260Debug.Write("\r\n"); 1266Debug.Assert(RowsInternal.Count <= Controls.Count, "How did the number of rows get larger than the number of controls?"); 1296Debug.Fail(fail);
winforms\Managed\System\WinForms\ToolStripPanelCell.cs (3)
69Debug.Assert(cachedBounds.X >= 0 && cachedBounds.Y >= 0, "cached bounds are outside of the client area, investigate"); 282Debug.WriteLineIf(ToolStripPanelRow.ToolStripPanelMouseDebug.TraceVerbose, "[CELL] DRAGGING calling SetBounds " + bounds.ToString()); 288Debug.WriteLineIf(ToolStripPanelRow.ToolStripPanelMouseDebug.TraceVerbose, "[CELL] NOT DRAGGING calling SetBounds " + bounds.ToString());
winforms\Managed\System\WinForms\ToolStripPanelRow.cs (30)
76Debug.WriteLineIf(ToolStripPanelRowCreationDebug.TraceVerbose, "Created new ToolStripPanelRow"); 285Debug.WriteLineIf(ToolStripPanelRowCreationDebug.TraceVerbose, "Disposed ToolStripPanelRow"); 774Debug.WriteLineIf(ToolStripPanelRow.ToolStripPanelRowCreationDebug.TraceVerbose, "TSP RM CanMove returns false - the item moving is stretched."); 782Debug.WriteLineIf(ToolStripPanelRow.ToolStripPanelRowCreationDebug.TraceVerbose, "TSP RM CanMove returns false - the row already contains a stretched item."); 859Debug.Fail("why was a negative number given to growControlsAfter?"); 886Debug.Fail("why was a negative number given to growControlsAfter?"); 998Debug.WriteLineIf(ToolStripPanelRow.ToolStripPanelRowCreationDebug.TraceVerbose, "HorizontalRM.CanMove returns false - not enough room"); 1064Debug.WriteLineIf(ToolStripPanelMouseDebug.TraceVerbose, "MoveLeft: " + spaceToFree.ToString(CultureInfo.InvariantCulture)); 1070Debug.WriteLineIf(ToolStripPanelMouseDebug.TraceVerbose, "MoveLeft Early EXIT - 0 "); 1111Debug.WriteLineIf(ToolStripPanelMouseDebug.TraceVerbose, "MoveLeft Recovered (Margin only): " + spaceToFree.ToString(CultureInfo.InvariantCulture)); 1120Debug.WriteLineIf(ToolStripPanelMouseDebug.TraceVerbose, "MoveLeft Recovered Partial (Shrink): " + freedSpace.ToString(CultureInfo.InvariantCulture)); 1126Debug.WriteLineIf(ToolStripPanelMouseDebug.TraceVerbose, "MoveRight: " + spaceToFree.ToString(CultureInfo.InvariantCulture)); 1132Debug.WriteLineIf(ToolStripPanelMouseDebug.TraceVerbose, "MoveRight Early EXIT - 0 "); 1188Debug.Assert(cell != null, "Dont expect cell to be null here, what's going on?"); 1195Debug.WriteLineIf(ToolStripPanelMouseDebug.TraceVerbose, "MoveRight Recovered (Margin only): " + spaceToFree.ToString(CultureInfo.InvariantCulture)); 1209Debug.WriteLineIf(ToolStripPanelMouseDebug.TraceVerbose, "MoveRight Recovered (Shrink): " + spaceToFree.ToString(CultureInfo.InvariantCulture)); 1230Debug.WriteLineIf(ToolStripPanelMouseDebug.TraceVerbose, "MoveRight Recovered Partial (Shrink): " + freedSpace.ToString(CultureInfo.InvariantCulture)); 1270Debug.WriteLineIf(ToolStripPanelMouseDebug.TraceVerbose, "Horizontal JoinRow called " ); 1510Debug.WriteLineIf(ToolStripPanelRow.ToolStripPanelRowCreationDebug.TraceVerbose, "VerticalRM.CanMove returns false - not enough room"); 1578Debug.WriteLineIf(ToolStripPanelMouseDebug.TraceVerbose, "MoveUp: " + spaceToFree.ToString(CultureInfo.InvariantCulture)); 1584Debug.WriteLineIf(ToolStripPanelMouseDebug.TraceVerbose, "MoveUp Early EXIT - 0 "); 1625Debug.WriteLineIf(ToolStripPanelMouseDebug.TraceVerbose, "MoveUp Recovered (Margin only): " + spaceToFree.ToString(CultureInfo.InvariantCulture)); 1634Debug.WriteLineIf(ToolStripPanelMouseDebug.TraceVerbose, "MoveLeft Recovered Partial (Shrink): " + freedSpace.ToString(CultureInfo.InvariantCulture)); 1641Debug.WriteLineIf(ToolStripPanelMouseDebug.TraceVerbose, "MoveDown: " + spaceToFree.ToString(CultureInfo.InvariantCulture)); 1647Debug.WriteLineIf(ToolStripPanelMouseDebug.TraceVerbose, "MoveDown Early EXIT - 0 "); 1703Debug.WriteLineIf(ToolStripPanelMouseDebug.TraceVerbose, "MoveDown Recovered (Margin only): " + spaceToFree.ToString(CultureInfo.InvariantCulture)); 1717Debug.WriteLineIf(ToolStripPanelMouseDebug.TraceVerbose, "MoveDown Recovered (Shrink): " + spaceToFree.ToString(CultureInfo.InvariantCulture)); 1739Debug.WriteLineIf(ToolStripPanelMouseDebug.TraceVerbose, "MoveDown Recovered Partial (Shrink): " + recoveredSpace.ToString(CultureInfo.InvariantCulture)); 1801Debug.WriteLineIf(ToolStripPanelMouseDebug.TraceVerbose, "Vertical JoinRow called " ); 2304Debug.Assert(cell != null, "Expected ToolStripPanel cells only!!!" + arrayListEnumerator.Current.GetType().ToString());
winforms\Managed\System\WinForms\ToolStripSettings.cs (2)
274Debug.Assert(!itemLocationHash.ContainsKey(item.Name), "WARNING: ToolStripItem name not unique."); 387Debug.Assert(!String.IsNullOrEmpty(this.ToolStripPanelName), "ToolStrip was parented to a panel, but we couldn't figure out its name.");
winforms\Managed\System\WinForms\ToolStripSplitButton.cs (3)
518Debug.Assert(ParentInternal != null, "Parent is null here, not going to get accurate ID"); 546Debug.Assert(ParentInternal != null, "Parent is null here, not going to get accurate ID"); 565Debug.Assert(deltaTicks >= 0, "why are deltaticks less than zero? thats some mighty fast clicking");
winforms\Managed\System\WinForms\ToolStripSplitStackLayout.cs (2)
586Debug.Indent(); 641Debug.Unindent();
winforms\Managed\System\WinForms\ToolTip.cs (2)
180Debug.Assert(tool != null, "tool should not be null"); 908Debug.Assert(NativeMethods.TTDT_AUTOMATIC == 0, "TTDT_AUTOMATIC != 0");
winforms\Managed\System\WinForms\TrackBar.cs (3)
840Debug.Assert(minimum <= maximum, "Minimum should be <= Maximum"); 989Debug.Assert(this.cumulativeWheelData > -NativeMethods.WHEEL_DELTA, "cumulativeWheelData is too small"); 990Debug.Assert(this.cumulativeWheelData < NativeMethods.WHEEL_DELTA, "cumulativeWheelData is too big");
winforms\Managed\System\WinForms\TreeNode.cs (7)
113set { Debug.Assert(false, "We should never set the image list"); } 1159Debug.Assert(min != -1, "Bad sorting"); 1183Debug.Assert(min != -1, "Bad sorting"); 1502Debug.Assert(num > 0,"required capacity can not be less than 1"); 1825Debug.Assert(tv.IsHandleCreated, "nonexistent handle"); 1892Debug.Assert(parent != null, "toggle on virtual root"); 1920Debug.Assert(tv != null, "TreeNode has handle but no TreeView");
winforms\Managed\System\WinForms\TreeNodeCollection.cs (1)
337Debug.Assert(delta == 0,"delta should be 0");
winforms\Managed\System\WinForms\TreeView.cs (6)
1123Debug.Assert(selectedNode == null || selectedNode.TreeView != this, "handle is created, but we're still caching selectedNode"); 1141Debug.Assert(selectedNode == null || selectedNode.TreeView != this, "handle is created, but we're still caching selectedNode"); 1345Debug.Assert(topNode == null || topNode.TreeView != this, "handle is created, but we're still caching selectedNode"); 1903Debug.Assert(internalStateImageList != null, "Why are changing images when the Imagelist is null?"); 2694Debug.Assert(nmcd.nmcd.dwItemSpec != IntPtr.Zero, "Invalid node handle in ITEMPREPAINT"); 2807Debug.Assert(nmcd.nmcd.dwItemSpec != IntPtr.Zero, "Invalid node handle in ITEMPOSTPAINT");
winforms\Managed\System\WinForms\Triangle.cs (1)
100Debug.Fail("Wrong triangle enum");
winforms\Managed\System\WinForms\TrustManager.cs (29)
130Debug.Assert(matchingTrusts != null && matchingTrusts.Count > 0); 137Debug.Assert(matchingTrusts != null && matchingTrusts.Count > 0); 176Debug.Assert(!permissionElevationRequired); 299Debug.Fail("Exception occurred while locating default browser executable: " + ex.Message); 307Debug.Assert(signedManifest != null); 308Debug.Assert(signedManifest.AuthenticodeSignerInfo != null); 342Debug.Assert(parsedData != null); 343Debug.Assert(ms != null); 424Debug.Assert(info != null); 442Debug.Assert(permSetDefaultZone != null); 443Debug.Assert(permSetRequested != null); 480Debug.Fail("Error occurred while showing basic install dialog: " + ex.Message); 549Debug.Assert(info != null); 550Debug.Assert(matchingTrusts != null); 577Debug.Assert(permSetGranted != null); 578Debug.Assert(permSetRequested != null); 619Debug.Fail("Exception occurred in ExtractDeploymentManifestContent."); 657Debug.Assert(info != null); 672Debug.Assert(info != null); 722Debug.Fail("Exception occurred in GetHostFromDeploymentUrl: " + ex.Message); 732Debug.Assert(hostContextInternal != null); 733Debug.Assert(zoneName != null); 734Debug.Assert(parsedData != null); 771Debug.Fail("Unexpected SecurityZone in GetZoneNameFromDeploymentUrl"); 823Debug.Fail("Exception occurred in GetZonePromptingLevel: " + ex.Message); 854Debug.Fail("Error occurred while showing high risk dialog: " + ex.Message); 887Debug.Fail("Error occurred while showing error dialog: " + ex.Message); 941Debug.Fail("Error parsing manifest: " + e.Message); 949Debug.Assert(matchingTrusts != null);
winforms\Managed\System\WinForms\TrustManagerMoreInformation.cs (3)
126Debug.Assert((options & TrustManagerPromptOptions.InternetSource) != 0); 179Debug.Assert((options & TrustManagerPromptOptions.UntrustedSitesSource) != 0); 384Debug.Assert(warningLevel == TrustManagerWarningLevel.Red);
winforms\Managed\System\WinForms\TrustManagerPromptUI.cs (9)
489Debug.Assert(this.m_certificate != null); 598Debug.Assert(m_certificate != null); 674Debug.Assert(warningLevel == TrustManagerWarningLevel.Red); 769Debug.Fail("Error occurred while showing More Information: " + ex.Message); 780Debug.Assert(m_certificate != null); 785Debug.Fail("Couldn't display certificate: " + ex.Message); 796Debug.Assert(this.m_defaultBrowserExePath != null); 797Debug.Assert(this.m_certificate != null); 802Debug.Fail("Couldn't launch support Url: " + ex.Message);
winforms\Managed\System\WinForms\UnsafeNativeMethods.cs (4)
1150Debug.Assert(false, "GetSystemMetricsForDpi() is not available on this OS"); 1184Debug.Assert(false, "SystemParametersInfoForDpi() is not available on this OS"); 1679Debug.Assert(regionDataSize == pRgnDataHeader->cbSizeOfStruct + pRgnDataHeader->nCount * pRgnDataHeader->nRgnSize); 1680Debug.Assert(Marshal.SizeOf(typeof(NativeMethods.RECT)) == pRgnDataHeader->nRgnSize || pRgnDataHeader->nRgnSize == 0);
winforms\Managed\System\WinForms\UpDownBase.cs (6)
925Debug.Assert(UserEdit == false, "OnTextBoxTextChanged() - UserEdit == true"); 1005Debug.Assert(this.wheelDelta > -NativeMethods.WHEEL_DELTA, "wheelDelta is too smal"); 1006Debug.Assert(this.wheelDelta < NativeMethods.WHEEL_DELTA, "wheelDelta is too big"); 1547Debug.Assert(!(pushed != ButtonID.None && captured == ButtonID.None), 1629Debug.Assert(!(pushed != ButtonID.None && captured == ButtonID.None), 1649Debug.Assert(!(pushed != ButtonID.None && captured == ButtonID.None),
winforms\Managed\System\WinForms\WebBrowser.cs (10)
299Debug.Assert(psi != null, "Object isn't an IPersistStreamInit!"); 377Debug.Assert(htmlDocument2 != null, "The HtmlDocument object must implement IHTMLDocument2."); 404Debug.Assert(htmlDocument2 != null, "The HtmlDocument object must implement IHTMLDocument2."); 1922Debug.Assert(parent != null, "Parent should have been set"); 1926Debug.Assert(urlObject == null || urlObject is string, "invalid url type"); 1927Debug.Assert(targetFrameName == null || targetFrameName is string, "invalid targetFrameName type"); 1928Debug.Assert(headers == null || headers is string, "invalid headers type"); 1953Debug.Assert(urlObject == null || urlObject is string, "invalid url"); 1959Debug.Assert(psi != null, "The Document does not implement IPersistStreamInit"); 1985Debug.Assert(urlObject == null || urlObject is string, "invalid url type");
winforms\Managed\System\WinForms\WebBrowserBase.cs (29)
318Debug.WriteLineIf(ControlKeyboardRouting.TraceVerbose, "\t Message translated to " + win32Message); 349Debug.WriteLineIf(ControlKeyboardRouting.TraceVerbose, "\t Message processed by site. Calling base.PreProcessMessage() " + msg); 354Debug.WriteLineIf(ControlKeyboardRouting.TraceVerbose, "\t Message not processed by site. Returning false. " + msg); 412Debug.Fail("error in processMnemonic"); 680Debug.Assert(this.ActiveXState == WebBrowserHelper.AXState.Loaded, "Failed transition"); 684Debug.Assert(this.ActiveXState == WebBrowserHelper.AXState.Running, "Failed transition"); 688Debug.Assert(this.ActiveXState == WebBrowserHelper.AXState.InPlaceActive, "Failed transition"); 692Debug.Assert(this.ActiveXState == WebBrowserHelper.AXState.UIActive, "Failed transition"); 695Debug.Fail("bad state"); 716Debug.Assert(this.ActiveXState == WebBrowserHelper.AXState.InPlaceActive, "Failed transition"); 720Debug.Assert(this.ActiveXState == WebBrowserHelper.AXState.Running, "Failed transition"); 724Debug.Assert(this.ActiveXState == WebBrowserHelper.AXState.Loaded, "Failed transition"); 728Debug.Assert(this.ActiveXState == WebBrowserHelper.AXState.Passive, "Failed transition"); 731Debug.Fail("bad state"); 747Debug.Assert(hr == NativeMethods.S_OK, String.Format(CultureInfo.CurrentCulture, "DoVerb call failed for verb 0x{0:X}", verb)); 909Debug.Assert(this.ActiveXState == WebBrowserHelper.AXState.Passive, "Wrong start state to transition from"); 913Debug.Assert(activeXInstance == null, "activeXInstance must be null"); 915Debug.Assert(activeXInstance != null, "w/o an exception being thrown we must have an object..."); 929Debug.Assert(this.ActiveXState == WebBrowserHelper.AXState.Loaded, "Wrong start state to transition from"); 958Debug.Assert(this.ActiveXState == WebBrowserHelper.AXState.Loaded, "Wrong start state to transition from"); 985Debug.Assert(this.ActiveXState == WebBrowserHelper.AXState.Running, "Wrong start state to transition from"); 1007Debug.Assert(this.ActiveXState == WebBrowserHelper.AXState.Running, "Wrong start state to transition from"); 1027Debug.Assert(this.ActiveXState == WebBrowserHelper.AXState.InPlaceActive, "Wrong start state to transition from"); 1048Debug.Assert(this.ActiveXState == WebBrowserHelper.AXState.InPlaceActive, "Wrong start state to transition from"); 1064Debug.Assert(this.ActiveXState == WebBrowserHelper.AXState.UIActive, "Wrong start state to transition from"); 1067Debug.Assert(NativeMethods.Succeeded(hr), "Failed to UIDeactivate"); 1084Debug.Assert(activeXInstance != null, "The native control is null"); 1168Debug.Fail(e.ToString()); 1251Debug.Fail(ex.ToString());
winforms\Managed\System\WinForms\WebBrowserContainer.cs (7)
51Debug.Assert(parent != null, "gotta have it..."); 113Debug.Fail(t.ToString()); 116Debug.Fail("control " + ctlInEditMode.ToString() + " did not reset its edit mode to null"); 199Debug.Assert(rval == null || assocContainer == null || rval == assocContainer, 229Debug.Assert(parent.Site == null, "Parent is sited but we could not find IContainer!!!"); 354Debug.Assert(siteUIActive == null, "Object did not call OnUIDeactivate"); 386Debug.Assert(ctlInEditMode == null || ctlInEditMode == ctl, "who is exiting edit mode?");
winforms\Managed\System\WinForms\WebBrowserHelper.cs (1)
155Debug.Assert(o == null || o is ISelectionService, "service must implement ISelectionService");
winforms\Managed\System\WinForms\WebBrowserSiteBase.cs (4)
168Debug.Assert(!this.Host.GetAXHostState(WebBrowserHelper.siteProcessedInputKey), "Re-entering UnsafeNativeMethods.IOleControlSite.TranslateAccelerator!!!"); 266Debug.Fail(t.ToString()); 402Debug.Fail(t.ToString()); 451Debug.Fail(t.ToString());
winforms\Managed\System\WinForms\WinCategoryAttribute.cs (1)
50Debug.Assert(localizedValue != null, "All Windows Forms category attributes should have localized strings. Category '" + value + "' not found.");
winforms\Managed\System\WinForms\WindowsFormsSectionHandler.cs (1)
22Debug.Fail("Exception loading config for windows forms");
winforms\Managed\System\WinForms\WindowsFormsSynchronizationContext.cs (5)
40Debug.Assert(context != null); 44Debug.Assert(controlToSendTo.IsHandleCreated, "Marshaling control should have created its handle in its ctor."); 50Debug.Assert(controlToSendTo.IsHandleCreated, "Marshaling control should have created its handle in its ctor."); 84Debug.Assert(controlToSendTo != null, "Should always have the marshaling control by this point"); 93Debug.Assert(controlToSendTo != null, "Should always have the marshaling control by this point");
winforms\Managed\System\WinForms\WinFormsUtils.cs (15)
362Debug.Assert(Marshal.SizeOf(typeof(int)) == 4, "The impossible has happened."); 369Debug.Assert(component != null, "component passed here cannot be null"); 453Debug.Assert(count == 0 || array != null, "if array is null, count should be 0"); 454Debug.Assert(array == null || count <= array.Length, "Trying to enumerate more than the array contains"); 627Debug.Assert(success, "GetViewportOrgEx() failed."); 631Debug.Assert(hClippingRegion.Handle != IntPtr.Zero, "CreateRectRgn() failed."); 637Debug.Assert(hOriginalClippingRegion.Handle != IntPtr.Zero, "CreateRectRgn() failed."); 641Debug.Assert(result != -1, "GetClipRgn() failed."); 646Debug.Assert(success, "SetViewportOrgEx() failed."); 653Debug.Assert(originalRegionType != NativeMethods.RegionFlags.ERROR, "ERROR returned from SelectClipRgn while selecting the original clipping region.."); 662Debug.Assert((combineResult == NativeMethods.RegionFlags.SIMPLEREGION) || 678Debug.Assert((selectResult == NativeMethods.RegionFlags.SIMPLEREGION || 698Debug.Assert(success, "DeleteObject(hClippingRegion) failed."); 702Debug.Assert(success, "DeleteObject(hOriginalClippingRegion) failed."); 734Debug.Assert(this.dc != null, "unexpected null dc!");
System.Windows.Forms.DataVisualization (5)
Common\Annotation\AnnotationBase.cs (1)
3302Debug.Assert(axisName != null, "GetAxisByName: handed a null axis name");
Common\ChartTypes\ErrorBarChart.cs (1)
1787System.Diagnostics.Debug.Fail("Unknown ErrorBarType=" + errorBarType.ToString());
Common\Formulas\FormulaHelpers.cs (1)
112Debug.Fail(String.Format(CultureInfo.InvariantCulture, "{0} case is not defined", formula));
Common\General\AxisScale.cs (1)
1196System.Diagnostics.Debug.Assert(this._intervalsStore.Count == 5, "Fail in interval store count");
Common\General\Chart.cs (1)
3527Debug.Assert(url != null, "LoadTemplateData: handed a null url string");
System.Workflow.Activities (146)
Common\CompModHelpers.cs (3)
553Debug.WriteLine("Error loading install directory: " + error.ToString(CultureInfo.CurrentCulture)); 603Debug.WriteLine("Error loading 3.0 install directory: " + error.ToString(CultureInfo.CurrentCulture)); 998Debug.Assert(false, "Invalid argument type. 'output' must either be string or TextWriter.");
ConstrainedGroup.cs (16)
222Debug.Assert(currentActivity != null); 227Debug.Assert(currentActivity == addedActivity.Parent, "Attempting to add wrong activity to CAG"); 243Debug.Assert(cag != null); 326Debug.Assert(cag != null); 327Debug.Assert(context != null); 426Debug.Assert(cag != null); 427Debug.Assert(context != null); 453Debug.Assert(cag != null); 454Debug.Assert(childActivity != null); 455Debug.Assert(context != null); 456Debug.Assert(childActivity.ExecutionStatus == ActivityExecutionStatus.Initialized); 510Debug.Assert(false, "This CAG activity handler does not handle this event"); 522Debug.Assert(cag == args1.Activity.Parent, "Received event for non-child of CAG"); 635Debug.Assert(context != null); 636Debug.Assert(childActivity != null); 637Debug.Assert(childActivity.ExecutionStatus == ActivityExecutionStatus.Closed);
Delay.cs (4)
287System.Diagnostics.Debug.Assert(this.SubscriptionID != Guid.Empty); 325Debug.Assert(timers != null, "TimerEventSubscriptionCollection on root activity should never be null, but it was"); 336System.Diagnostics.Debug.Assert(this.SubscriptionID != Guid.Empty); 358Debug.Assert(timers != null, "TimerEventSubscriptionCollection on root activity should never be null, but it was");
Designers\ConditionalDesigner.cs (1)
89Debug.Assert(compositeDesignerTheme != null);
Designers\ListenDesigner.cs (1)
69Debug.Assert(compositeDesignerTheme != null);
Designers\SetStateDesigner.cs (3)
261Debug.Assert(activity != null); 304Debug.Assert(dropDownList != null); 305Debug.Assert(activity != null);
Designers\StateDesigner.cs (11)
514Debug.Assert((value == null) || (value != null && _activeDesigner == null)); 597Debug.Assert(this.IsRootStateDesigner); 954Debug.Assert(currentState != null); 1155Debug.Assert(targetDesignerLayoutConnectionPoint != null); 1162Debug.Assert(targetDesignerLayoutConnectionPoint == null); 1471Debug.Assert(!this.HasActiveDesigner && this.NeedsAutoLayout); 1493Debug.Assert(IsRootDesigner && InvokingDesigner == null); 1664Debug.Assert(this.IsRootStateDesigner); 1665Debug.Assert(this.ActiveDesigner == null); 1756Debug.Assert(eventHandler != null); 1780Debug.Assert(targetState != null);
Designers\StateDesigner.Layouts.cs (2)
32Debug.Assert(designerEdges == DesignerEdges.Left || designerEdges == DesignerEdges.Right); 42Debug.Assert(this.DesignerEdges == DesignerEdges.Left || this.DesignerEdges == DesignerEdges.Right);
Designers\StateMachineDesignerPaint.cs (3)
79Debug.Assert(points.Length >= 2); 208Debug.Assert(points.Length >= 2); 350Debug.Assert(start.X == end.X || start.Y == end.Y);
Designers\WhileDesigner.cs (2)
37Debug.Assert(compositeDesignerTheme != null); 73Debug.Assert(designerTheme != null);
EventHandlers.cs (1)
323Debug.Assert(!handlers.IsScopeCompleted, "Only notified of scope body completion once");
InvokeWebService.cs (1)
117System.Diagnostics.Debug.Assert(proxy != null);
Listen.cs (1)
134Debug.Assert(addedActivity is EventDrivenActivity, "Listen only contains EventDriven activities");
LocalService\CorrelationResolver.cs (2)
203Debug.Assert(false, "locationPath points to something other than a Field/Property"); 416Debug.Assert(aliasAttribute.Name != null);
Role\DirectoryLocalQuery.cs (1)
59System.Diagnostics.Debug.Assert(false);
Role\DirectoryRedirect.cs (1)
85System.Diagnostics.Debug.Assert(values.Count == 1);
Role\DirectoryRootQuery.cs (1)
59System.Diagnostics.Debug.Assert(false);
Rules\Expressions.cs (3)
1589System.Diagnostics.Debug.Assert(arrayType.IsArray); 2540System.Diagnostics.Debug.Assert(arrayType.IsArray); 3095System.Diagnostics.Debug.Assert(arrayType.IsArray);
Rules\Helpers.cs (1)
265Debug.Assert(methodInfo != null, "Missing GetEnumType method on the DesignTimeType!");
Rules\Literal.cs (1)
552Debug.Assert(false, "Operator " + op.ToString() + " not implemented");
Rules\Parser\Parser.cs (13)
466System.Diagnostics.Debug.Assert(methods[m].MemberType == MemberTypes.Method, "expect methods only"); 697System.Diagnostics.Debug.Assert(namespaces.Length > 0); 947System.Diagnostics.Debug.Assert(parserContext.NextToken().TokenID == TokenID.EndOfInput); 1423System.Diagnostics.Debug.Assert(parserContext.CurrentToken.TokenID == TokenID.LBracket); 1494System.Diagnostics.Debug.Assert(parserContext.CurrentToken.TokenID == TokenID.Dot); 1529System.Diagnostics.Debug.Assert(parserContext.CurrentToken.TokenID == TokenID.LParen); 1666System.Diagnostics.Debug.Assert(parserContext.CurrentToken.TokenID == TokenID.LParen); 1912System.Diagnostics.Debug.Assert(parserContext.CurrentToken.TokenID == TokenID.LParen); 2228System.Diagnostics.Debug.Assert(parserContext.CurrentToken.TokenID == TokenID.Dot); 2315System.Diagnostics.Debug.Assert(parserContext.CurrentToken.TokenID == TokenID.Less); 2333System.Diagnostics.Debug.Assert(parserContext.CurrentToken.TokenID == TokenID.Less); 2655System.Diagnostics.Debug.Assert(paramType.IsArray, "last parameter in 'params' list must have an array type"); 2692System.Diagnostics.Debug.Assert(numCandidates > 0, "expected at least one candidate");
Rules\Parser\Symbol.cs (1)
102System.Diagnostics.Debug.Assert(typeSymbol != null);
Rules\RuleValidation.cs (17)
180Debug.Assert(method.IsStatic, "Expected static method as an extension method"); 323Debug.Assert(method.IsStatic, "Expected static method as an lifted method"); 427Debug.Assert(expectedParameters.Length == 1, "not 1 parameters"); 456Debug.Assert(expectedParameters.Length == 2, "not 2 parameters"); 488Debug.Assert(method.ReturnType == typeof(bool), "not a bool result"); 489Debug.Assert(expectedParameters.Length == 2, "not 2 parameters"); 519Debug.Assert(method.ReturnType == typeof(bool), "not a bool result"); 520Debug.Assert(expectedParameters.Length == 2, "not 2 parameters"); 942Debug.Assert(WorkflowCompilationContext.Current != null, "Can't have checkTypes set to true without a context in scope"); 1105Debug.Assert(ruleExpr != null, "Validation::ValidateSubexpression - IRuleExpression is null"); 1106Debug.Assert(expr != null, "Validation::ValidateSubexpression - CodeExpression is null"); 2383System.Diagnostics.Debug.Assert(member.MemberType == MemberTypes.Property, "only properties can be overloaded"); 2740System.Diagnostics.Debug.Assert(arguments.Count == this.signature.Count); 2741System.Diagnostics.Debug.Assert(arguments.Count == other.signature.Count); 3078Debug.Assert(numCandidates > 0, "expected at least one candidate"); 3826Debug.Assert(!type.IsPointer && !type.IsByRef, 3860Debug.Assert((!type.IsGenericType || type.IsGenericTypeDefinition) && !type.HasElementType,
SetState.cs (3)
100Debug.Assert(enclosingState != null); // this should be caught by the SetStateContainment.Validate call above 151Debug.Assert(activity != null); 169Debug.Assert(activity != null);
SR.cs (5)
23System.Diagnostics.Debug.Assert(DescriptionValue != null, string.Format(CultureInfo.CurrentCulture, "String resource {0} not found.", description)); 49System.Diagnostics.Debug.Assert(localizedString != null, string.Format(CultureInfo.CurrentCulture, "String resource {0} not found.", value)); 71System.Diagnostics.Debug.Assert(DisplayNameValue != null, string.Format(CultureInfo.CurrentCulture, "String resource {0} not found.", name)); 112System.Diagnostics.Debug.Assert(res != null, string.Format(CultureInfo.CurrentCulture, "String resource {0} not found.", name)); 134System.Diagnostics.Debug.Assert(res != null, string.Format(CultureInfo.CurrentCulture, "String resource {0} not found.", name));
State.cs (8)
197Debug.Assert(StateMachineHelpers.IsLeafState(state)); 278Debug.Assert(executionContext.Activity == this); 322Debug.Assert(!executionState.SchedulerBusy); 349Debug.Assert(!executionState.SchedulerBusy); 435Debug.Assert(!executionState.HasEnqueuedActions); 459Debug.Assert(!executionState.HasEnqueuedActions); 524Debug.Assert(StateMachineHelpers.IsLeafState(state), 532Debug.Assert(StateMachineHelpers.IsLeafState(state),
StateMachineAction.cs (5)
79Debug.Assert(context.Activity.QualifiedName.Equals(this.StateName)); 127Debug.Assert(childState.Enabled); 155Debug.Assert(eventDriven.Enabled); 183Debug.Assert(eventDriven.Enabled); 211Debug.Assert(eventDriven.Enabled);
StateMachineExecutionState.cs (3)
142Debug.Assert(!this._queueLocked); 260Debug.Assert(StateMachineHelpers.IsRootState(state)); 262Debug.Assert(executionState != null);
StateMachineHelpers.cs (14)
66Debug.Assert(activity != null); 67Debug.Assert(activity.Parent != activity); 86Debug.Assert(state != null); 87Debug.Assert(state.Parent != state); 102Debug.Assert(state != null); 113Debug.Assert(state != null); 130Debug.Assert(state != null); 163Debug.Assert(state != null, "StateMachineHelpers.GetCurrentState: only valid to call this method from a State executor or a contained EventDriven"); 172Debug.Assert(currentState == null || IsLeafState(currentState)); 204Debug.Assert(state != null); 205Debug.Assert(qualifiedName != null); 217Debug.Assert(compositeActivity != null); 243Debug.Assert(eventDriven.EnabledActivities.Count > 0); 245Debug.Assert(eventActivity != null);
StateMachineSubscription.cs (2)
143Debug.Assert(!executionState.HasEnqueuedActions); 235Debug.Assert(!executionState.HasEnqueuedActions);
StateMachineSubscriptionManager.cs (4)
167Debug.Assert(!this.Subscriptions.ContainsKey(queueName)); 173Debug.Assert(IsEventDrivenSubscribed(eventDriven)); 188Debug.Assert(subscription.QueueName != null); 223Debug.Assert(subscription.QueueName != null);
StateMachineWorkflowInstance.cs (2)
209Debug.Assert(queueInfo.SubscribedActivityNames.Count == 1); 234Debug.Assert(eventDriven != null);
Task.cs (6)
500Debug.Assert(this.ActivityState.Contains(e.ChildStateInfo)); 501Debug.Assert(e.ChildStateInfo.Status == ChildRunStatus.PendingExecute); 509System.Diagnostics.Debug.Assert(childStateInfo.MarkedForRemoval); 527System.Diagnostics.Debug.Assert(childStateInfo.Status != ChildRunStatus.Running); 612System.Diagnostics.Debug.Assert(this.ExecutionType == ExecutionType.Parallel); 842Debug.Assert(false, "Child State Info not Found for the RunID");
WebServiceFault.cs (2)
149Debug.Assert(queueService.Exists(queueId)); 156System.Diagnostics.Debug.Assert(responseMessage != null);
WebServiceReceive.cs (1)
666Debug.Assert(webserviceInput.InterfaceType != null, "Interface type should not be null");
While.cs (1)
130System.Diagnostics.Debug.Assert(false);
System.Workflow.ComponentModel (148)
AuthoringOM\Activity.cs (1)
588Debug.Assert(lockCountOnStatusChange > 0, "lock count on status change should be > 0");
AuthoringOM\ActivityExecutionContext.cs (1)
241Debug.Assert(activity.ExecutionStatus == ActivityExecutionStatus.Executing);
AuthoringOM\ActivityExecutor.cs (1)
77System.Diagnostics.Debug.Assert(activity is ICompensatableActivity, "should not get Compensate, if activity is not compensatable");
AuthoringOM\Behaviors\ExceptionHandlers.cs (1)
52Debug.Assert(this.Parent.GetValue(ActivityExecutionContext.CurrentExceptionProperty) != null, "No Exception contained by parent");
AuthoringOM\Bind.cs (1)
260Debug.Assert(WorkflowCompilationContext.Current != null, "Can't have checkTypes set to true without a context in scope");
AuthoringOM\Compiler\TypeSystem\TypeProvider.cs (3)
884Debug.Assert(codeDomLoader != null, "How come we don't have CodeDOMLoader for the guy who needs refresh?"); 925Debug.Assert(this.designTimeTypes.Contains(typeName), "How come you are removing type which you did not push in."); 961Debug.Assert(false, "One of the event listener threw an Exception. \n" + e.ToString());
AuthoringOM\Compiler\Validation\ActivityValidator.cs (1)
55System.Diagnostics.Debug.Assert(manager.Context.Current == activity, "Unwinding contextStack: the item that is about to be popped is not the one we pushed.");
AuthoringOM\Compiler\Validation\DependencyObjectValidator.cs (2)
141System.Diagnostics.Debug.Assert(manager.Context.Current == childContext, "Unwinding contextStack: the item that is about to be popped is not the one we pushed."); 169System.Diagnostics.Debug.Assert(manager.Context.Current == propertyValidationContext, "Unwinding contextStack: the item that is about to be popped is not the one we pushed.");
AuthoringOM\Compiler\Validation\Validator.cs (2)
127System.Diagnostics.Debug.Assert(manager.Context.Current == childContext, "Unwinding contextStack: the item that is about to be popped is not the one we pushed."); 135System.Diagnostics.Debug.Assert(manager.Context.Current == propertyValidationContext, "Unwinding contextStack: the item that is about to be popped is not the one we pushed.");
AuthoringOM\Compiler\XomlCompilerHelpers.cs (1)
377Debug.Assert(parameters.MultiTargetingInformation == null, "Shouldn't come here if opted to MT support");
AuthoringOM\ComponentFactoryHelpers.cs (1)
105System.Diagnostics.Debug.Assert(false, "wrong attribute type");
AuthoringOM\DependencyProperty.cs (1)
365Debug.Assert(this.name != null && this.ownerType != null);
AuthoringOM\Design\ActivityDesigner.cs (3)
454Debug.WriteLine("Validate call failed"); 463Debug.Assert(error != null, "someone inserted a null or no 'ValidationError' type error in errors collection."); 2117Debug.Assert(serviceProvider != null);
AuthoringOM\Design\ActivityPreviewDesigner.cs (1)
980Debug.Assert(item.UserData[DesignerUserDataKeys.Activity] is Activity);
AuthoringOM\Design\CommandSet.cs (1)
48Debug.Assert(serviceProvider != null);
AuthoringOM\Design\ComponentSerializationService.cs (1)
258System.Diagnostics.Debug.Assert(obj == xomlSerializationManager.Context.Current, "Serialization Store did not remove object which it pushed onto the stack.");
AuthoringOM\Design\CompositeActivityDesigner.cs (1)
924Debug.Assert(activity.Parent != null);
AuthoringOM\Design\Connector.cs (7)
1101Debug.Assert(validEditPoints); 1110Debug.Assert(false); 1205Debug.Assert(false); 1231Debug.Assert(false); 1243Debug.Assert(validEditPoints); 1288Debug.Assert(false); 2704Debug.Assert(!(p != this.point1 && p != this.point2), "wrong extension requested");
AuthoringOM\Design\DesignerHelpers.cs (7)
958Debug.Assert(false, msg); 966Debug.Assert(false, msg); 974Debug.Assert(false, msg); 982Debug.Assert(false, msg); 990Debug.Assert(false, msg); 1132Debug.Assert(false, msg); 1879Debug.Assert(segments.Length > 0);
AuthoringOM\Design\DesignerResources.cs (1)
237System.Diagnostics.Debug.Assert(str != null, string.Format(culture, "String resource {0} not found.", new object[] { resID }));
AuthoringOM\Design\DesignerWidgets.cs (3)
267Debug.Assert(serviceProvider != null); 582Debug.Assert(serviceProvider != null); 2432Debug.Assert(parentDesigner != null);
AuthoringOM\Design\Dialogs\ThemeConfigurationDialog.cs (7)
661Debug.Assert(false, string.Format(CultureInfo.CurrentCulture, "Could not load type '{0}'", stockTypeName)); 811Debug.Assert(parentCatagoryTreeNode != null); 935Debug.Assert(host != null); 980Debug.Assert(host != null); 983Debug.Assert(rootDecl != null); 1062Debug.Assert(host != null); 1067Debug.Assert(dummyActivity != null);
AuthoringOM\Design\Dialogs\TypeBrowserDialog.cs (1)
876Debug.WriteLine("Count not retrieve attributes from type:" + e.Message);
AuthoringOM\Design\DocumentOutline.cs (1)
31Debug.Assert(serviceProvider != null, "Creating WorkflowOutline without service host");
AuthoringOM\Design\FreeFormDesigner.cs (1)
901Debug.Assert(false);
AuthoringOM\Design\MessageFilters\ConnectionManager.cs (1)
327Debug.Assert(false);
AuthoringOM\Design\MessageFilters\DragDropManager.cs (8)
77Debug.Assert(this.draggedDesigner == null); 78Debug.Assert(this.dropTargetDesigner == null); 99Debug.Assert(this.dropTargetDesigner == null); 150Debug.Assert(this.dropTargetDesigner == null); 205Debug.Assert(this.dropTargetDesigner == null); 220Debug.Assert(this.dropTargetDesigner == null); 235Debug.Assert(this.dropTargetDesigner == null); 269Debug.Assert(this.dragImage == null);
AuthoringOM\Design\MessageFilters\DragSelectionMessageFilter.cs (1)
47Debug.Assert(this.dragStarted == false);
AuthoringOM\Design\MessageFilters\FreeFormDragDropManager.cs (3)
164Debug.Assert(locations.Length == DraggedActivities.Count); 165Debug.Assert(this.draggedDesignerImages.Count == DraggedActivities.Count); 239Debug.Assert(false);
AuthoringOM\Design\MessageFilters\ResizingMessageFilter.cs (1)
231Debug.Assert(false);
AuthoringOM\Design\MessageFilters\WindowManager.cs (2)
360Debug.WriteLine(e); 370Debug.WriteLine(e);
AuthoringOM\Design\MessageFilters\ZoomingMessageFilter.cs (1)
165Debug.Assert(this.currentState == ZoomState.In && CanContinueZooming && this.fastZoomingMessageFilter != null);
AuthoringOM\Design\PropertyDescriptors.cs (1)
944Debug.Assert(false, "SetValue should not be called on readonly property!");
AuthoringOM\Design\ReferenceService.cs (4)
77Debug.Assert(cs != null, "Reference service relies on IComponentChangeService"); 91Debug.Fail("Reference service cannot operate without IContainer"); 329Debug.Assert(trailingName != null, "Expected a trailing name"); 330Debug.Assert(reference != null, "Expected a reference");
AuthoringOM\Design\SecondaryViewProvider.cs (3)
38Debug.Assert(designer.Activity != null); 114Debug.Assert(activityType != null); 182Debug.Assert(activityType != null);
AuthoringOM\Design\Themes.cs (9)
309Debug.Assert(false, "Install directory key is missing!"); 320Debug.Assert(path != null && path.Length > 0); 425Debug.Assert(standardThemeParams != null); 746Debug.WriteLine(errors); 833Debug.Assert(item.ApplyTo != null && item.ApplyTo.Length > 0); 3065Debug.Assert(this.fontName != null && this.fontName.Length > 0); 3070Debug.Assert(supportedFonts.Contains(this.fontName)); 3088Debug.Assert(this.fontName != null && this.fontName.Length > 0); 3093Debug.Assert(supportedFonts.Contains(this.fontName));
AuthoringOM\Design\WorkflowLayouts.cs (10)
25Debug.Assert(serviceProvider != null); 32Debug.Assert(this.parentView != null); 135Debug.Assert(graphics != null); 139Debug.Assert(memoryBitmap != null); 190Debug.Assert(graphics != null); 194Debug.Assert(memoryBitmap != null); 515Debug.Assert(graphics != null); 520Debug.Assert(memoryBitmap != null); 585Debug.Assert(graphics != null); 587Debug.Assert(memoryBitmap != null);
AuthoringOM\Design\WorkflowView.cs (13)
151Debug.Assert(serviceProvider != null); 698Debug.Assert(value != null); 1059Debug.WriteLine(ex); 1075Debug.WriteLine(ex); 1558Debug.Assert(memoryBitmap != null); 1620Debug.WriteLine(e); 1641Debug.WriteLine(e); 1690Debug.WriteLine(ex); 1784Debug.WriteLine(ex); 1971Debug.Assert(filters.Count == 0); 1980Debug.Assert(this.rootDesigner != null); 2075Debug.Assert(this.activeLayout != null, "active layout should not be null"); 2201Debug.Assert(false, "WorkflowView poped wrong message context");
AuthoringOM\Helpers.cs (1)
21Debug.Assert(activity.Parent != null, "If this is a built-in activity, its parent should never be null.");
AuthoringOM\ScheduleChanges.cs (3)
242Debug.Assert(result, "ApplyTo failed"); 523Debug.Assert(serviceProvider != null); 546Debug.Assert(result, "ApplyTo Failed");
AuthoringOM\Serializer\ActivityMarkupSerializer.cs (4)
51Debug.Assert(false); 98Debug.Assert(false); 136System.Diagnostics.Debug.Assert(startLine + 1 == lineNumber && startColumn + 1 == linePosition, "Error getting (line, column)!"); 162Debug.Assert(false);
AuthoringOM\Serializer\ActivitySurrogate.cs (3)
47Debug.Assert(members[0].Name == "dependencyPropertyValues" && members[1].Name == "disposed"); 237Debug.Assert(result, "ApplyTo failed"); 265Debug.Assert(members[0].Name == "dependencyPropertyValues" && members[1].Name == "disposed");
AuthoringOM\Serializer\DependencyObjectCodeDomSerializer.cs (2)
188Debug.Assert(indexOfDot != -1, "Wrong property name in DesignTimeTypeNames hashtable."); 222System.Diagnostics.Debug.Assert(pushedActivity == activity);
AuthoringOM\Serializer\DictionaryMarkupSerializer.cs (1)
161Debug.Assert(false, "Dictionary Entry not found in the WorkflowMarkupStack");
AuthoringOM\Serializer\MarkupExtensionSerializer.cs (1)
163Debug.Assert((PropertyInfo)serializationManager.Context.Current == serializableProperty, "Serializer did not remove an object it pushed into stack.");
AuthoringOM\Serializer\SynchronizationHandlesCodeDomSerializer.cs (1)
28System.Diagnostics.Debug.Assert(statements != null);
AuthoringOM\Serializer\WorkflowMarkupSerializer.cs (14)
252Debug.Assert(serializationManager.Context.Current == obj, "Serializer did not remove an object it pushed into stack."); 358Debug.Assert(serializationManager.Context.Current == dependencyProperty, "Serializer did not remove an object it pushed into stack."); 374Debug.Assert((PropertyInfo)serializationManager.Context.Current == property, "Serializer did not remove an object it pushed into stack."); 390Debug.Assert((EventInfo)serializationManager.Context.Current == evt, "Serializer did not remove an object it pushed into stack."); 479Debug.Assert(serializationManager.Context.Current == dependencyProperty, "Serializer did not remove an object it pushed into stack."); 493Debug.Assert((PropertyInfo)serializationManager.Context.Current == property, "Serializer did not remove an object it pushed into stack."); 577Debug.Assert(serializationManager.Context.Current == obj, "Serializer did not remove an object it pushed into stack."); 937Debug.Assert(serializationManager.Context.Current == propertyObj, "Serializer did not remove an object it pushed into stack."); 1224Debug.Assert(false, "XmlReader not available."); 1239Debug.Assert(genericType != null); 1807Debug.Assert(false); 1927Debug.Assert(false); 1952Debug.Assert(false); 2642Debug.Assert((PropertyInfo)serializationManager.Context.Current == property, "Serializer did not remove an object it pushed into stack.");
AuthoringOM\Serializer\XamlInterfaces.cs (1)
174Debug.Assert(false);
AuthoringOM\SR.cs (5)
22System.Diagnostics.Debug.Assert(DescriptionValue != null, string.Format(CultureInfo.CurrentCulture, "String resource {0} not found.", new object[] { description })); 48System.Diagnostics.Debug.Assert(localizedString != null, string.Format(CultureInfo.CurrentCulture, "String resource {0} not found.", new object[] { value })); 70System.Diagnostics.Debug.Assert(DisplayNameValue != null, string.Format(CultureInfo.CurrentCulture, "String resource {0} not found.", new object[] { name })); 114System.Diagnostics.Debug.Assert(res != null, string.Format(CultureInfo.CurrentCulture, "String resource {0} not found.", new object[] { name })); 136System.Diagnostics.Debug.Assert(res != null, string.Format(CultureInfo.CurrentCulture, "String resource {0} not found.", new object[] { name }));
AuthoringOM\Utility.cs (1)
24Debug.Assert(false, "Creation of the Guid failed.");
Shared\CompModHelpers.cs (3)
551Debug.WriteLine("Error loading install directory: " + error.ToString(CultureInfo.CurrentCulture)); 601Debug.WriteLine("Error loading 3.0 install directory: " + error.ToString(CultureInfo.CurrentCulture)); 996Debug.Assert(false, "Invalid argument type. 'output' must either be string or TextWriter.");
System.Workflow.Runtime (140)
AmbientEnvironment.cs (6)
46Debug.Assert(null != threadData); 70Debug.Assert(_rc >= 0); 79Debug.Assert(_rc > 0); 84Debug.Assert(false); 91Debug.Assert(_rc > 0); 189System.Diagnostics.Debug.Assert(instanceId != Guid.Empty, "IsInServiceThread expects valid guid.");
DebugEngine\DebugController.cs (8)
303Debug.WriteLine(string.Format(CultureInfo.CurrentCulture, "WDE: DebugController.Attach(): programId = {0}", programId)); 364Debug.WriteLine(string.Format(CultureInfo.CurrentCulture, "WDE: DebugController.Detach():")); 434Debug.WriteLine(string.Format(CultureInfo.CurrentCulture, "WDE: DebugController.AttachTimerCallback():")); 462Debug.WriteLine(string.Format(CultureInfo.CurrentCulture, "WDE: DebugController.OnDomainUnload():")); 515Debug.Assert(this.controllerConduit != null, "Failed to create Controller Conduit"); 586Debug.WriteLine(string.Format(CultureInfo.CurrentCulture, "WDE: Failure in DebugController.AttachToConduit: {0}, Call stack:{1}", e.Message, e.StackTrace)); 597Debug.WriteLine(string.Format(CultureInfo.CurrentCulture, "WDE: DebugController.ServiceContainerStarted():")); 619Debug.WriteLine(string.Format(CultureInfo.CurrentCulture, "WDE: DebugController.ServiceContainerStopped():"));
DebugEngine\DebugControllerThread.cs (6)
40Debug.WriteLine(string.Format(CultureInfo.CurrentCulture, "WDE: DebugControllerThread.DebugControllerThread():")); 51Debug.WriteLine(string.Format(CultureInfo.CurrentCulture, "WDE: DebugControllerThread.StopThread():")); 94Debug.WriteLine(string.Format(CultureInfo.CurrentCulture, "WDE: DebugControllerThread.ControllerThreadFunction():")); 135Debug.Assert(expressionEvaluationFrame != null, "Failed to create Expression Evaluation Frame."); 174Debug.WriteLine(string.Format(CultureInfo.CurrentCulture, "WDE: DebugControllerThread.ExpressionEvaluationFunction(): ThreadAbortException")); 181Debug.WriteLine(string.Format(CultureInfo.CurrentCulture, "WDE: DebugControllerThread.ExpressionEvaluationFunction(): other exception"));
DebugEngine\ProgramPublisher.cs (7)
40Debug.WriteLine("WDE: ProgramPublisher.Publish()"); 58Debug.WriteLine("WDE: ProgramPublisher.Publish() exception: " + e.ToString()); 78Debug.WriteLine("WDE: ProgramPublisher.PublisherThreadFunc() exception: " + e.ToString()); 87Debug.WriteLine("WDE: ProgramPublisher.Unpublish()"); 101Debug.WriteLine("WDE: ProgramPublisher.Unpublish() exception: " + e.ToString()); 104Debug.WriteLine("WDE: ProgramPublisher.Unpublish() Done"); 115Debug.WriteLine("WDE: ProgramPublisher.UnpublishThreadFunc(): catch exception " + e.ToString());
Hosting\DbResourceAllocator.cs (2)
180Debug.Assert((connection != null), "null connection"); 181Debug.Assert((connection.State == System.Data.ConnectionState.Open),
Hosting\SharedConnectionInfo.cs (1)
49Debug.Assert((transaction != null), "Null Transaction!");
Hosting\SqlWorkflowPersistenceService.cs (3)
143Debug.Assert(this.connection != null, "No connection to dispose"); 1001Debug.Assert(timers != null, "TimerEventSubscriptionCollection should never be null, but it is"); 1127Debug.Assert(false, "Committing unknown pending work item type in SqlPersistenceService.Commit()");
Hosting\WorkflowPersistenceService.cs (2)
52Debug.Assert(activity != null, "Null activity"); 89Debug.Assert(state != null, "invalid state recovered");
KeyedPriorityQueue.cs (4)
79Debug.Assert(size > 0, "Queue Underflow"); 172Debug.Assert(i >= 1 || i <= size, "Index out of range: i = " + i + ", size = " + size); 191Debug.Assert(i >= 1 || i <= size, "Index out of range: i = " + i + ", size = " + size); 210Debug.Assert(i >= 1 || j >= 1 || i <= size || j <= size, "Index out of range: i = " + i + ", j = " + j + ", size = " + size);
Lock.cs (1)
188System.Diagnostics.Debug.Assert(false, "Unrecognized lock operator");
parent\Common\Shared\DigestComparer.cs (2)
10Debug.Assert(digest1.Length == 16 && digest2.Length == 16, "Invalid digest!"); 21Debug.Assert(digest1.Length == 16 && digest2.Length == 16, "Invalid digest!");
PerformanceCounterManager.cs (6)
276System.Diagnostics.Debug.Assert(this.m_actionStatements != null); 328System.Diagnostics.Debug.Assert(false, "Unknown performance counter operation."); 430System.Diagnostics.Debug.Assert(!String.IsNullOrEmpty(name)); 431System.Diagnostics.Debug.Assert(!String.IsNullOrEmpty(description)); 432System.Diagnostics.Debug.Assert(mappings != null && mappings.Length != 0); 462System.Diagnostics.Debug.Assert(counters != null);
RTTrackingProfile.cs (5)
341Debug.Assert(!_pendingWorkflowChange, "_pendingWorkflowChange should be false."); 362Debug.Assert(_pendingWorkflowChange, "Workflow change is not pending - no change to commit"); 519Debug.Assert(!_activities.ContainsKey(qualifiedID), "QualifiedName is already in the activities cache"); 532Debug.Assert(!_user.ContainsKey(qualifiedID), "QualifiedName is already in the user cache"); 696Debug.Assert(false, ExecutionStringManager.UnknownActivityActionType);
Scheduler.cs (1)
151Debug.Assert(itemActivity != null, "null itemActivity");
System\Activities\Statements\Interop.cs (15)
170Debug.Assert(this.hasValidBody, "should only be called when we have a valid body"); 487Debug.Assert(this.ActivityType != null, "ActivityType must be set by the time we get here"); 490Debug.Assert(activity != null, "We should have validated that the type has a default ctor() and derives from System.Workflow.ComponentModel.Activity."); 497Debug.Assert((activity.GetType() == this.ActivityType), "activity must be the same type as this.ActivityType"); 781Debug.Assert(transactionHandle != null, "RuntimeTransactionHandle is null"); 788Debug.Assert(context != null, "ActivityTransactionContext was null"); 1180Debug.Assert(interop != null, "Interop activity is null"); 1182Debug.Assert(interop.hasValidBody, "Interop activity has an invalid body"); 1185Debug.Assert(interopBody != null, "Interop Body was null"); 1189Debug.Assert(validationResults != null, "The RootLevelValidationData hash set was null"); 1196Debug.Assert(validationResults != null, "The NestedChildrenValidationData hash set was null"); 1209Debug.Assert(interopBody != null, "Interop Body is null"); 1210Debug.Assert(validationResults != null, "The HashSet of validation results is null"); 1382Debug.Assert(interopBody != null, "Interop Body is null"); 1383Debug.Assert(validationResults != null, "The HashSet of validation results is null");
System\Activities\Statements\InteropEnvironment.cs (5)
65Debug.Assert(!disposed, "Cannot access disposed object"); 80Debug.Assert(!disposed, "Cannot access disposed object"); 95Debug.Assert(!disposed, "Cannot access disposed object"); 145Debug.Assert(!disposed, "Cannot access disposed object"); 160Debug.Assert(!disposed, "Cannot access disposed object");
System\Activities\Statements\InteropExecutor.cs (3)
159Debug.Assert(this.timerQueue != null, "TimerEventSubscriptionCollection on root activity should never be null, but it was"); 240Debug.Assert(transactionalProperties != null, "The current atomic activity is missing transactional properties"); 258Debug.Assert(transactionalProperties != null, "The current atomic activity is missing transactional properties");
Tracking.cs (7)
153Debug.Assert(null != listenerBroker, "TrackingListenerBroker should not be null during loading"); 378Debug.Assert((null != trackingCallingState), "WorkflowState is null"); 390Debug.Assert(Guid.Empty != trackingCallingState.CallerWorkflowInstanceId, "Instance has an ActivityCallPath but CallerInstanceId is empty"); 466Debug.Assert(exec is WorkflowExecutor, "Executor is not WorkflowExecutor"); 476Debug.Assert(Guid.Empty != trackingCallingState.CallerWorkflowInstanceId, "Instance has an ActivityCallPath but CallerInstanceId is empty"); 873Debug.Assert(contextGuid != Guid.Empty, "TrackingContext is empty"); 874Debug.Assert(parentContextGuid != Guid.Empty, "Parent TrackingContext is empty");
Tracking\SqlTrackingService.cs (12)
365Debug.WriteLine("Checking for updated profiles..."); 423Debug.WriteLine(ExecutionStringManager.UpdatedProfile + t.FullName); 1237Debug.Assert((command != null), "Null command"); 1386Debug.Assert(eventId1 > 0, "Invalid eventId1"); 1392Debug.Assert(eventId2 > 0, "Invalid eventId2"); 1417Debug.Assert(internalId != -1, "Invalid internalId"); 1577Debug.Assert(aId > 0, "Invalid @ActivityInstanceId output parameter value"); 1591Debug.Assert(aeseId > 0, "Invalid @ActivityExecutionStatusEventId output parameter value"); 1730Debug.Assert(internalId != -1, "Invalid internalId"); 1731Debug.Assert((command != null), "Null command passed to BuildInsertActivityStatusEventParameters"); 1824Debug.Assert(internalId != -1, "Invalid internalId"); 1963Debug.Assert(internalId != -1, "Invalid internalId");
WorkBatch.cs (3)
66System.Diagnostics.Debug.Assert(this._state == WorkBatchState.Usable, "Trying to add to unusable batch."); 239Debug.Assert(!workItems.ContainsKey(orderId), string.Format(System.Globalization.CultureInfo.InvariantCulture, "List already contains key {0}", orderId)); 325Debug.Assert(value >= _workItemOrderId, "New value for WorkItemOrderId must be greater than the current value");
WorkflowDefinitionDispenser.cs (1)
618Debug.Assert(this._syncObj != null, "Definition's synchronization object was null. This should always be set.");
WorkflowExecutor.cs (20)
181Debug.Assert(invokeActivityID != null && invokeActivityID.Length > 0); 473Debug.Assert(_workflowDefinition != null, "WorkflowDefinition cannot be null."); 481Debug.Assert(tempDefinition != null, "WorkflowDefinition cannot be null."); 553System.Diagnostics.Debug.Assert(this._workflowInstance != null, "WorkflowInstance property should not be called before the proxy is initialized."); 936Debug.Assert(_timerQueue != null, "TimerEventSubscriptionCollection on root activity should never be null, but it was"); 1185Debug.Assert(false, "Unknown WorkflowStatus"); 1716Debug.Assert(this.IsInstanceValid); 2066Debug.Assert(activity != null); 2083Debug.Assert(this.currentAtomicActivity == null, "There is already a transacted activity running"); 2089Debug.Assert(atomicTxn != null, "null atomicTxn"); 2178Debug.Assert(activityContext != null, "null activityContext"); 2211Debug.Assert(null != transactionalProperties, "TransactionProperties from TransactionScopeActivity should not be null."); 2304Debug.Assert((activityContext == this.currentAtomicActivity), 2317Debug.Assert((transactionalProperties.Transaction != null), "Null Transaction while transaction is present"); 2318Debug.Assert((transactionalProperties.LocalQueuingService != null), "Null LocalQueuingService while transaction is present"); 2559Debug.Assert(exp != null, "null exp"); 2560Debug.Assert(currentActivity != null, "null currentActivity"); 3676Debug.Assert(ScheduleWork.scheduleInfo != null); 3677Debug.Assert(value == true || ScheduleWork.scheduleInfo.scheduleWork == false); // never go from true to false 3690Debug.Assert(ScheduleWork.scheduleInfo != null);
WorkflowInstance.cs (1)
61Debug.Assert(value.WorkflowStatus == WorkflowStatus.Completed || value.WorkflowStatus == WorkflowStatus.Terminated,
WorkflowQueuingService.cs (7)
366Debug.Assert(contextActivity != null); 474Debug.Assert(mergeItem.Value.Transactional, "Queue inside a transactional context is not transactional!"); 532Debug.Assert(this.rootQueuingService == null, "MarkQueueDirty should be done at root"); 682Debug.Assert(rootWorkflowExecutor.CurrentAtomicActivity != null); 683Debug.Assert(pendingQueueStateSnapshot != null); 684Debug.Assert(persistedQueueStatesSnapshot != null); 687Debug.Assert(transactionalProperties != null);
WorkflowRuntime.cs (7)
693Debug.Assert(schedule != null); 785Debug.Assert(sched != null); 996Debug.Assert(type.IsSubclassOf(typeof(TrackingService)), "Argument should be a subtype of TrackingService"); 1013Debug.Assert(type.IsSubclassOf(typeof(TrackingService)), "Argument should be a subtype of TrackingService"); 1409Debug.Assert(runtime != null); 1452Debug.Assert(runtime != null); 1582Debug.Assert(threadData != null, "unexpected call to EventContext::Dispose method");
WorkflowStateRollbackService.cs (5)
45Debug.Assert(this.workflowExecutor.InstanceId != null, "instance id null at checkpoint time"); 80Debug.Assert(this.clonedInstanceStateStream != null, "cloned instance-state stream null at restore time"); 89Debug.Assert(clonedRootActivity != null); 127Debug.Assert(this.completedContextActivities != null); 131Debug.Assert(this.workflowExecutor.IsInstanceValid);
System.Xml (1418)
parent\parent\parent\parent\InternalApis\NDP_Common\inc\Win8Helpers.cs (1)
59Debug.Assert(hModule != IntPtr.Zero, "GetModuleHandle failed. Dll isn't loaded?");
System\Xml\Base64Decoder.cs (5)
111Debug.Assert( buffer != null ); 112Debug.Assert( count >= 0 ); 113Debug.Assert( index >= 0 ); 114Debug.Assert( buffer.Length - index >= count ); 115Debug.Assert( ( buffer as byte[] ) != null );
System\Xml\BinaryXml\SqlUtils.cs (24)
129Debug.Assert(rguiData.Length == 4); 152Debug.Assert(rgulU.Length == x_cNumeMax); 159Debug.Assert(iulD != 0, "iulD != 0", "Divided by zero!"); 160Debug.Assert(iulD > 0, "iulD > 0", "Invalid data: less than zero"); 161Debug.Assert(ciulU > 0, "ciulU > 0", "No data in the array"); 282Debug.Assert(dwlAccum < x_ulInt32Base, "dwlAccum < x_lInt32Base", ""); 305Debug.Assert(dwlAccum < x_ulInt32Base); 323Debug.Assert(dwlAccum < x_ulInt32Base, "dwlAccum < x_dwlBaseUI4", "Integer overflow"); 371Debug.Assert(dwlAccum < dwlDivisor); 373Debug.Assert((dwlAccum / dwlDivisor) < x_ulInt32Base); 397Debug.Assert(dwlAccum < x_ulInt32Base); 415Debug.Assert(bPrec <= MaxPrecision && bPrec > 0, "bPrec <= MaxPrecision && bPrec > 0", "Invalid numeric precision"); 420Debug.Assert(uiDigit < 10); 523Debug.Assert(m_bScale <= NUMERIC_MAX_PRECISION, "m_bScale <= NUMERIC_MAX_PRECISION", "In AssertValid"); 524Debug.Assert(m_bScale <= m_bPrec, "m_bScale <= m_bPrec", "In AssertValid"); 525Debug.Assert(m_bScale >= 0, "m_bScale >= 0", "In AssertValid"); 526Debug.Assert(m_bPrec > 0, "m_bPrec > 0", "In AssertValid"); 527Debug.Assert(CLenFromPrec(m_bPrec) >= m_bLen, "CLenFromPrec(m_bPrec) >= m_bLen", "In AssertValid"); 528Debug.Assert(m_bLen <= x_cNumeMax, "m_bLen <= x_cNumeMax", "In AssertValid"); 534Debug.Assert(m_bLen == 1, "m_bLen == 1", "In AssertValid"); 539Debug.Assert(rglData[iulData] == 0, "rglData[iulData] == 0", "In AssertValid"); 588Debug.Assert(val >= 0 && val < 100); 593Debug.Assert(val > -10000 && val < 10000); 603Debug.Assert(val >= 0 && val < 1000);
System\Xml\BinaryXml\XmlBinaryReader.cs (29)
351Debug.Assert(len >= 2 && (data[0] == 0xdf && data[1] == 0xff)); 722Debug.Fail("Unexpected parent NodeType"); 804Debug.Assert(decl != null); 990Debug.Fail("should never happen"); 1072Debug.Fail("should never happen"); 1158Debug.Fail("should never happen"); 1244Debug.Fail("should never happen"); 1330Debug.Fail("should never happen"); 1416Debug.Fail("should never happen"); 1502Debug.Fail("should never happen"); 1762Debug.Assert(this.mark <= this.end, "Mark should never be past End"); 1763Debug.Assert(this.mark <= this.pos, "Mark should never be after Pos"); 1780Debug.Assert((this.attributes[i].contentPos >= 0) && (this.attributes[i].contentPos <= (end))); 1787Debug.Assert(this.attrCount == 0); 1804Debug.Assert((this.pos + require) >= this.end); 1839Debug.Assert(0 != (b & 0x80)); 2042Debug.Assert(pos >= 0 && cch >= 0); 2058Debug.Assert((offset & 1) == 0); 2417Debug.Assert(this.stringValue == null, "this.stringValue == null"); 2418Debug.Assert(this.token == BinXmlToken.CData, "this.token == BinXmlToken.CData"); 2605Debug.Assert(this.mark < 0); 2720Debug.Assert(this.pos >= 3); 2724Debug.Assert(this.pos >= 1); 2729Debug.Assert(this.pos >= 2); 3091Debug.Assert(this.checkCharacters, "this.checkCharacters"); 3093Debug.Assert(0 == ((this.pos - this.tokDataPos) & 1), "Data size should not be odd"); 3143Debug.Assert(!this.checkCharacters, "!this.checkCharacters"); 3146Debug.Assert(0 == ((this.pos - this.tokDataPos) & 1), "Data size should not be odd"); 3969System.Diagnostics.Debug.WriteLine("Unhandled token: " + token.ToString());
System\Xml\BinHexDecoder.cs (5)
107Debug.Assert( buffer != null ); 108Debug.Assert( count >= 0 ); 109Debug.Assert( index >= 0 ); 110Debug.Assert( buffer.Length - index >= count ); 111Debug.Assert( ( buffer as byte[] ) != null );
System\Xml\BitStack.cs (2)
49Debug.Assert(this.curr != 0x1, "Stack empty"); 68Debug.Assert(this.curr != 0x1, "Stack empty");
System\Xml\Cache\XPathDocumentBuilder.cs (22)
141Debug.Assert(prefix != null && localName != null && ns != null && localName.Length != 0 && baseUri != null); 196Debug.Assert(this.pageParent[this.idxParent].NodeType == XPathNodeType.Element); 263Debug.Assert(!prefix.Equals("xmlns")); 264Debug.Assert(this.idxParent == 0 || this.pageParent[this.idxParent].NodeType == XPathNodeType.Element); 265Debug.Assert(this.idxSibling == 0 || this.pageSibling[this.idxSibling].NodeType == XPathNodeType.Attribute); 280Debug.Assert(this.pageSibling[this.idxSibling].NodeType == XPathNodeType.Attribute); 290Debug.Assert(this.idxParent != 0, "ID attribute must have an element parent"); 433Debug.Assert(this.pageParent[this.idxParent].NodeType == XPathNodeType.Element); 443Debug.Assert(this.idxSibling == 0 || this.pageSibling[this.idxSibling].NodeType == XPathNodeType.Attribute); 444Debug.Assert(!prefix.Equals("xmlns") && !namespaceName.Equals(XmlReservedNs.NsXmlNs)); 445Debug.Assert(this.idxParent == 0 || this.idxNmsp != 0); 446Debug.Assert(this.idxParent == 0 || this.pageParent[this.idxParent].NodeType == XPathNodeType.Element); 496Debug.Assert(prefix.Equals("xml"), "xmlns:xml namespace declaration should always be present in the list."); 566Debug.Assert(pageElem == null || pageElem[idxElem].NodeType == XPathNodeType.Element); 595Debug.Assert(xptyp != XPathNodeType.Namespace); 634Debug.Assert(this.lineInfo.HasLineInfo(), "HasLineInfo should have been checked before this."); 659Debug.Assert(xptyp != XPathNodeType.Root && xptyp != XPathNodeType.Namespace); 673Debug.Assert(this.idxParent + 1 == idxNew || idxNew == 1); 691Debug.Assert(this.textBldr.HasText || (this.idxSibling == 0 && this.idxParent == 0), "Cannot create empty text node unless it's a top-level text node."); 692Debug.Assert(this.idxSibling == 0 || !this.pageSibling[this.idxSibling].IsText, "Cannot create adjacent text nodes."); 807Debug.Assert((int) XPathNodeType.Text < (int) XPathNodeType.SignificantWhitespace); 808Debug.Assert((int) XPathNodeType.SignificantWhitespace < (int) XPathNodeType.Whitespace);
System\Xml\Cache\XPathDocumentNavigator.cs (8)
40Debug.Assert(pageCurrent != null && idxCurrent != 0); 41Debug.Assert((pageParent == null) == (idxParent == 0)); 95Debug.Assert(this.pageCurrent[this.idxCurrent].NodeType == XPathNodeType.Text); 112Debug.Assert(page[idx].NodeType == XPathNodeType.Element || page[idx].IsText); 409Debug.Assert(this.pageParent != null); 446Debug.Assert(page[idx].NodeType == XPathNodeType.Element); 622Debug.Assert(page[idx].HasCollapsedText); 629Debug.Assert(page[idx].IsText);
System\Xml\Cache\XPathNode.cs (13)
145Debug.Assert(HasCollapsedText, "Do not call CollapsedLinePosition unless HasCollapsedText is true."); 194Debug.Assert(localName == null || (object) Document.NameTable.Get(localName) == (object) localName, "localName must be atomized."); 205Debug.Assert(localName == null || (object) Document.NameTable.Get(localName) == (object) localName, "localName must be atomized."); 326Debug.Assert(info != null && idxParent <= UInt16.MaxValue); 336Debug.Assert(lineNumOffset >= 0 && lineNumOffset <= MaxLineNumberOffset, "Line number offset too large or small: " + lineNumOffset); 337Debug.Assert(linePosOffset >= 0 && linePosOffset <= MaxLinePositionOffset, "Line position offset too large or small: " + linePosOffset); 346Debug.Assert(posOffset >= 0 && posOffset <= MaxCollapsedPositionOffset, "Collapsed text line position offset too large or small: " + posOffset); 361Debug.Assert(NodeType == XPathNodeType.Element); 371Debug.Assert(NodeType == XPathNodeType.Element); 395Debug.Assert(pageSibling != null && idxSibling != 0 && idxSibling <= UInt16.MaxValue, "Bad argument"); 396Debug.Assert(this.idxSibling == 0, "SetSibling should not be called more than once."); 412Debug.Assert(pageSimilar != null && idxSimilar != 0 && idxSimilar <= UInt16.MaxValue, "Bad argument"); 413Debug.Assert(this.idxSimilar == 0, "SetSimilarElement should not be called more than once.");
System\Xml\Cache\XPathNodeHelper.cs (32)
30Debug.Assert(pageElem[idxElem].NodeType == XPathNodeType.Element); 69Debug.Assert(pageNode != null && idxNode != 0, "Cannot pass null argument(s)"); 73Debug.Assert(pageNode[idxNode].NodeType == XPathNodeType.Attribute); 86Debug.Assert(pageNode != null && idxNode != 0, "Cannot pass null argument(s)"); 104Debug.Assert(pageNode != null && idxNode != 0, "Cannot pass null argument(s)"); 112Debug.Assert(idx != 0); 129Debug.Assert(pageNode != null && idxNode != 0, "Cannot pass null argument(s)"); 149Debug.Assert(pageNode != null && idxNode != 0, "Cannot pass null argument(s)"); 165Debug.Assert(pageNode != null && idxNode != 0, "Cannot pass null argument(s)"); 166Debug.Assert(idxNode <= UInt16.MaxValue); 167Debug.Assert(pageNode[0].PageInfo.PageNumber <= Int16.MaxValue); 179Debug.Assert(pageNode != null && idxNode != 0, "Cannot pass null argument(s)"); 184Debug.Assert(idx != 0); 209Debug.Assert(pageNode != null && idxNode != 0, "Cannot pass null argument(s)"); 238Debug.Assert(pageNode != null && idxNode != 0, "Cannot pass null argument(s)"); 272Debug.Assert(pageNode != null && idxNode != 0, "Cannot pass null argument(s)"); 282Debug.Assert(typ != XPathNodeType.Attribute && typ != XPathNodeType.Namespace); 300Debug.Assert(pageNode != null && idxNode != 0, "Cannot pass null argument(s)"); 301Debug.Assert(pageNode[idxNode].NodeType != XPathNodeType.Attribute); 333Debug.Assert(idxAnc != 0 && pageAnc != null); 357Debug.Assert(pageNode != null && idxNode != 0, "Cannot pass null argument(s)"); 383Debug.Assert(pageNode != null && idxNode != 0, "Cannot pass null argument(s)"); 407Debug.Assert(pageNode != null && idxNode != 0, "Cannot pass null argument(s)"); 462Debug.Assert(pageCurrent != null && idxCurrent != 0, "Cannot pass null argument(s)"); 549Debug.Assert(pageCurrent != null && idxCurrent != 0, "Cannot pass null argument(s)"); 550Debug.Assert(typ != XPathNodeType.Text, "Text should be handled by GetTextFollowing in order to take into account collapsed text."); 551Debug.Assert(page[idx].NodeType != XPathNodeType.Attribute, "Current node should never be an attribute or namespace--caller should handle this case."); 583Debug.Assert(!page[idx].IsAttrNmsp, "GetContentFollowing should never return attributes or namespaces."); 601Debug.Assert(pageCurrent != null && idxCurrent != 0, "Cannot pass null argument(s)"); 602Debug.Assert(!page[idx].IsAttrNmsp, "Current node should never be an attribute or namespace--caller should handle this case."); 670Debug.Assert(pageNode[idxNode].HasAttribute || pageNode[idxNode].HasContentChild, "Caller must check HasAttribute/HasContentChild on parent before calling GetChild."); 671Debug.Assert(pageNode[idxNode].HasAttribute || !pageNode[idxNode].HasCollapsedText, "Text child is virtualized and therefore is not present in the physical node page.");
System\Xml\Cache\XPathNodeInfoAtom.cs (4)
117Debug.Assert(localName != null && namespaceUri != null && prefix != null && doc != null); 262Debug.Assert(that != null); 263Debug.Assert((object) this.doc == (object) that.doc); 264Debug.Assert(this.pageInfo == null);
System\Xml\Core\CharEntityEncoderFallback.cs (2)
139Debug.Assert( charEntityIndex < charEntity.Length ); 151Debug.Assert(charEntityIndex <= charEntity.Length);
System\Xml\Core\HtmlEncodedRawTextWriter.cs (20)
108Debug.Assert( name != null && name.Length > 0 ); 149Debug.Assert( localName != null && localName.Length != 0 && prefix != null && ns != null ); 154Debug.Assert( prefix.Length == 0 ); 188Debug.Assert( prefix.Length == 0 ); 209Debug.Assert( prefix.Length == 0 ); 326Debug.Assert( localName != null && localName.Length != 0 && prefix != null && ns != null ); 329Debug.Assert( prefix.Length == 0 ); 383Debug.Assert( target != null && target.Length != 0 && text != null ); 403Debug.Assert( text != null ); 431Debug.Assert( buffer != null ); 432Debug.Assert( index >= 0 ); 433Debug.Assert( count >= 0 && index + count <= buffer.Length ); 452Debug.Assert( (int)ElementProperties.URI_PARENT == (int)AttributeProperties.URI ); 453Debug.Assert( (int)ElementProperties.BOOL_PARENT == (int)AttributeProperties.BOOLEAN ); 454Debug.Assert( (int)ElementProperties.NAME_PARENT == (int)AttributeProperties.NAME ); 570Debug.Assert( pSrc <= pSrcEnd ); 646Debug.Assert( pSrc <= pSrcEnd ); 801Debug.Assert( localName != null && localName.Length != 0 && prefix != null && ns != null ); 808Debug.Assert( prefix.Length == 0 ); 856Debug.Assert( localName != null && localName.Length != 0 && prefix != null && ns != null );
System\Xml\Core\HtmlUtf8RawTextWriter.cs (20)
108Debug.Assert( name != null && name.Length > 0 ); 149Debug.Assert( localName != null && localName.Length != 0 && prefix != null && ns != null ); 154Debug.Assert( prefix.Length == 0 ); 188Debug.Assert( prefix.Length == 0 ); 209Debug.Assert( prefix.Length == 0 ); 326Debug.Assert( localName != null && localName.Length != 0 && prefix != null && ns != null ); 329Debug.Assert( prefix.Length == 0 ); 383Debug.Assert( target != null && target.Length != 0 && text != null ); 403Debug.Assert( text != null ); 431Debug.Assert( buffer != null ); 432Debug.Assert( index >= 0 ); 433Debug.Assert( count >= 0 && index + count <= buffer.Length ); 452Debug.Assert( (int)ElementProperties.URI_PARENT == (int)AttributeProperties.URI ); 453Debug.Assert( (int)ElementProperties.BOOL_PARENT == (int)AttributeProperties.BOOLEAN ); 454Debug.Assert( (int)ElementProperties.NAME_PARENT == (int)AttributeProperties.NAME ); 570Debug.Assert( pSrc <= pSrcEnd ); 646Debug.Assert( pSrc <= pSrcEnd ); 801Debug.Assert( localName != null && localName.Length != 0 && prefix != null && ns != null ); 808Debug.Assert( prefix.Length == 0 ); 856Debug.Assert( localName != null && localName.Length != 0 && prefix != null && ns != null );
System\Xml\Core\IncrementalReadDecoders.cs (15)
62Debug.Assert( chars != null ); 63Debug.Assert( len >= 0 ); 64Debug.Assert( startPos >= 0 ); 65Debug.Assert( chars.Length - startPos >= len ); 67Debug.Assert( len > 0 ); 80Debug.Assert( str != null ); 81Debug.Assert( len >= 0 ); 82Debug.Assert( startPos >= 0 ); 83Debug.Assert( str.Length - startPos >= len ); 85Debug.Assert( len > 0 ); 101Debug.Assert( buffer != null ); 102Debug.Assert( count >= 0 ); 103Debug.Assert( index >= 0 ); 104Debug.Assert( buffer.Length - index >= count ); 106Debug.Assert( ( buffer as char[] ) != null );
System\Xml\Core\QueryOutputWriter.cs (2)
123Debug.Assert(!this.outputDocType); 307Debug.Assert(!this.inCDataSection);
System\Xml\Core\QueryOutputWriterV1.cs (2)
116Debug.Assert(!this.outputDocType); 271Debug.Assert(!this.inCDataSection);
System\Xml\Core\ReadContentAsBinaryHelper.cs (11)
96Debug.Assert( false ); 100Debug.Assert( state == State.InReadContent ); 143Debug.Assert( false ); 147Debug.Assert( state == State.InReadContent ); 190Debug.Assert( false ); 194Debug.Assert( state == State.InReadElementContent ); 237Debug.Assert( false ); 241Debug.Assert( state == State.InReadElementContent ); 284Debug.Assert( reader.NodeType == XmlNodeType.Element ); 328Debug.Assert( decoder != null ); 347Debug.Assert( valueOffset == valueChunkLength );
System\Xml\Core\ReadContentAsBinaryHelperAsync.cs (11)
46Debug.Assert( false ); 50Debug.Assert( state == State.InReadContent ); 93Debug.Assert( false ); 97Debug.Assert( state == State.InReadContent ); 140Debug.Assert( false ); 144Debug.Assert( state == State.InReadElementContent ); 187Debug.Assert( false ); 191Debug.Assert( state == State.InReadElementContent ); 228Debug.Assert( reader.NodeType == XmlNodeType.Element ); 252Debug.Assert( decoder != null ); 271Debug.Assert( valueOffset == valueChunkLength );
System\Xml\Core\SecureStringHasher.cs (1)
85Debug.Assert(false, "Randomized hashing is not supported.");
System\Xml\Core\XmlAsyncCheckReader.cs (3)
32Debug.Assert(!(reader is IXmlSchemaInfo)); 38Debug.Assert(!(reader is IXmlSchemaInfo)); 43Debug.Assert(!(reader is IXmlSchemaInfo));
System\Xml\Core\XmlAutoDetectWriter.cs (6)
35Debug.Assert(writerSettings.OutputMethod == XmlOutputMethod.AutoDetect); 98Debug.Assert(this.wrapped != null); 270Debug.Assert(this.wrapped != null); 275Debug.Assert(this.wrapped != null); 280Debug.Assert(this.wrapped != null); 361Debug.Assert(this.wrapped == null);
System\Xml\Core\XmlCharCheckingReader.cs (3)
57Debug.Assert( checkCharacters || ignoreWhitespace || ignoreComments || ignorePis || (int)dtdProcessing != -1 ); 173Debug.Assert( false ); 575Debug.Assert( readerAsNSResolver != null );
System\Xml\Core\XmlCharCheckingReaderAsync.cs (1)
41Debug.Assert( false );
System\Xml\Core\XmlCharCheckingWriter.cs (1)
66Debug.Assert( checkValues || replaceNewLines );
System\Xml\Core\XmlEncodedRawTextWriter.cs (45)
135Debug.Assert( writer != null && settings != null ); 155Debug.Assert( stream != null && settings != null ); 261Debug.Assert( name != null && name.Length > 0 ); 296Debug.Assert( localName != null && localName.Length > 0 ); 297Debug.Assert( prefix != null ); 325Debug.Assert( localName != null && localName.Length > 0 ); 326Debug.Assert( prefix != null ); 353Debug.Assert( localName != null && localName.Length > 0 ); 354Debug.Assert( prefix != null ); 371Debug.Assert( localName != null && localName.Length > 0 ); 372Debug.Assert( prefix != null ); 401Debug.Assert( prefix != null && namespaceName != null ); 415Debug.Assert( prefix != null ); 448Debug.Assert( text != null ); 454Debug.Assert( bufPos >= 4 ); 482Debug.Assert( text != null ); 500Debug.Assert( name != null && name.Length > 0 ); 501Debug.Assert( text != null ); 520Debug.Assert( name != null && name.Length > 0 ); 562Debug.Assert( ws != null ); 580Debug.Assert( text != null ); 612Debug.Assert( buffer != null ); 613Debug.Assert( index >= 0 ); 614Debug.Assert( count >= 0 && index + count <= buffer.Length ); 633Debug.Assert( buffer != null ); 634Debug.Assert( index >= 0 ); 635Debug.Assert( count >= 0 && index + count <= buffer.Length ); 649Debug.Assert( data != null ); 728Debug.Assert( stream != null || writer != null ); 744Debug.Assert( textContentMarks[0] == 1 ); 798Debug.Assert( bufPos == 1 ); 833Debug.Assert( pSrc <= pSrcEnd ); 930Debug.Assert( pSrc <= pSrcEnd ); 1010Debug.Assert( s != null ); 1036Debug.Assert( pSrc <= pSrcEnd ); 1081Debug.Assert( pSrc <= pSrcEnd ); 1176Debug.Assert( pSrc <= pSrcEnd ); 1297Debug.Assert( pSrc <= pSrcEnd ); 1381Debug.Assert( XmlCharType.IsSurrogate( *pSrc ) ); 1404Debug.Assert( !xmlCharType.IsWhiteSpace( (char)ch ) ); 1405Debug.Assert( !xmlCharType.IsAttributeValueChar( (char)ch ) ); 1431Debug.Assert( inTextContent != value ); 1432Debug.Assert( inTextContent || ((lastMarkPos & 1) == 0) ); 1441Debug.Assert( lastMarkPos + 1 == textContentMarks.Length ); 1679Debug.Assert( localName != null && localName.Length != 0 && prefix != null && ns != null );
System\Xml\Core\XmlEncodedRawTextWriterAsync.cs (36)
68Debug.Assert( name != null && name.Length > 0 ); 104Debug.Assert( localName != null && localName.Length > 0 ); 105Debug.Assert( prefix != null ); 127Debug.Assert(localName != null && localName.Length > 0); 128Debug.Assert(prefix != null); 158Debug.Assert( localName != null && localName.Length > 0 ); 159Debug.Assert( prefix != null ); 177Debug.Assert( localName != null && localName.Length > 0 ); 178Debug.Assert( prefix != null ); 214Debug.Assert( prefix != null && namespaceName != null ); 223Debug.Assert( prefix != null ); 266Debug.Assert( text != null ); 272Debug.Assert( bufPos >= 4 ); 301Debug.Assert( text != null ); 320Debug.Assert( name != null && name.Length > 0 ); 321Debug.Assert( text != null ); 341Debug.Assert( name != null && name.Length > 0 ); 385Debug.Assert( ws != null ); 401Debug.Assert( text != null ); 432Debug.Assert( buffer != null ); 433Debug.Assert( index >= 0 ); 434Debug.Assert( count >= 0 && index + count <= buffer.Length ); 452Debug.Assert( buffer != null ); 453Debug.Assert( index >= 0 ); 454Debug.Assert( count >= 0 && index + count <= buffer.Length ); 467Debug.Assert( data != null ); 500Debug.Assert( stream != null || writer != null ); 516Debug.Assert( textContentMarks[0] == 1 ); 570Debug.Assert( bufPos == 1 ); 608Debug.Assert( pSrc <= pSrcEnd ); 778Debug.Assert( pSrc <= pSrcEnd ); 982Debug.Assert( pSrc <= pSrcEnd ); 1071Debug.Assert( pSrc <= pSrcEnd ); 1244Debug.Assert( pSrc <= pSrcEnd ); 1404Debug.Assert( pSrc <= pSrcEnd ); 1538Debug.Assert( localName != null && localName.Length != 0 && prefix != null && ns != null );
System\Xml\Core\XmlEventCache.cs (5)
118Debug.Assert(idxPage + 1 == this.pages.Count); 238Debug.Assert(false, "Unknown event: " + page[idxEvent].EventType); 244Debug.Assert(false, "Unknown event should be added to end of event sequence."); 272Debug.Assert(idxPage + 1 == this.pages.Count); 297Debug.Assert(false, "Unknown event should be added to end of event sequence.");
System\Xml\Core\XmlReader.cs (5)
919Debug.Assert(parentDepth == 0); 939Debug.Assert(NodeType == XmlNodeType.EndElement || NodeType == XmlNodeType.None || ReadState == ReadState.Error); 956Debug.Assert(parentDepth == 0); 977Debug.Assert(NodeType == XmlNodeType.EndElement); 1080Debug.Assert(xtw is XmlTextWriter);
System\Xml\Core\XmlReaderAsync.cs (1)
209Debug.Assert(xtw is XmlTextWriter);
System\Xml\Core\XmlSubtreeReader.cs (27)
347Debug.Assert(reader.NodeType == XmlNodeType.Element); 366Debug.Assert( curNode.type == XmlNodeType.Attribute ); 386Debug.Assert( reader.Depth >= initialDepth ); 394Debug.Assert( reader.NodeType == XmlNodeType.Element && !reader.IsEmptyElement ); 434Debug.Assert( false ); 447Debug.Assert( reader.Depth >= initialDepth ); 478Debug.Assert( reader.Depth >= initialDepth ); 488Debug.Assert( reader.NodeType == XmlNodeType.EndElement || 502Debug.Assert( reader.Depth >= initialDepth ); 536Debug.Assert( false ); 716Debug.Assert( AttributeCount > 0 ); 719Debug.Assert( false ); 741Debug.Assert( false ); 791Debug.Assert( false ); 834Debug.Assert( AttributeCount > 0 ); 837Debug.Assert( false ); 859Debug.Assert( false ); 908Debug.Assert( false ); 960Debug.Assert( false ); 1102Debug.Assert( state == State.ClearNsAttributes || state == State.Interactive || state == State.PopNamespaceScope ); 1125Debug.Assert( index >= 0 && index <= nsAttrCount ); 1154Debug.Assert( state == State.Interactive ); 1160Debug.Assert( state == State.ReadElementContentAsBase64 || state == State.ReadElementContentAsBinHex ); 1189Debug.Assert( state == State.ReadContentAsBase64 || state == State.ReadContentAsBinHex ); 1250Debug.Assert( tmpNode.localName == string.Empty && tmpNode.prefix == string.Empty && tmpNode.name == string.Empty && tmpNode.namespaceUri == string.Empty ); 1290Debug.Assert( false ); 1297Debug.Assert( state == State.Interactive ||
System\Xml\Core\XmlSubtreeReaderAsync.cs (19)
36Debug.Assert( reader.Depth >= initialDepth ); 44Debug.Assert( reader.NodeType == XmlNodeType.Element && !reader.IsEmptyElement ); 84Debug.Assert( false ); 99Debug.Assert( reader.Depth >= initialDepth ); 109Debug.Assert( reader.NodeType == XmlNodeType.EndElement || 123Debug.Assert( reader.Depth >= initialDepth ); 157Debug.Assert( false ); 240Debug.Assert( AttributeCount > 0 ); 243Debug.Assert( false ); 265Debug.Assert( false ); 315Debug.Assert( false ); 358Debug.Assert( AttributeCount > 0 ); 361Debug.Assert( false ); 383Debug.Assert( false ); 432Debug.Assert( false ); 478Debug.Assert( false ); 505Debug.Assert( state == State.Interactive ); 511Debug.Assert( state == State.ReadElementContentAsBase64 || state == State.ReadElementContentAsBinHex ); 540Debug.Assert( state == State.ReadContentAsBase64 || state == State.ReadContentAsBinHex );
System\Xml\Core\XmlTextEncoder.cs (2)
194Debug.Assert( ( ch < 0x20 && !xmlCharType.IsWhiteSpace( ch ) ) || ( ch > 0xFFFD ) ); 325Debug.Assert( ( ch < 0x20 && !xmlCharType.IsWhiteSpace( ch ) ) || ( ch > 0xFFFD ) );
System\Xml\Core\XmlTextReaderImpl.cs (198)
349Debug.Assert( nt != null ); 369Debug.Assert( index == 0 ); 412Debug.Assert( nameTableFromSettings == false ); 431Debug.Assert( index == 0 ); 485Debug.Assert( false ); 635Debug.Assert( baseUri == null ); 720Debug.Assert( baseUri == null ); 777Debug.Assert( baseUriStr == string.Empty, "BaseURI can come either from XmlParserContext or from the constructor argument, not from both" ); 823Debug.Assert(xmlFragment != null); 846default: Debug.Assert(false); goto case XmlNodeType.None; 1148Debug.Assert(false,"Invalid InitInputType"); 1170Debug.Assert( nextParsingFunction == ParsingFunction.DocumentContent ); 1174Debug.Assert( !ps.appendMode ); 1201Debug.Assert( parsingFunction == ParsingFunction.ElementContent || 1206Debug.Assert( curNode.type == XmlNodeType.Element ); 1274Debug.Assert( false ); 1297Debug.Assert( false ); 1329Debug.Assert( curNode.type == XmlNodeType.EndElement ); 1330Debug.Assert( parsingFunction != ParsingFunction.Eof ); 1434Debug.Assert( parsingMode == ParsingMode.Full ); 1450Debug.Assert( false ); 1472Debug.Assert( false ); 1487Debug.Assert( value is XmlTextReader ); 1502Debug.Assert( outerReader is XmlTextReaderImpl ); 1896Debug.Assert( v1Compat, "XmlTextReaderImpl.Normalization property cannot be accessed on reader created via XmlReader.Create." ); 1900Debug.Assert( v1Compat, "XmlTextReaderImpl.Normalization property cannot be changed on reader created via XmlReader.Create." ); 1922Debug.Assert( v1Compat, "XmlTextReaderImpl.WhitespaceHandling property cannot be accessed on reader created via XmlReader.Create." ); 1926Debug.Assert( v1Compat, "XmlTextReaderImpl.WhitespaceHandling property cannot be changed on reader created via XmlReader.Create." ); 1941Debug.Assert( v1Compat, "XmlTextReaderImpl.DtdProcessing property cannot be accessed on reader created via XmlReader.Create." ); 1945Debug.Assert( v1Compat, "XmlTextReaderImpl.DtdProcessing property cannot be changed on reader created via XmlReader.Create." ); 1988Debug.Assert( v1Compat, "XmlTextReaderImpl.ResetState cannot be called on reader created via XmlReader.Create." ); 2025Debug.Assert( v1Compat, "XmlTextReaderImpl.GetRemainder cannot be called on reader created via XmlReader.Create." ); 2027Debug.Assert( stringBuilder.Length == 0 ); 2062Debug.Assert( v1Compat, "XmlTextReaderImpl.ReadChars cannot be called on reader created via XmlReader.Create." ); 2063Debug.Assert( outerReader is XmlTextReader ); 2096Debug.Assert( v1Compat, "XmlTextReaderImpl.ReadBase64 cannot be called on reader created via XmlReader.Create." ); 2097Debug.Assert( outerReader is XmlTextReader ); 2126Debug.Assert( v1Compat, "XmlTextReaderImpl.ReadBinHex cannot be called on reader created via XmlReader.Create." ); 2127Debug.Assert( outerReader is XmlTextReader ); 2235Debug.Assert( value >= 0 && value <= ps.charsUsed ); 2305Debug.Assert( parsingMode == ParsingMode.Full ); 2391Debug.Assert( parsingStatesStackTop == -1 ); 2392Debug.Assert( ( systemId != null && systemId.Length > 0 ) || ( publicId != null && publicId.Length > 0 ) ); 2405Debug.Assert( ps.appendMode ); 2418Debug.Assert( parsingStatesStackTop == -1 ); 2419Debug.Assert(internalDtd != null); 2553Debug.Assert( InAttributeValueIterator ); 2584Debug.Assert( baseUriStr != null ); 2590Debug.Assert( baseUri != null ); 2602Debug.Assert( ps.charPos == 0 && ps.charsUsed == 0 && ps.textReader == null ); 2603Debug.Assert( baseUriStr != null ); 2604Debug.Assert( baseUri == null || ( baseUri.ToString().Equals( baseUriStr ) ) ); 2683Debug.Assert( ps.charPos == 0 && ps.charsUsed == 0 && ps.stream == null ); 2684Debug.Assert( baseUriStr != null ); 2712Debug.Assert( ps.stream == null && ps.textReader == null ); 2713Debug.Assert( ps.charPos == 0 && ps.charsUsed == 0 ); 2714Debug.Assert( baseUriStr != null ); 2715Debug.Assert(str != null); 2766Debug.Assert( parsingFunction == ParsingFunction.SwitchToInteractiveXmlDecl ); 2770Debug.Assert( parsingFunction == ParsingFunction.SwitchToInteractiveXmlDecl ); 2771Debug.Assert( nextParsingFunction == ParsingFunction.DocumentContent ); 2793Debug.Assert( context != null && context.HasDtdInfo ); 2806Debug.Assert( false, "Unhandled DtdProcessing enumeration value." ); 2816Debug.Assert( url != null && url.Length > 0 ); 2817Debug.Assert( compressedStack != null ); 2822Debug.Assert(xmlResolver != null || !System.Xml.XmlReaderSettings.EnableLegacyXmlSettings()); 2853Debug.Assert( ps.bytes != null ); 2854Debug.Assert( ps.bytePos == 0 ); 2941Debug.Assert( ps.charPos == 0 ); 2969Debug.Assert( ps.stream != null ); 3021Debug.Assert( newEncoding.EncodingName != "UTF-8" ); 3036Debug.Assert( ps.stream != null && ps.decoder != null && ps.bytes != null ); 3037Debug.Assert( ps.appendMode, "UnDecodeChars cannot be called after ps.appendMode has been changed to false" ); 3039Debug.Assert(ps.charsUsed >= ps.charPos, "The current position must be in the valid character range."); 3046Debug.Assert(charactersInDocument >= ps.charsUsed - ps.charPos, 3052Debug.Assert(charactersFromEntities >= ps.charsUsed - ps.charPos, 3186Debug.Assert ( ps.charsUsed < ps.chars.Length ); 3195Debug.Assert( ps.stream != null && ps.decoder != null && ps.bytes != null ); 3196Debug.Assert( maxCharsCount <= ps.chars.Length - ps.charsUsed - 1 ); 3217Debug.Assert( maxCharsCount >= charsCount ); 3233Debug.Assert( false, "We should get an exception again." ); 3295Debug.Assert( stringBuilder.Length == 0 || isTextDecl ); 3486Debug.Assert( !isTextDecl ); 3495Debug.Assert( false ); 3708Debug.Assert( pos == ps.charsUsed && !ps.isEof ); 3731Debug.Assert( index == 0 ); 4057Debug.Assert( curNode.type == XmlNodeType.Element ); 4213Debug.Assert( false, "We should never get to this point." ); 4221Debug.Assert( index > 0 ); 4226Debug.Assert( curNode == startTagNode ); 4250Debug.Assert( startTag.type == XmlNodeType.EntityReference ); 4261Debug.Assert( attrCount == 0 ); 4318Debug.Assert( curNode.type == XmlNodeType.Element ); 4325Debug.Assert( curNode.type == XmlNodeType.Element ); 4548Debug.Assert( curNode.type == XmlNodeType.Element ); 4661Debug.Assert( stringBuilder.Length == 0 ); 4854Debug.Assert( false, "We should never get to this point." ); 4857Debug.Assert( ps.isEof ); 4873Debug.Assert( false ); 4912Debug.Assert( attr.nextAttrValueChunk == null ); 4939Debug.Assert( stringBuilder.Length == 0 ); 4950Debug.Assert( endPos - startPos > 0 ); 4968Debug.Assert( stringBuilder.Length > 0 ); 4986Debug.Assert( endPos - startPos > 0 ); 5221Debug.Assert( ps.isEof ); 5262Debug.Assert( stringBuilder.Length == 0 ); 5263Debug.Assert( parsingFunction == ParsingFunction.PartialTextValue || 5276Debug.Assert( stringBuilder.Length > 0 ); 5322Debug.Assert( parsingFunction == ParsingFunction.PartialTextValue || parsingFunction == ParsingFunction.InReadValueChunk || 5333Debug.Assert( parsingFunction == ParsingFunction.InReadValueChunk ); 5337Debug.Assert( ( index > 0 ) ? nextParsingFunction == ParsingFunction.ElementContent : nextParsingFunction == ParsingFunction.DocumentContent ); 5347Debug.Assert( parsingFunction == ParsingFunction.InReadContentAsBinary || parsingFunction == ParsingFunction.InReadElementContentAsBinary ); 5351Debug.Assert( ( index > 0 ) ? nextParsingFunction == ParsingFunction.ElementContent : nextParsingFunction == ParsingFunction.DocumentContent ); 5374Debug.Assert( stringBuilder.Length == 0 ); 5408Debug.Assert( ps.chars[ps.charPos] == '&' ); 5417Debug.Assert( ps.chars[ps.charPos] == '&' ); 5429Debug.Assert( entityType == EntityType.CharacterDec || entityType == EntityType.CharacterHex ); 5574Debug.Assert( false ); 5613Debug.Assert( lastEntity != null ); 5619Debug.Assert( curNode.depth == index ); 5630Debug.Assert( curNode.type == XmlNodeType.EntityReference ); 5631Debug.Assert( Ref.Equal( lastEntity.Name, curNode.localName ) ); 5648Debug.Assert( stringBuilder.Length == 0 ); 5670Debug.Assert( ps.charPos < ps.charsUsed ); 5703Debug.Assert( stringBuilder.Length == 0 ); 5757Debug.Assert( !ps.eolNormalized ); 5880Debug.Assert( stringBuilder.Length == 0 ); 5935Debug.Assert( !ps.eolNormalized ); 6083Debug.Assert(dtdProcessing == DtdProcessing.Ignore); 6366Debug.Assert( false, "We should never get to this point." ); 6369Debug.Assert( ps.isEof ); 6452Debug.Assert( false, "We should never get to this point." ); 6455Debug.Assert( ps.isEof ); 6463Debug.Assert( ps.chars[startPos] == '&' ); 6489Debug.Assert( ps.chars[ps.charPos] == '&' ); 6507Debug.Assert( ps.chars[startPos] == '&' && ps.chars[startPos + 1] == '#' ); 6602Debug.Assert( pos > 0 ); 6632Debug.Assert( ps.chars[ps.charPos] == '&' ); 6650Debug.Assert( startPos < ps.charsUsed ); 6651Debug.Assert( ps.chars[startPos] == '&' ); 6652Debug.Assert( ps.chars[startPos + 1] != '#' ); 6741Debug.Assert( pos > 0 ); 6882Debug.Assert( nodeIndex < nodes.Length ); 6883Debug.Assert( nodes[nodes.Length - 1] == null ); 6894Debug.Assert( nodeIndex < nodes.Length ); 6900Debug.Assert( nodeIndex < nodes.Length ); 6961Debug.Assert( attr.type == XmlNodeType.Attribute ); 6990Debug.Assert( ps.isEof ); 7070Debug.Assert( curNode.xmlContextPushed ); 7154Debug.Assert( xmlResolver != null ); 7168Debug.Assert( xmlResolver.SupportsType( uri, typeof( Stream ) ), "Stream must always be a supported type in XmlResolver" ); 7189Debug.Assert( entity.IsExternal ); 7201Debug.Assert( ps.appendMode ); 7226Debug.Assert( !entity.IsExternal ); 7285Debug.Assert( parsingStatesStackTop == -1 ); 7299Debug.Assert( parsingStatesStackTop >= 0 ); 7385Debug.Assert( XmlConvert.StrEqual( ps.chars, ps.charPos - 2, 2, "?>" ) ); 7392Debug.Assert( XmlConvert.StrEqual( ps.chars, ps.charPos - 3, 3, "-->" ) ); 7399Debug.Assert( XmlConvert.StrEqual( ps.chars, ps.charPos - 3, 3, "]]>" ) ); 7422Debug.Assert( false ); 7425Debug.Assert( incReadState == IncrementalReadState.Text || 7517Debug.Assert( ps.charPos - pos == 0 ); 7518Debug.Assert( ps.charPos - startPos == 0); 7553Debug.Assert( ps.charPos - pos == 0 ); 7554Debug.Assert( ps.charPos - startPos == 0 ); 7639Debug.Assert( count == charsParsed || incReadDecoder.IsFull, "Check if decoded consumed all characters unless it's full." ); 7654Debug.Assert( IncrementalRead() == 0, "Previous call of IncrementalRead should eat up all characters!" ); 7659Debug.Assert( fragmentType == XmlNodeType.Attribute ); 7673Debug.Assert( parsingFunction == ParsingFunction.InReadAttributeValue ); 7699Debug.Assert( stringBuilder.Length == 0 ); 7710Debug.Assert( ps.eolNormalized, "Entity replacement text for attribute values should be EOL-normalized!" ); 7758Debug.Assert( false, "We should never get to this point." ); 7802Debug.Assert( false, "We should never get to this point." ); 7874Debug.Assert( ps.charPos < ps.charsUsed ); 7931Debug.Assert( dtdInfo == null && fragmentParserContext != null && fragmentParserContext.HasDtdInfo ); 7949Debug.Assert( parsingFunction != ParsingFunction.InReadContentAsBinary ); 7970Debug.Assert( parsingFunction != ParsingFunction.InReadElementContentAsBinary ); 7971Debug.Assert( curNode.type == XmlNodeType.Element ); 8038Debug.Assert( context != null ); 8057Debug.Assert( nt != null ); 8058Debug.Assert( context.NameTable == null || context.NameTable == nt, "This check should have been done in XmlParserContext constructor." ); 8071Debug.Assert( nameTableFromSettings == false ); 8096Debug.Assert( dtdInfo == null ); 8148Debug.Assert( curNode.type == XmlNodeType.Whitespace && newNodeType == XmlNodeType.SignificantWhitespace, "Incorrect node type change!" ); 8230Debug.Assert(attr != null); 8255Debug.Assert( prefix != null ); 8273Debug.Assert(attr != null); 8301Debug.Assert( nodes[index].type == XmlNodeType.Element ); 8315Debug.Assert( nodes[index].type == XmlNodeType.Element ); 8344Debug.Assert( incReadDecoder != null ); 8438Debug.Assert( parsingFunction != ParsingFunction.InReadElementContentAsBinary ); 8489Debug.Assert(characters >= 0); 8525Debug.Assert(startPos >= 0); 8526Debug.Assert(endPos < chars.Length); 8527Debug.Assert(startPos <= endPos); 8538Debug.Assert(startPos >= 0); 8539Debug.Assert(endPos < str.Length); 8540Debug.Assert(startPos <= endPos);
System\Xml\Core\XmlTextReaderImplAsync.cs (81)
69Debug.Assert(false, "Invalid InitInputType"); 161Debug.Assert(false); 165Debug.Assert(!ps.appendMode); 185Debug.Assert(parsingFunction == ParsingFunction.ElementContent || 190Debug.Assert(curNode.type == XmlNodeType.Element); 253Debug.Assert(false); 301Debug.Assert( false ); 333Debug.Assert( curNode.type == XmlNodeType.EndElement ); 334Debug.Assert( parsingFunction != ParsingFunction.Eof ); 723Debug.Assert( parsingMode == ParsingMode.Full ); 788Debug.Assert( parsingStatesStackTop == -1 ); 789Debug.Assert( ( systemId != null && systemId.Length > 0 ) || ( publicId != null && publicId.Length > 0 ) ); 804Debug.Assert( ps.appendMode ); 817Debug.Assert( baseUri != null ); 828Debug.Assert( ps.charPos == 0 && ps.charsUsed == 0 && ps.textReader == null ); 829Debug.Assert( baseUriStr != null ); 830Debug.Assert( baseUri == null || ( baseUri.ToString().Equals( baseUriStr ) ) ); 906Debug.Assert( ps.charPos == 0 && ps.charsUsed == 0 && ps.stream == null ); 907Debug.Assert( baseUriStr != null ); 937Debug.Assert( context != null && context.HasDtdInfo ); 950Debug.Assert( false, "Unhandled DtdProcessing enumeration value." ); 965Debug.Assert( ps.stream != null ); 1096Debug.Assert ( ps.charsUsed < ps.chars.Length ); 1127Debug.Assert( stringBuilder.Length == 0 || isTextDecl ); 1319Debug.Assert( !isTextDecl ); 1328Debug.Assert( false ); 1481Debug.Assert(pos == ps.charsUsed && !ps.isEof); 1580Debug.Assert(index == 0); 2077Debug.Assert(false, "We should never get to this point."); 2080Debug.Assert(index > 0); 2085Debug.Assert(curNode == startTagNode); 2124Debug.Assert( startTag.type == XmlNodeType.EntityReference ); 2135Debug.Assert( attrCount == 0 ); 2193Debug.Assert( curNode.type == XmlNodeType.Element ); 2200Debug.Assert( curNode.type == XmlNodeType.Element ); 2443Debug.Assert( stringBuilder.Length == 0 ); 2641Debug.Assert( false, "We should never get to this point." ); 2644Debug.Assert( ps.isEof ); 2660Debug.Assert( false ); 2707Debug.Assert(stringBuilder.Length == 0); 2732Debug.Assert(endPos - startPos > 0); 2771Debug.Assert( stringBuilder.Length == 0 ); 2790Debug.Assert( endPos - startPos > 0 ); 2817Debug.Assert( stringBuilder.Length > 0 ); 2835Debug.Assert( endPos - startPos > 0 ); 3237Debug.Assert(ps.isEof); 3287Debug.Assert( stringBuilder.Length == 0 ); 3288Debug.Assert( parsingFunction == ParsingFunction.PartialTextValue || 3314Debug.Assert( stringBuilder.Length > 0 ); 3360Debug.Assert( parsingFunction == ParsingFunction.PartialTextValue || parsingFunction == ParsingFunction.InReadValueChunk || 3380Debug.Assert( parsingFunction == ParsingFunction.InReadValueChunk ); 3384Debug.Assert( ( index > 0 ) ? nextParsingFunction == ParsingFunction.ElementContent : nextParsingFunction == ParsingFunction.DocumentContent ); 3397Debug.Assert( parsingFunction == ParsingFunction.InReadContentAsBinary || parsingFunction == ParsingFunction.InReadElementContentAsBinary ); 3401Debug.Assert( ( index > 0 ) ? nextParsingFunction == ParsingFunction.ElementContent : nextParsingFunction == ParsingFunction.DocumentContent ); 3424Debug.Assert( stringBuilder.Length == 0 ); 3458Debug.Assert( ps.chars[ps.charPos] == '&' ); 3469Debug.Assert( ps.chars[ps.charPos] == '&' ); 3486Debug.Assert( entityType == EntityType.CharacterDec || entityType == EntityType.CharacterHex ); 3639Debug.Assert( stringBuilder.Length == 0 ); 3661Debug.Assert( ps.charPos < ps.charsUsed ); 3708Debug.Assert( stringBuilder.Length == 0 ); 3774Debug.Assert( !ps.eolNormalized ); 3901Debug.Assert( stringBuilder.Length == 0 ); 3983Debug.Assert( !ps.eolNormalized ); 4135Debug.Assert(dtdProcessing == DtdProcessing.Ignore); 4423Debug.Assert( false, "We should never get to this point." ); 4426Debug.Assert( ps.isEof ); 4509Debug.Assert( false, "We should never get to this point." ); 4512Debug.Assert( ps.isEof ); 4537Debug.Assert( ps.chars[ps.charPos] == '&' ); 4567Debug.Assert( ps.chars[ps.charPos] == '&' ); 4798Debug.Assert( xmlResolver != null ); 4812Debug.Assert( xmlResolver.SupportsType( uri, typeof( Stream ) ), "Stream must always be a supported type in XmlResolver" ); 4833Debug.Assert( entity.IsExternal ); 4846Debug.Assert( ps.appendMode ); 4886Debug.Assert( dtdInfo == null && fragmentParserContext != null && fragmentParserContext.HasDtdInfo ); 4903Debug.Assert( parsingFunction != ParsingFunction.InReadContentAsBinary ); 4924Debug.Assert( parsingFunction != ParsingFunction.InReadElementContentAsBinary ); 4925Debug.Assert( curNode.type == XmlNodeType.Element ); 4979Debug.Assert( incReadDecoder != null ); 5079Debug.Assert( parsingFunction != ParsingFunction.InReadElementContentAsBinary );
System\Xml\Core\XmlTextReaderImplHelpers.cs (19)
276Debug.Assert(internalDtd != null); 402Debug.Assert( type == XmlNodeType.Element ); 412Debug.Assert( type == XmlNodeType.Attribute ); 425Debug.Assert( valueStartPos >= 0 || this.value != null, "Value not ready." ); 469Debug.Assert( value != null ); 492Debug.Assert( localName != null ); 493Debug.Assert( localName.Length > 0 ); 518Debug.Assert( valueStartPos != -1 ); 519Debug.Assert( chars != null ); 527Debug.Assert( valueStartPos != -1 ); 528Debug.Assert( chars != null ); 543Debug.Assert( valueStartPos != -1 ); 544Debug.Assert( chars != null ); 564Debug.Assert( valueStartPos != -1 ); 565Debug.Assert( chars != null ); 596Debug.Assert( nameWPrefix == null ); 622Debug.Assert( false, "We should never get to this point." ); 641Debug.Assert(x == null || x is NodeData || x is IDtdDefaultAttributeInfo); 642Debug.Assert(y == null || y is NodeData || y is IDtdDefaultAttributeInfo);
System\Xml\Core\XmlTextWriter.cs (5)
832Debug.Assert( false ); 1197Debug.Assert (declared == true, "Unexpected situation!!"); 1207Debug.Assert(false, "Should have never come here"); 1268Debug.Assert(useNsHashtable); 1270Debug.Assert(nsHashtable.ContainsKey(nsStack[i].prefix));
System\Xml\Core\XmlUtf8RawTextWriter.cs (40)
122Debug.Assert( stream != null && settings != null ); 217Debug.Assert( name != null && name.Length > 0 ); 250Debug.Assert( localName != null && localName.Length > 0 ); 251Debug.Assert( prefix != null ); 277Debug.Assert( localName != null && localName.Length > 0 ); 278Debug.Assert( prefix != null ); 303Debug.Assert( localName != null && localName.Length > 0 ); 304Debug.Assert( prefix != null ); 319Debug.Assert( localName != null && localName.Length > 0 ); 320Debug.Assert( prefix != null ); 347Debug.Assert( prefix != null && namespaceName != null ); 361Debug.Assert( prefix != null ); 392Debug.Assert( text != null ); 396Debug.Assert( bufPos >= 4 ); 424Debug.Assert( text != null ); 440Debug.Assert( name != null && name.Length > 0 ); 441Debug.Assert( text != null ); 458Debug.Assert( name != null && name.Length > 0 ); 496Debug.Assert( ws != null ); 513Debug.Assert( text != null ); 544Debug.Assert( buffer != null ); 545Debug.Assert( index >= 0 ); 546Debug.Assert( count >= 0 && index + count <= buffer.Length ); 563Debug.Assert( buffer != null ); 564Debug.Assert( index >= 0 ); 565Debug.Assert( count >= 0 && index + count <= buffer.Length ); 577Debug.Assert( data != null ); 635Debug.Assert( stream != null); 693Debug.Assert( pSrc <= pSrcEnd ); 790Debug.Assert( pSrc <= pSrcEnd ); 870Debug.Assert( s != null ); 896Debug.Assert( pSrc <= pSrcEnd ); 941Debug.Assert( pSrc <= pSrcEnd ); 1036Debug.Assert( pSrc <= pSrcEnd ); 1157Debug.Assert( pSrc <= pSrcEnd ); 1247Debug.Assert( XmlCharType.IsSurrogate( *pSrc ) ); 1276Debug.Assert( !xmlCharType.IsWhiteSpace( (char)ch ) ); 1277Debug.Assert( !xmlCharType.IsAttributeValueChar( (char)ch ) ); 1310Debug.Assert( ch >= 0x80 && !XmlCharType.IsSurrogate( ch ) ); 1575Debug.Assert( localName != null && localName.Length != 0 && prefix != null && ns != null );
System\Xml\Core\XmlUtf8RawTextWriterAsync.cs (34)
66Debug.Assert( name != null && name.Length > 0 ); 100Debug.Assert( localName != null && localName.Length > 0 ); 101Debug.Assert( prefix != null ); 123Debug.Assert( localName != null && localName.Length > 0 ); 124Debug.Assert( prefix != null ); 151Debug.Assert( localName != null && localName.Length > 0 ); 152Debug.Assert( prefix != null ); 168Debug.Assert(localName != null && localName.Length > 0); 169Debug.Assert(prefix != null); 202Debug.Assert( prefix != null && namespaceName != null ); 211Debug.Assert( prefix != null ); 252Debug.Assert( text != null ); 256Debug.Assert( bufPos >= 4 ); 285Debug.Assert( text != null ); 302Debug.Assert( name != null && name.Length > 0 ); 303Debug.Assert( text != null ); 321Debug.Assert( name != null && name.Length > 0 ); 361Debug.Assert( ws != null ); 376Debug.Assert( text != null ); 406Debug.Assert( buffer != null ); 407Debug.Assert( index >= 0 ); 408Debug.Assert( count >= 0 && index + count <= buffer.Length ); 424Debug.Assert( buffer != null ); 425Debug.Assert( index >= 0 ); 426Debug.Assert( count >= 0 && index + count <= buffer.Length ); 437Debug.Assert( data != null ); 465Debug.Assert( stream != null); 526Debug.Assert( pSrc <= pSrcEnd ); 695Debug.Assert( pSrc <= pSrcEnd ); 899Debug.Assert( pSrc <= pSrcEnd ); 988Debug.Assert( pSrc <= pSrcEnd ); 1161Debug.Assert( pSrc <= pSrcEnd ); 1321Debug.Assert( pSrc <= pSrcEnd ); 1455Debug.Assert( localName != null && localName.Length != 0 && prefix != null && ns != null );
System\Xml\Core\XmlValidatingReaderImpl.cs (5)
493Debug.Assert( false ); 633Debug.Assert( value is XmlValidatingReader ); 845Debug.Assert( parserContext != null ); 846Debug.Assert( coreReaderImpl.DtdInfo == null ); 879Debug.Assert( coreReader.NodeType == XmlNodeType.EntityReference );
System\Xml\Core\XmlValidatingReaderImplAsync.cs (4)
62Debug.Assert( false ); 213Debug.Assert( parserContext != null ); 214Debug.Assert( coreReaderImpl.DtdInfo == null ); 229Debug.Assert( coreReader.NodeType == XmlNodeType.EntityReference );
System\Xml\Core\XmlWellFormedWriter.cs (18)
250Debug.Assert(writer != null); 251Debug.Assert(settings != null); 252Debug.Assert(MaxNamespacesWalkCount <= 3); 303Debug.Assert(false, "Expected currentState <= State.Error "); 437Debug.Assert(prefix.Length == 0); 1118Debug.Assert(i >= 0); 1127Debug.Assert(i >= 0); 1348Debug.Assert(false, "State.Attribute == currentState || State.RootLevelAttr == currentState"); 1385Debug.Assert(stateTable == StateTableAuto); 1419Debug.Assert(prefix == "xmlns"); 1572Debug.Assert(useNsHashtable); 1573Debug.Assert(indexFrom <= indexTo); 1575Debug.Assert(nsHashtable.ContainsKey(nsStack[i].prefix)); 1706Debug.Assert(false, "We should not get to this point."); 1730Debug.Assert(false, "We should never get to this point. State = " + state); 1775Debug.Assert(ncname != null && ncname.Length > 0); 1861Debug.Assert(attrHashTable.Count == 0); 1896Debug.Assert(prev >= 0 && attrStack[prev].localName == localName);
System\Xml\Core\XmlWellFormedWriterAsync.cs (2)
189Debug.Assert(prefix.Length == 0); 1149Debug.Assert(false, "We should not get to this point.");
System\Xml\Core\XmlWellFormedWriterHelpers.cs (4)
89Debug.Assert(kind == NamespaceKind.NeedToWrite); 333Debug.Assert(false, "Unexpected ItemType value."); 431Debug.Assert(singleStringValue != null); 432Debug.Assert(lastItem == -1);
System\Xml\Core\XmlWellFormedWriterHelpersAsync.cs (2)
27Debug.Assert(kind == NamespaceKind.NeedToWrite); 87Debug.Assert(false, "Unexpected ItemType value.");
System\Xml\Core\XmlWrappingReader.cs (1)
29Debug.Assert( baseReader != null );
System\Xml\Core\XmlWrappingWriter.cs (1)
61Debug.Assert(baseWriter != null);
System\Xml\Core\XmlWriter.cs (1)
493Debug.Assert(false);
System\Xml\Core\XmlWriterAsync.cs (1)
445Debug.Assert(false);
System\Xml\Core\XmlWriterSettings.cs (6)
330Debug.Assert(cdataSections != null); 498Debug.Assert(Encoding.UTF8.WebName == "utf-8"); 525Debug.Assert(false, "Invalid XmlOutputMethod setting."); 555Debug.Assert(false, "Invalid XmlOutputMethod setting."); 622Debug.Assert(false, "Invalid XmlOutputMethod setting."); 776Debug.Assert(Encoding.Equals(Encoding.GetEncoding(Encoding.CodePage)), "Cannot serialize encoding correctly");
System\Xml\Core\XsdCachingReader.cs (8)
418Debug.Assert(coreReader.NodeType == XmlNodeType.EndElement || (coreReader.NodeType == XmlNodeType.Element && coreReader.IsEmptyElement)); 423Debug.Assert(endElementNode.NodeType == XmlNodeType.EndElement); 430Debug.Assert(coreReader.NodeType == XmlNodeType.EndElement || (coreReader.NodeType == XmlNodeType.Element && coreReader.IsEmptyElement)); 485Debug.Assert(cacheState == CachingReaderState.Replay); 510Debug.Assert(cacheState == CachingReaderState.Replay); 560Debug.Assert(attIndex <= attributeEvents.Length); 580Debug.Assert(contentIndex <= contentEvents.Length); 602Debug.Assert(coreReader.NodeType == XmlNodeType.Element);
System\Xml\Core\XsdCachingReaderAsync.cs (1)
113Debug.Assert(cacheState == CachingReaderState.Replay);
System\Xml\Core\XsdValidatingReader.cs (17)
925Debug.Assert(attNode != null); 968Debug.Assert(attributePSVI != null); 1054Debug.Assert(moveTo); 1545Debug.Assert(attributePSVI != null); 1668Debug.Assert(atomicValue != null); 1744Debug.Assert(coreReaderNameTable.Get(localName) != null); 1745Debug.Assert(coreReaderNameTable.Get(ns) != null); 1779Debug.Assert(coreReaderNameTable.Get(attrLocalName) != null); 1780Debug.Assert(coreReaderNameTable.Get(ns) != null); 1796Debug.Assert(attIndex <= attributePSVINodes.Length); 1820Debug.Assert(inlineSchemaParser != null); 1921Debug.Assert(this.NodeType == XmlNodeType.Element); 2030Debug.Assert(coreReader.NodeType == XmlNodeType.EndElement); 2038Debug.Assert(false); //Should not happen as the caching reader does not cache elements in simple content 2083Debug.Assert(false); //Should not happen as the caching reader does not cache elements in simple content 2134Debug.Assert(xmlType != null && xmlType.Datatype != null); 2145Debug.Assert(NodeType != XmlNodeType.Attribute);
System\Xml\Core\XsdValidatingReaderAsync.cs (3)
515Debug.Assert(atomicValue != null); 529Debug.Assert(inlineSchemaParser != null); 643Debug.Assert(this.NodeType == XmlNodeType.Element);
System\Xml\Dom\DocumentSchemaValidator.cs (16)
71Debug.Assert(schemas != null && schemas.Count > 0); 91Debug.Assert(nodeToValidate.SchemaInfo != null); 113Debug.Assert(schemaElement.ElementSchemaType == schemaInfo.SchemaType); 302Debug.Assert(elementNode != null); 315Debug.Assert(nameTable.Get(attr.NamespaceURI) != null); 316Debug.Assert(nameTable.Get(attr.LocalName) != null); 384Debug.Assert(schemaAttribute != null); 399Debug.Assert(attributeSchemaInfo != null); 410Debug.Assert(simpleValue != null); 441Debug.Assert(elementToValidate.ParentNode.NodeType != XmlNodeType.Document); //Handle if it is the documentElement seperately 550Debug.Assert(nodeSequenceToValidate[0] == elementToValidate.ParentNode); 604Debug.Assert(elementNode != null); 617Debug.Assert(nameTable.Get(attr.NamespaceURI) != null); 618Debug.Assert(nameTable.Get(attr.LocalName) != null); 675Debug.Assert(child == childToStopAt); 701Debug.Assert(ex != null);
System\Xml\Dom\DocumentXmlWriter.cs (3)
359Debug.Assert(elem != null); 363Debug.Assert(attr != null); 372Debug.Assert(attr != null);
System\Xml\Dom\DocumentXPathNavigator.cs (33)
435Debug.Assert(false); 442Debug.Assert(attributes != null); 458Debug.Assert(attributes != null && attributes.parent != null); 484Debug.Assert(namespaceParent != null); 529Debug.Assert(false); 536Debug.Assert(attributes != null); 537Debug.Assert(0 <= index && index < attributes.Count); 553Debug.Assert(attributes != null && attributes.parent != null); 602Debug.Assert(parent != null); 630Debug.Assert(parent != null); 653Debug.Assert(sibling != null); 1078Debug.Assert( node1 != null ); 1079Debug.Assert( node2 != null ); 1080Debug.Assert( node1 != node2, "Should be handled by ComparePosition()" ); 1082Debug.Assert( OwnerNode(node1) == OwnerNode(node2) ); 1149Debug.Assert(node1 != node2); 1182Debug.Assert(node1 != node2); 1201Debug.Assert( this.NodeType != XPathNodeType.Attribute && this.NodeType != XPathNodeType.Namespace && this.NodeType != XPathNodeType.All ); 1534Debug.Assert(node != null, "Undefined navigator position"); 1535Debug.Assert(node == document || node.OwnerDocument == document, "Navigator switched documents"); 1876Debug.Assert( ((XmlNode)nav.UnderlyingObject).NodeType != XmlNodeType.Attribute ); 1886Debug.Assert( node != null ); 1918Debug.Assert( ((XmlNode)nav.UnderlyingObject).NodeType != XmlNodeType.Attribute ); 1919Debug.Assert( Ref.Equal(nav.NameTable.Get( nsAtom ), nsAtom) ); 1930Debug.Assert( node != null ); 1931Debug.Assert( node.NodeType == XmlNodeType.Element ); 1965Debug.Assert( ((XmlNode)nav.UnderlyingObject).NodeType != XmlNodeType.Attribute ); 1966Debug.Assert( Ref.Equal(nav.NameTable.Get( localNameAtom ), localNameAtom) ); 1967Debug.Assert( Ref.Equal(nav.NameTable.Get( nsAtom ), nsAtom) ); 1968Debug.Assert( localNameAtom.Length > 0 ); // Use DocumentXPathNodeIterator_ElemChildren_NoLocalName class for special magic value of localNameAtom 1984Debug.Assert( node != null ); 1985Debug.Assert( node.NodeType == XmlNodeType.Element ); 1994Debug.Assert( localNameAtom.Length > 0 ); // Use DocumentXPathNodeIterator_ElemChildren_AndSelf_NoLocalName if localName == String.Empty
System\Xml\Dom\DomNameTable.cs (1)
28Debug.Assert( ( entries.Length & mask ) == 0 ); // entries.Length must be a power of two
System\Xml\Dom\XmlAttribute.cs (3)
21Debug.Assert(name!=null); 22Debug.Assert(doc!=null); 49Debug.Assert( OwnerDocument != null );
System\Xml\Dom\XmlAttributeCollection.cs (10)
167Debug.Assert( offset != -1 ); // the if statement above guarantees that the ref node is in the collection 195Debug.Assert( offset != -1 ); // the if statement above guarantees that the ref node is in the collection 260Debug.Assert( retNode is XmlAttribute ); 274Debug.Assert(retNode is XmlAttribute); 332Debug.Assert( parentElem != null ); 334Debug.Assert( doc != null ); 346Debug.Assert( parentElem != null ); 348Debug.Assert( doc != null ); 360Debug.Assert( -1 == FindNodeOffset( node )); 363Debug.Assert( retNode is XmlAttribute );
System\Xml\Dom\XmlCDataSection.cs (1)
63Debug.Assert( OwnerDocument != null );
System\Xml\Dom\XmlCharacterData.cs (1)
176Debug.Assert(XmlDocument.IsTextNode(node.NodeType) || (node.ParentNode != null && node.ParentNode.NodeType == XmlNodeType.EntityReference));
System\Xml\Dom\XmlComment.cs (1)
34Debug.Assert( OwnerDocument != null );
System\Xml\Dom\XmlDeclaration.cs (1)
134Debug.Assert( OwnerDocument != null );
System\Xml\Dom\XmlDocument.cs (12)
137Debug.Assert( (prefix == null) ? (n.Prefix.Length == 0) : (prefix == n.Prefix) ); 138Debug.Assert( n.LocalName == localName ); 139Debug.Assert( (namespaceURI == null) ? (n.NamespaceURI.Length == 0) : (n.NamespaceURI == namespaceURI) ); 145Debug.Assert(n == null || ((prefix == null) ? (n.Prefix.Length == 0) : (prefix == n.Prefix))); 146Debug.Assert(n == null || n.LocalName == localName); 147Debug.Assert(n == null || ((namespaceURI == null) ? (n.NamespaceURI.Length == 0) : (n.NamespaceURI == namespaceURI))); 153Debug.Assert( (prefix == null) ? (xmlName.Prefix.Length == 0) : (prefix == xmlName.Prefix) ); 154Debug.Assert( xmlName.LocalName == localName ); 155Debug.Assert( (namespaceURI == null) ? (xmlName.NamespaceURI.Length == 0) : (xmlName.NamespaceURI == namespaceURI) ); 802Debug.Assert( ((XmlAttribute)node).Specified ); 864Debug.Assert( toNode.NodeType != XmlNodeType.EntityReference ); 1482Debug.Assert( doc == this );
System\Xml\Dom\XmlDocumentFragment.cs (3)
102Debug.Assert( OwnerDocument != null ); 143Debug.Assert(newChild != null); //should be checked that newChild is not null before this function call 155Debug.Assert(newChild != null); //should be checked that newChild is not null before this function call
System\Xml\Dom\XmlDocumentType.cs (2)
32Debug.Assert( doc != null ); 58Debug.Assert( OwnerDocument != null );
System\Xml\Dom\XmlElement.cs (5)
23Debug.Assert(name!=null); 48Debug.Assert( OwnerDocument != null ); 404Debug.Assert(n != null); 415Debug.Assert(n != null); 421Debug.Assert(n != null);
System\Xml\Dom\XmlElementList.cs (11)
31Debug.Assert ( parent != null ); 32Debug.Assert( parent.NodeType == XmlNodeType.Element || parent.NodeType == XmlNodeType.Document ); 34Debug.Assert( parent.Document != null ); 67Debug.Assert( parent.Document != null ); 69Debug.Assert( nt != null ); 77Debug.Assert( parent.Document != null ); 79Debug.Assert( nt != null ); 98Debug.Assert( curNode != null ); 122Debug.Assert( curNode != null ); 160Debug.Assert( n!= null ); 172Debug.Assert( n!= null );
System\Xml\Dom\XmlEntityReference.cs (1)
76Debug.Assert( OwnerDocument != null );
System\Xml\Dom\XmlLoader.cs (18)
53Debug.Assert( this.reader != null ); 54Debug.Assert( parentDoc != null ); 132Debug.Assert( parent.NodeType == XmlNodeType.Element ); 151Debug.Assert( parent == null ); 203Debug.Assert( node != null ); 223Debug.Assert(reader.NodeType == XmlNodeType.Attribute); 256Debug.Assert( node != null ); 264Debug.Assert( reader.IsDefault ); 308Debug.Assert( node != null ); 315Debug.Assert( reader.NodeType == XmlNodeType.EntityReference ); 334Debug.Assert( reader.NodeType == XmlNodeType.XmlDeclaration ); 355Debug.Assert( false ); 369Debug.Assert( reader.NodeType == XmlNodeType.DocumentType ); 434Debug.Assert( parent.NodeType == XmlNodeType.Element ); 485Debug.Assert( node != null ); 658Debug.Assert( parentNode.NodeType != XmlNodeType.Document ); 660Debug.Assert( this.doc != null ); 822Debug.Assert( tr.EntityHandling == EntityHandling.ExpandCharEntities );
System\Xml\Dom\XmlName.cs (2)
74Debug.Assert( prefix != null ); 91Debug.Assert( Ref.Equal( name, ownerDoc.NameTable.Get( name ) ) );
System\Xml\Dom\XmlNode.cs (9)
39Debug.Assert( doc != null ); 103Debug.Assert(parentNode != null); 150Debug.Assert( parentNode != null ); 674Debug.Assert( firstNode.NodeType == XmlNodeType.Text 692Debug.Assert( true, "shouldn't have fall through here." ); 1185Debug.Assert(prevNode.IsText); 1186Debug.Assert(nextNode.IsText); 1192Debug.Assert(prevNode.IsText); 1193Debug.Assert(nextNode.IsText);
System\Xml\Dom\XmlNodeReader.cs (11)
104Debug.Assert( nt == XmlNodeType.XmlDeclaration || nt == XmlNodeType.DocumentType ); 121Debug.Assert( curNode.NodeType == XmlNodeType.XmlDeclaration || curNode.NodeType == XmlNodeType.DocumentType ); 125Debug.Assert( nAttrInd >= 0 && nAttrInd < AttributeCount ); 207Debug.Assert( curNode.NodeType == XmlNodeType.XmlDeclaration || curNode.NodeType == XmlNodeType.DocumentType ); 208Debug.Assert( nAttrInd >= 0 && nAttrInd < AttributeCount ); 224Debug.Assert( nt == XmlNodeType.XmlDeclaration || nt == XmlNodeType.DocumentType ); 225Debug.Assert( nAttrInd >= 0 && nAttrInd < AttributeCount ); 531Debug.Assert( IsOnDeclOrDocType ); 889Debug.Assert( curNode.NodeType == XmlNodeType.XmlDeclaration || curNode.NodeType == XmlNodeType.DocumentType ); 914Debug.Assert( curNode != null ); 1378Debug.Assert( curDepth == 0 );
System\Xml\Dom\XmlProcessingInstruction.cs (1)
80Debug.Assert( OwnerDocument != null );
System\Xml\Dom\XmlSignificantWhiteSpace.cs (1)
65Debug.Assert( OwnerDocument != null );
System\Xml\Dom\XmlText.cs (1)
66Debug.Assert( OwnerDocument != null );
System\Xml\Dom\XmlWhitespace.cs (1)
78Debug.Assert( OwnerDocument != null );
System\Xml\Resolvers\XmlPreloadedResolver.cs (2)
191Debug.Assert(Rss091_Dtd.Length == 1); 337Debug.Assert(uri != null);
System\Xml\Schema\BaseProcessor.cs (2)
26Debug.Assert(nameTable != null); 128Debug.Assert(item is XmlSchemaElement);
System\Xml\Schema\BaseValidator.cs (2)
49Debug.Assert(schemaCollection == null || schemaCollection.NameTable == reader.NameTable); 155Debug.Assert(names.Count > 0);
System\Xml\Schema\BitSet.cs (1)
68Debug.Assert(startFrom >= -1 && startFrom <= count);
System\Xml\Schema\Chameleonkey.cs (1)
61Debug.Assert((chameleonLocation.OriginalString.Length == 0 && originalSchema != null)
System\Xml\Schema\CompiledidEntityConstraint.cs (1)
57Debug.Assert(fields.Count > 0);
System\Xml\Schema\ConstraintStruct.cs (3)
190Debug.Assert (this.dstruct != null); 196Debug.Assert (this.dstruct != null); 343Debug.Assert(dim > 0);
System\Xml\Schema\ContentValidator.cs (17)
84Debug.Assert(particles.Count == last + 1); 117Debug.Assert(particles.Count == last + 1); 854Debug.Assert(parent is SequenceNode); 855Debug.Assert(this == parent.RightChild); 1126Debug.Assert(ContentType == XmlSchemaContentType.ElementOnly || ContentType == XmlSchemaContentType.Mixed); 1130Debug.WriteLineIf(DiagnosticsSwitches.XmlSchemaContentModel.Enabled, "\t\t\tContentType: " + ctype); 1134Debug.WriteLineIf(DiagnosticsSwitches.XmlSchemaContentModel.Enabled, "\t\t\tContent: EMPTY"); 1135Debug.Assert(!IsOpen); 1226Debug.Assert(lrNode != null); 1240Debug.Assert(lrNode1 != null); 1340Debug.Assert(state == (int)stateTable[statePosSet]); // just make sure that statePosSet is for correct state 1668Debug.Assert(minMaxNodesCount != 0); 1761Debug.Assert(minMaxNodesCount > 0); 1783Debug.Assert(lrNode != null); 1865Debug.Assert(runningPositions[i].curpos != null); 1900Debug.Assert(runningPositions[i].curpos != null); 1949Debug.Assert(elements.Count > 0);
System\Xml\Schema\DataTypeImplementation.cs (7)
163Debug.Assert(qname != null && dataType != null); 178Debug.Assert(derivedType != null && baseType != null); 331Debug.Assert(currentType != null); 877Debug.Assert(arr1 != null && arr2 != null); 885Debug.Assert(atomicValues2 != null); 940Debug.Assert(valuesToCheck != null); 1023Debug.Assert(array.GetType() == ListValueType);
System\Xml\Schema\DtdParser.cs (26)
247Debug.Assert(readerAdapter != null); 481Debug.Assert( ParsingInternalSubset ); 486Debug.Assert( externalEntitiesDepth == 0 ); 567Debug.Assert( curPos > 0 && chars[curPos-1] == ']' ); 595Debug.Assert( false ); 599Debug.Assert( scanningFunction == ScanningFunction.SubsetContent ); 1533Debug.Assert( idTokenType == Token.PUBLIC ); 1672Debug.Assert( false ); 2303Debug.Assert( chars[curPos] == '"' || chars[curPos] == '\'' ); 2500Debug.Assert( curPos - tokenStartPos == 0 ); 2975Debug.Assert( chars[curPos] == 'P' ); 2991Debug.Assert( chars[curPos] == 'S' ); 3010Debug.Assert( curPos - tokenStartPos > 0 ); 3027Debug.Assert( curPos - tokenStartPos > 0 ); 3045Debug.Assert( curPos == 0 || chars[curPos-1] == '"' || chars[curPos-1] == '\'' ); 3073Debug.Assert( internalSubsetValueSb != null ); 3087Debug.Assert( chars[curPos] == '&' || chars[curPos] == '%' ); 3095Debug.Assert( chars[curPos-1] == ';' ); 3151Debug.Assert( !ParsingInternalSubset || freeFloatingDtd ); 3152Debug.Assert( currentEntityId == 0 ); 3172Debug.Assert( chars[curPos-1] == ';' ); 3221Debug.Assert( validate ); 3226Debug.Assert( validate ); 3231Debug.Assert( validate ); 3263Debug.Assert( false, "This is an unexpected error that should have been handled in the ScanXXX methods." ); 3335Debug.Assert( startPos < charsUsed );
System\Xml\Schema\DtdParserAsync.cs (13)
126Debug.Assert( ParsingInternalSubset ); 131Debug.Assert( externalEntitiesDepth == 0 ); 212Debug.Assert( curPos > 0 && chars[curPos-1] == ']' ); 240Debug.Assert( false ); 244Debug.Assert( scanningFunction == ScanningFunction.SubsetContent ); 1147Debug.Assert( idTokenType == Token.PUBLIC ); 1289Debug.Assert( false ); 1760Debug.Assert( chars[curPos] == '"' || chars[curPos] == '\'' ); 1957Debug.Assert( curPos - tokenStartPos == 0 ); 2408Debug.Assert( chars[curPos] == 'P' ); 2424Debug.Assert( chars[curPos] == 'S' ); 2453Debug.Assert( chars[curPos] == '&' || chars[curPos] == '%' ); 2461Debug.Assert( chars[curPos-1] == ';' );
System\Xml\Schema\DtdValidator.cs (2)
42Debug.Assert(reader != null); 129Debug.Assert(reader.NodeType == XmlNodeType.Element);
System\Xml\Schema\FacetChecker.cs (2)
378Debug.Assert(false); 1341Debug.Assert(values != null);
System\Xml\Schema\Inference\Infer.cs (10)
277Debug.Assert(this.rootSchema != null, "rootSchema is null"); 302Debug.Assert(compiledAttributes != null); //AttributeUses is never null 500Debug.Assert(targetNS == null || targetNS.Length > 0 , "targetns for schema is empty"); 1016Debug.Assert(elem.ElementDecl == null); 1216Debug.Assert(xtr.NodeType == XmlNodeType.Attribute); 1256Debug.Assert(ct != null); 1267Debug.Assert(ct != null); //either the user-defined type itself is a complex type or we switched from a simple type to a complex type 1271Debug.Assert(sce != null); 1722Debug.Assert(false, "Expected type not matched"); 2360Debug.Assert(false, "Expected date, time or dateTime");
System\Xml\Schema\NamespaceList.cs (7)
29Debug.Assert(targetNamespace != null); 60Debug.Assert(set != null); 96Debug.Assert(false); 132Debug.Assert(false); 148Debug.Assert(super.type == ListType.Set); 163Debug.Assert(o1 != o2); 251Debug.Assert(o1 != o2); //clause 1
System\Xml\Schema\Parser.cs (8)
89Debug.Assert(schemaType == SchemaType.XDR); 130Debug.Assert(false); 211Debug.Assert(parentNode != null); 287Debug.Assert(currentNode != null); 288Debug.Assert(parentNode != null); 295Debug.Assert( reader.NodeType == XmlNodeType.Element ); 364Debug.Assert(reader.NodeType == XmlNodeType.Attribute); 387Debug.Assert(reader.NodeType == XmlNodeType.EntityReference);
System\Xml\Schema\ParserAsync.cs (1)
49Debug.Assert(schemaType == SchemaType.XDR);
System\Xml\Schema\Preprocessor.cs (4)
274Debug.Assert(import != null); 616Debug.Assert(false); 719Debug.Assert(currentSchema != null); 846Debug.Assert((currentSchemaObject as XmlSchema) == null); //The current object should not be schema
System\Xml\Schema\SchemaCollectionCompiler.cs (8)
48Debug.Assert(!members.Contains(element)); 403Debug.Assert(group.CanonicalParticle != null); 812Debug.Assert(baseType.ElementDecl.ContentValidator != null); 1110Debug.Assert(false); 1474Debug.Assert(attribute.Use != XmlSchemaUse.Prohibited); 1849Debug.Assert(xe.ElementSchemaType != null); 2078Debug.Assert(!p.IsEmpty); 2093Debug.Assert(false);
System\Xml\Schema\SchemaInfo.cs (1)
276Debug.Assert(false);
System\Xml\Schema\SchemaSetCompiler.cs (12)
98Debug.Assert(schemaForSchema != null); 388Debug.Assert(examplar != null); //Headelement presence is checked while building subst groups 467Debug.Assert(group.CanonicalParticle != null); 1286Debug.Assert(false); 1756Debug.Assert(attribute.Use != XmlSchemaUse.Prohibited); 2195Debug.Assert(xe.ElementSchemaType != null); 2212Debug.Assert(decl != null); 2434Debug.Assert(!((XmlSchemaParticle)particles[i]).IsEmpty); 2449Debug.Assert(false); 2572Debug.Assert(baseFixedValue != null); 2576Debug.Assert(derivedFixedValue != null); 2588Debug.Assert(simpleFixedValue != null);
System\Xml\Schema\XdrBuilder.cs (1)
578Debug.Assert(_GroupDef != null);
System\Xml\Schema\XmlAtomicValue.cs (9)
137Debug.Assert(qname != null); //string representation is handled in a different overload 190default: Debug.Assert(false, "Should never get here"); break; 208default: Debug.Assert(false, "Should never get here"); break; 227default: Debug.Assert(false, "Should never get here"); break; 247default: Debug.Assert(false, "Should never get here"); break; 266default: Debug.Assert(false, "Should never get here"); break; 285default: Debug.Assert(false, "Should never get here"); break; 306default: Debug.Assert(false, "Should never get here"); break; 324default: Debug.Assert(false, "Should never get here"); break;
System\Xml\Schema\XmlSchema.cs (2)
253Debug.Assert(this.isPreprocessed); 624Debug.Assert(extList != null && schema != null);
System\Xml\Schema\XmlSchemaComplexType.cs (1)
354System.Diagnostics.Debug.Assert(false, "Should never call Clone() on XmlSchemaComplexType. Call Clone(XmlSchema) instead.");
System\Xml\Schema\XmlSchemaElement.cs (1)
315System.Diagnostics.Debug.Assert(false, "Should never call Clone() on XmlSchemaElement. Call Clone(XmlSchema) instead.");
System\Xml\Schema\XmlSchemaGroup.cs (1)
80System.Diagnostics.Debug.Assert(false, "Should never call Clone() on XmlSchemaGroup. Call Clone(XmlSchema) instead.");
System\Xml\Schema\XmlSchemaObject.cs (4)
86get { Debug.Assert(false); return null; } 87set { Debug.Assert(false); } 95get { Debug.Assert(false); return null; } 96set { Debug.Assert(false); }
System\Xml\Schema\XmlSchemaObjectTable.cs (11)
23Debug.Assert(!table.ContainsKey(name), "XmlSchemaObjectTable.Add: entry already exists"); 32Debug.Assert(oldValue != null); 34Debug.Assert(matchedIndex >= 0); 36Debug.Assert(entries[matchedIndex].qname == name); 49Debug.Assert(oldValue != null); 51Debug.Assert(entries[matchedIndex].qname == name); 66Debug.Assert(matchedIndex >= 0); 67Debug.Assert(entries[matchedIndex].qname == name); 84Debug.Assert(table.Count == entries.Count); 184Debug.Assert(array.Length >= size, "array is not big enough to hold all the items in the ICollection"); 229Debug.Assert(array.Length >= size, "array is not big enough to hold all the items in the ICollection");
System\Xml\Schema\XmlSchemaSet.cs (2)
878Debug.Assert(ns != null); 887Debug.Assert(schema.BaseUri.Equals(schemaUri));
System\Xml\Schema\XmlSchemaSimpleType.cs (1)
26Debug.Assert(SchemaContentType == XmlSchemaContentType.TextOnly);
System\Xml\Schema\XmlSchemaValidator.cs (35)
309Debug.Assert(validatedNamespaces != null); 545Debug.Assert(currentState == ValidatorState.TopLevelAttribute); //Re-set state back to start on error with partial validation type 554Debug.Assert(currentElementDecl != null); 556Debug.Assert(ct != null); 570Debug.Assert(attributeDef != null); 586Debug.Assert(simpleValue != null); 710Debug.Assert(names.Count > 0); 817Debug.Assert(context.Validity != XmlSchemaValidity.Valid); 920Debug.Assert(attSchemaInfo != null); 1216Debug.Assert(currentElementDecl.Datatype != null); 1266Debug.Assert(simpleValue != null); 1277Debug.Assert(decl != null && decl.SchemaType != null); 1312Debug.Assert(validationStack.Length > 1); 1372Debug.Assert(partialValidationType is XmlSchemaAttribute); 1400Debug.Assert(elementDecl.DefaultValueTyped != null); 1527Debug.Assert(elementDecl.ContentValidator.ContentType == XmlSchemaContentType.Mixed && elementDecl.DefaultValueTyped != null); 1537Debug.Assert(decl != null); 1548Debug.Assert(xmlResolver != null); 1625Debug.Assert(dtype != null); 1657Debug.Assert(dtype != null); 1762Debug.Assert(currentElementDecl != null); 1875Debug.WriteLine("Selector Match!"); 1876Debug.WriteLine("Name: " + localName + "\t|\tURI: " + namespaceUri + "\n"); 1888Debug.WriteLine("Element Field Match!"); 1923Debug.WriteLine("Attribute Field Match!"); 1926Debug.WriteLine("Attribute Field Filling Value!"); 1927Debug.WriteLine("Name: " + name + "\t|\tURI: " + ns + "\t|\tValue: " + obj + "\n"); 1934Debug.Assert(datatype != null); 1963Debug.WriteLine("Element Field Filling Value!"); 1964Debug.WriteLine("Name: " + localName + "\t|\tURI: " + namespaceUri + "\t|\tValue: " + typedValue + "\n"); 2107Debug.Assert(contentValidator is DfaContentValidator || contentValidator is NfaContentValidator || contentValidator is RangeContentValidator || contentValidator is AllElementsContentValidator); 2125Debug.Assert(names.Count > 0); 2164Debug.Assert(names.Count > 0); 2195Debug.Assert(builder.Length != 0); 2282Debug.Assert(nsList.Length > 0);
System\Xml\Schema\XmlValueConverter.cs (8)
282Debug.Assert(schemaType != null && datatype != null, "schemaType or schemaType.Datatype may not be null"); 290Debug.Assert(schemaType.Datatype.Variety != XmlSchemaDatatypeVariety.List, "schemaType must be list's item type, not list itself"); 312Debug.Assert(false, "Type code " + typeCode + " is not supported."); 512Debug.Assert(this.typeCode == XmlTypeCode.Item, "If SchemaType is null, then TypeCode may only be Item, Node, or AnyAtomicType"); 3106Debug.Assert(!(atomicConverter is XmlListConverter) || ((XmlListConverter) atomicConverter).atomicConverter == null, 3231Debug.Assert(enumSrc != null, "Value passed to ToArray must implement IEnumerable"); 3257Debug.Assert(enumSrc != null, "Value passed to ToArray must implement IEnumerable"); 3317Debug.Assert(schemaType.DerivedBy == XmlSchemaDerivationMethod.Union);
System\Xml\Schema\XsdBuilder.cs (7)
698Debug.Assert(this.currentEntry.InitFunc != null); 701Debug.Assert(xso != null); 931Debug.Assert(false, "State is " + state); 1054Debug.Assert(false, "State is " + state); 1265Debug.Assert(false); 2173Debug.Assert(false); 2216Debug.Assert(false);
System\Xml\Schema\XsdDateTime.cs (3)
162Debug.Assert(Bits.ExactlyOne((uint)kinds), "Only one DateTime type code can be set."); 175Debug.Assert(dateTime.Kind == DateTimeKind.Local, "Unknown DateTimeKind: " + dateTime.Kind); 200Debug.Assert(Bits.ExactlyOne((uint)kinds), "Only one DateTime type code can be set.");
System\Xml\Schema\XsdDuration.cs (1)
109Debug.Assert(durationType == DurationType.Duration || durationType == DurationType.DayTimeDuration);
System\Xml\Schema\XsdValidator.cs (9)
409Debug.Assert(attnDef.SchemaType != null); 773Debug.WriteLine("Selector Match!"); 774Debug.WriteLine("Name: " + reader.LocalName + "\t|\tURI: " + reader.NamespaceURI + "\n"); 785Debug.WriteLine("Element Field Match!"); 822Debug.WriteLine("Attribute Field Match!"); 825Debug.WriteLine("Attribute Field Filling Value!"); 826Debug.WriteLine("Name: " + name + "\t|\tURI: " + ns + "\t|\tValue: " + obj + "\n"); 866Debug.WriteLine("Element Field Filling Value!"); 867Debug.WriteLine("Name: " + reader.LocalName + "\t|\tURI: " + reader.NamespaceURI + "\t|\tValue: " + reader.TypedValueObject + "\n");
System\Xml\Serialization\CodeExporter.cs (1)
161Debug.Assert(comments != null);
System\Xml\Serialization\CodeGenerator.cs (31)
59System.Diagnostics.Debug.Assert(typeBuilder != null); 133System.Diagnostics.Debug.Assert(false, msg); 138System.Diagnostics.Debug.Assert(argList != null && argList.ContainsKey(name)); 143System.Diagnostics.Debug.Assert(currentScope != null && currentScope.ContainsKey(name)); 183System.Diagnostics.Debug.Assert(false); 222Debug.Assert(this.currentScope.parent != null); 230Debug.Assert(freeLocals != null); 249Debug.Assert(!currentScope.ContainsKey(name)); 265Debug.Assert(local.LocalType == type); 303Debug.Assert(forState != null); 610Debug.Assert(methodInfo != null); 618Debug.Assert(ctor != null); 623Debug.Assert(constructorInfo != null); 741System.Diagnostics.Debug.Assert(memberInfo.MemberType == MemberTypes.Property); 752System.Diagnostics.Debug.Assert(getMethod != null); 773System.Diagnostics.Debug.Assert(memberInfo.MemberType == MemberTypes.Property); 784System.Diagnostics.Debug.Assert(getMethod != null); 807System.Diagnostics.Debug.Assert(memberInfo.MemberType == MemberTypes.Property); 817System.Diagnostics.Debug.Assert(setMethod != null); 1058Debug.Assert(false, "Char is not a valid schema primitive and should be treated as int in DataContract"); 1130Debug.Assert(false, "UnknownConstantType"); 1215Debug.Assert(currentScope.ContainsKey(name)); 1225Debug.Assert(local.LocalType == type); 1234Debug.Assert(currentScope.ContainsKey(name)); 1236Debug.Assert(local.LocalType == type); 1439Debug.Assert(!opCode.Equals(OpCodes.Nop)); 1727Debug.Assert(ifState != null); 1958Debug.Assert(initElseIfStack == -1); 1967Debug.Assert(initIfStack == -1); 1984Debug.Assert(initIfStack == -1 && initElseIfStack == -1); 2002Debug.Assert(initIfStack == -1 && initElseIfStack == -1);
System\Xml\Serialization\SourceInfo.cs (4)
105Debug.Assert(get_Item != null); 169Debug.Assert(match.Groups["arg"].Value == Arg); 170Debug.Assert(match.Groups["cast"].Value == CodeIdentifier.GetCSharpName(Type)); 192System.Diagnostics.Debug.Assert(targetType == nullableType || targetType.IsAssignableFrom(nullableType.GetGenericArguments()[0]));
System\Xml\Serialization\Types.cs (2)
976Debug.Assert(propertyInfo != null); 977Debug.Assert(typeDesc != null);
System\Xml\Serialization\XmlSchemas.cs (1)
437Debug.WriteLineIf(DiagnosticsSwitches.XmlSerialization.TraceVerbose, "XmlSerialization::Failed to Merge " + MergeFailedMessage(o, dest, schema.TargetNamespace)
System\Xml\Serialization\XmlSerializationILGen.cs (5)
46System.Diagnostics.Debug.Assert(access == "public"); 60get { System.Diagnostics.Debug.Assert(moduleBuilder != null); return moduleBuilder; } 61set { System.Diagnostics.Debug.Assert(moduleBuilder == null && value != null); moduleBuilder = value; } 99System.Diagnostics.Debug.Assert(methodBuilders.ContainsKey(methodName)); 567System.Diagnostics.Debug.Assert(memberInfos.ContainsKey(source.Substring(3)));
System\Xml\Serialization\XmlSerializationReaderILGen.cs (20)
254Debug.Assert(idNameFields.ContainsKey(id)); 311Debug.Assert(node == "null" || node == "(object)p"); 699System.Diagnostics.Debug.Assert(source == "Reader.ReadElementString()" || source == "Reader.ReadString()" 831System.Diagnostics.Debug.Assert(source == "Reader.Value" || source == "Reader.ReadElementString()"); 939System.Diagnostics.Debug.Assert(source == "false"); 1080Debug.Assert(get_TableName != null); 1777System.Diagnostics.Debug.Assert(source == "Reader"); 2069System.Diagnostics.Debug.Assert(elseCall == "UnknownNode"); 2363Debug.Assert(anyText != null); 2665Debug.Assert(!soapRefs); 2735Debug.Assert(match.Groups["locA1"].Value == match.Groups["locA2"].Value); 2736Debug.Assert(match.Groups["locA1"].Value == match.Groups["locA3"].Value); 2737Debug.Assert(match.Groups["locI1"].Value == match.Groups["locI2"].Value); 2781System.Diagnostics.Debug.Assert(ilg.GetVariableType(ilg.GetVariable(match.Groups["a"].Value)).IsArray); 2800Debug.Assert(elementType != null && variable is LocalBuilder); 2809Debug.Assert(memberInfos.ContainsKey(source.Substring(3))); 2834Debug.Assert(!localA.LocalType.IsGenericType || (localA.LocalType.GetGenericArguments().Length == 1 && localA.LocalType.GetGenericArguments()[0].IsAssignableFrom(elementType))); 2842Debug.Assert(Add != null); 2855System.Diagnostics.Debug.Assert(varType.IsArray); 2881Debug.Assert(memberInfos.ContainsKey(source.Substring(3)));
System\Xml\Serialization\XmlSerializationWriterILGen.cs (11)
1008System.Diagnostics.Debug.Assert(xmlnsSource.StartsWith("o.@", StringComparison.Ordinal)); 1327System.Diagnostics.Debug.Assert(parent == "o" || parent == "p"); 2121Debug.Assert(!local.LocalType.IsValueType); 2300Debug.Assert(type.IsValueType); 2377Debug.Assert(initValue.MemberInfo != null); 2378Debug.Assert(initValue.MemberInfo.Name == initValue.Arg.Substring(3)); 2418Debug.Assert(typeName == arrayTypeDesc.CSharpName || typeName == arrayTypeDesc.CSharpName + "[]"); 2428Debug.Assert(type != null); 2429Debug.Assert(ilg != null); 2436Debug.Assert(arrayType != null); 2437Debug.Assert(ilg != null);
System\Xml\ValidateNames.cs (7)
49Debug.Assert(s != null && offset <= s.Length); 86Debug.Assert(s != null && offset <= s.Length); 128Debug.Assert(s != null && offset <= s.Length); 184Debug.Assert(s != null && offset <= s.Length); 383Debug.Assert(offsetBadChar < s.Length); 409Debug.Assert(offsetBadChar < s.Length); 473Debug.Assert(prefix != null && localName != null && ns != null);
System\Xml\XmlCharType.cs (9)
429Debug.Assert( memStream.Length == CharPropertiesSize ); 478Debug.Assert( s_CharProperties != null ); 712Debug.Assert(str != null); 713Debug.Assert(startPos + len <= str.Length); 714Debug.Assert(startPos <= str.Length); 725Debug.Assert( chars != null ); 726Debug.Assert( startPos + len <= chars.Length ); 727Debug.Assert( startPos <= chars.Length ); 750Debug.Assert(start <= end);
System\Xml\XmlEncoding.cs (2)
351Debug.Assert( i == 1 ); 395Debug.Assert( i == 1 );
System\Xml\XmlException.cs (4)
244Debug.Assert(invCharIndex < data.Length); 245Debug.Assert(invCharIndex < length); 246Debug.Assert(length <= data.Length); 299Debug.Assert(e != null, "Unexpected null exception");
System\Xml\XmlNamespacemanager.cs (4)
116Debug.Assert( decl >= 2 ); 170Debug.Assert( hashTable == null ); 222Debug.Assert( i >= 2 ); 232Debug.Assert( prefix != null );
System\Xml\XmlQualifiedName.cs (4)
180Debug.Assert(false, "Randomized hashing is not supported."); 221Debug.Assert(name != null && ns != null); 228Debug.Assert(ns != null); 240Debug.Assert(name != null);
System\Xml\XPath\Internal\AttributeQuery.cs (1)
42Debug.Assert(! currentNode.NamespaceURI.Equals(XmlReservedNs.NsXmlNs));
System\Xml\XPath\Internal\Axis.cs (2)
42Debug.Assert(prefix != null); 43Debug.Assert(name != null);
System\Xml\XPath\Internal\BaseAxisQuery.cs (3)
37Debug.Assert(qyInput != null); 64Debug.Assert(context != null); 109Debug.Assert(this is AttributeQuery || this is ChildrenQuery);
System\Xml\XPath\Internal\BooleanExpr.cs (2)
22Debug.Assert(op == Operator.Op.AND || op == Operator.Op.OR); 23Debug.Assert(opnd1 != null && opnd2 != null);
System\Xml\XPath\Internal\BooleanFunctions.cs (1)
60Debug.Assert(result is XPathNavigator, "Unknown value type");
System\Xml\XPath\Internal\CacheAxisQuery.cs (2)
39Debug.Assert(0 <= count && count <= outputBuffer.Count); 48Debug.Assert(0 <= count && count <= outputBuffer.Count);
System\Xml\XPath\Internal\CacheOutputQuery.cs (2)
48Debug.Assert(0 <= count && count <= outputBuffer.Count); 57Debug.Assert(0 <= count && count <= outputBuffer.Count);
System\Xml\XPath\Internal\CompiledXPathExpr.cs (2)
42Debug.Assert(query != null, "In case of error in XPath we create ErrorXPathExpression"); 101Debug.Assert(prefix != null);
System\Xml\XPath\Internal\DescendantoverDescendantQuery.cs (1)
77Debug.Assert(result, "Algorithm error, We always should be able to move up if level > 0");
System\Xml\XPath\Internal\FilterQuery.cs (1)
65Debug.Assert(value is XPathNavigator, "Unknown value type");
System\Xml\XPath\Internal\ForwardPositionQuery.cs (1)
17Debug.Assert(input != null);
System\Xml\XPath\Internal\LogicalExpr.cs (7)
22Debug.Assert( 85Debug.Assert(op == Operator.Op.EQ || op == Operator.Op.NE); 112Debug.Assert( 213Debug.Assert( op == Operator.Op.EQ || op == Operator.Op.NE, 277Debug.Fail("Unexpected Operator.op code in cmpNumberNumber()"); 287Debug.Fail("Unexpected Operator.op code in cmpNumberNumberO()"); 309Debug.Assert( op == Operator.Op.EQ || op == Operator.Op.NE,
System\Xml\XPath\Internal\NamespaceQuery.cs (2)
52Debug.Assert(e.NodeType == XPathNodeType.Namespace); 54Debug.Assert(e.LocalName.Length == 0, "Only xmlns='' can have empty string as a value");
System\Xml\XPath\Internal\NumericExpr.cs (3)
22Debug.Assert( 27Debug.Assert(opnd1 != null && opnd2 != null); 56Debug.Assert(op == Operator.Op.PLUS || op == Operator.Op.MINUS || op == Operator.Op.MOD || op == Operator.Op.DIV || op == Operator.Op.MUL);
System\Xml\XPath\Internal\Operator.cs (1)
51Debug.Assert(Op.EQ <= op && op <= Op.GE);
System\Xml\XPath\Internal\PrecedingQuery.cs (2)
77Debug.Assert(qyInput.Advance() == null, "we read all qyInput.Advance() already"); 87Debug.Fail("Algorithm error: we missed the centinel node");
System\Xml\XPath\Internal\PrecedingSibling.cs (2)
63Debug.Assert(test, "We just moved to parent, how we can not have first child?"); 69Debug.Fail("We managed to miss sentinel node (input)");
System\Xml\XPath\Internal\Query.cs (9)
140Debug.Assert(0 <= l && l < r); 169Debug.Assert(0 <= pos && pos <= buffer.Count, "Algorithm error: Insert()"); 173Debug.Assert(cmp == XmlNodeOrder.Before, "Algorithm error: Insert()"); 177Debug.Assert(cmp == XmlNodeOrder.Before, "Algorithm error: Insert()"); 183Debug.Assert(query != null, "AssertQuery(): query == null"); 193Debug.Assert(curr == query.Current, "AssertQuery(): query.Advance() != query.Current"); 201Debug.Assert(cmp == XmlNodeOrder.Before, "AssertQuery(): Wrong node order"); 207Debug.Assert(actualSize == querySize, "AssertQuery(): actualSize != querySize"); 225Debug.Assert(value is XPathNavigator, "Unknown value type");
System\Xml\XPath\Internal\QueryBuilder.cs (2)
400Debug.Assert(root != null, "root != null"); 429Debug.Assert(false, "Unknown QueryType encountered!!");
System\Xml\XPath\Internal\SortQuery.cs (9)
23Debug.Assert(qyInput != null, "Sort Query needs an input query tree to work on"); 51Debug.Assert(numSorts > 0, "Why was the sort query created?"); 75Debug.Assert(0 <= count && count <= results.Count); 84Debug.Assert(0 <= count && count <= results.Count); 148Debug.Assert(this.expressions.Length == this.comparers.Length); 149Debug.Assert(0 < this.expressions.Length); 150Debug.Assert(0 <= numSorts && numSorts <= this.expressions.Length); 162Debug.Assert(numSorts < this.expressions.Length); 181Debug.Assert(x != null && y != null, "Oops!! what happened?");
System\Xml\XPath\Internal\StringFunctions.cs (2)
23Debug.Assert(argList != null, "Use 'new Query[]{}' instead."); 82Debug.Assert(GetXPathType(argVal) == XPathResultType.Number);
System\Xml\XPath\Internal\XPathArrayIterator.cs (2)
48Debug.Assert(index <= list.Count); 61Debug.Assert(index <= list.Count);
System\Xml\XPath\Internal\XPathMultyIterator.cs (3)
92Debug.Assert(firstNotEmpty <= item && item < arr.Length); 136Debug.Assert(position != 0, "MoveNext() wasn't called"); 137Debug.Assert(firstNotEmpty < arr.Length, "MoveNext() returned false");
System\Xml\XPath\Internal\XPathParser.cs (5)
364Debug.Assert(nodeType != XPathNodeType.Root); 411Debug.Assert(IsPrimaryExpr(this.scanner)); 442 Debug.Assert(opnd != null, "IsPrimaryExpr() was true. We should recognize this lex."); 572Debug.Assert(this.scanner.CanBeFunction); 762Debug.Assert(scaner.Kind == XPathScanner.LexKind.Axe);
System\Xml\XPath\Internal\XPathScanner.cs (15)
43Debug.Assert(0 <= xpathExprIndex && xpathExprIndex <= xpathExpr.Length); 71Debug.Assert(this.kind == LexKind.Name || this.kind == LexKind.Axe); 72Debug.Assert(this.name != null); 79Debug.Assert(this.kind == LexKind.Name); 80Debug.Assert(this.prefix != null); 87Debug.Assert(this.kind == LexKind.String); 88Debug.Assert(this.stringValue != null); 95Debug.Assert(this.kind == LexKind.Number); 96Debug.Assert(this.numberValue != double.NaN); 105Debug.Assert(this.kind == LexKind.Name); 243Debug.Assert(this.CurerntChar == '.' || XmlCharType.IsDigit(this.CurerntChar)); 259Debug.Assert(XmlCharType.IsDigit(this.CurerntChar)); 261Debug.Assert(0 <= start && this.xpathExpr[start] == '.'); 280Debug.Assert(this.CurerntChar == endChar); 286Debug.Assert(xmlCharType.IsStartNCNameSingleChar(this.CurerntChar)
System\Xml\XPath\Internal\XPathSingletonIterator.cs (1)
20Debug.Assert(nav != null);
System\Xml\XPath\XPathDocument.cs (5)
169Debug.Assert((object) this.nameTable.Get(string.Empty) == (object) string.Empty, "NameTable must contain atomized string.Empty"); 195Debug.Assert(reader.LocalName == "xmlns"); 199Debug.Assert(reader.Prefix == "xmlns"); 357Debug.Assert(pageElem[idxElem].NodeType == XPathNodeType.Element && pageNmsp[idxNmsp].NodeType == XPathNodeType.Namespace); 370Debug.Assert(pageElem[idxElem].NodeType == XPathNodeType.Element);
System\Xml\XPath\XPathNavigator.cs (8)
857Debug.Assert( CompareSiblings(n1.Clone(), n2.Clone()) != CompareSiblings(n2.Clone(), n1.Clone()), "IsSamePosition() on custom navigator returns incosistent results" ); 917Debug.Assert( schemaType != null || this.NodeType == XPathNodeType.Root, "schemaType != null || this.NodeType == XPathNodeType.Root" ); 941Debug.Assert( schemas != null, "schemas != null" ); 962Debug.Assert( args != null ); 1805Debug.Assert(reader.LocalName == "xmlns"); 1809Debug.Assert(reader.Prefix == "xmlns"); 1861Debug.Assert(reader.LocalName == "xmlns"); 1865Debug.Assert(reader.Prefix == "xmlns");
System\Xml\XPath\XPathNavigatorReader.cs (4)
448Debug.Assert( value == null ); 554Debug.Assert( XPathNodeType.Namespace == this.nav.NodeType ); 573Debug.Fail( "Couldn't find Namespace Node! Should not happen!" ); 887Debug.Assert( this.nav.NodeType == XPathNodeType.Element, this.nav.NodeType.ToString() + " == XPathNodeType.Element" );
System\Xml\Xslt\XslCompiledTransform.cs (1)
521Debug.Assert(qil != null, "You must compile to Qil first");
System\Xml\Xslt\XslTransform.cs (4)
258Debug.Assert(stylesheet != null); 264Debug.Assert(compiler.CompiledStylesheet != null); 265Debug.Assert(compiler.QueryStore != null); 266Debug.Assert(compiler.QueryStore != null);
System.Xml.Linq (13)
System\Xml\Linq\XLinq.cs (13)
416Debug.Assert(index >= 0 && index <= localName.Length, "Caller should have checked that index was in bounds"); 417Debug.Assert(count >= 0 && index + count <= localName.Length, "Caller should have checked that count was in bounds"); 433Debug.Assert(index >= 0 && index <= namespaceName.Length, "Caller should have checked that index was in bounds"); 434Debug.Assert(count >= 0 && index + count <= namespaceName.Length, "Caller should have checked that count was in bounds"); 469Debug.Assert(n != null, "Null name should never exist here"); 653Debug.Assert((capacity & (capacity - 1)) == 0, "capacity must be a power of 2"); 654Debug.Assert(extractKey != null, "extractKey may not be null"); 700Debug.Assert(entryIdx == EndOfList, "Resize() should only be called by one thread"); 726Debug.Assert((object)entries[entryIdx].Value == (object)newValue); 730Debug.Assert(entryIdx == FullList, "Linked list should have been closed when it was counted"); 896Debug.Assert(key != null, "key should have been checked previously for null"); 3137Debug.Assert(e != null, "EndElement recieved but the current container is not an element."); 9184Debug.Assert(omitDuplicateNamespaces, "This method should only be caled if we're omitting duplicate namespace attribute." +
UIAutomationClient (37)
MS\Internal\Automation\Accessible.cs (1)
31Debug.Assert(acc != null, "null IAccessible");
MS\Internal\Automation\CacheHelper.cs (4)
83Debug.Assert(response.RequestedData == null, "both RequestedData and TreeStructure should be null or non-null"); 113Debug.Assert(false, "Internal error: got malformed tree description string (extra chars at end)"); 119Debug.Assert(false, "Internal error: mismatch between count of property buckets and nodes claiming them"); 239Debug.Assert(false, "Internal error: Got malformed tree description string, missing closing paren");
MS\Internal\Automation\ClientEventManager.cs (1)
478Debug.Assert(false, "GetNewRootTracker internal error: Unexpected Tracker value!");
MS\Internal\Automation\FocusTracker.cs (1)
91Debug.Assert(acc != null, "HandleFocusChange got hwnd and null IAccessible");
MS\Internal\Automation\HwndProxyElementProvider.cs (5)
56Debug.Assert( hwnd != NativeMethods.HWND.NULL ); 392Debug.Assert(false,"unexpected switch() case:"); 1442Debug.Assert(false, "too many children or inf loop?"); 1888Debug.Assert(false, "too many children or inf loop?"); 2130Debug.Assert(provider is IRawElementProviderFragment, "Expecting a fragment provider");
MS\Internal\Automation\MenuTracker.cs (1)
85Debug.Assert(handlers.Length <= 1, "handlers.Length");
MS\Internal\Automation\Misc.cs (1)
168Debug.Assert(false, "missing client-side pattern wrapper");
MS\Internal\Automation\ProxyManager.cs (1)
698Debug.Assert(false, "unexpected switch() case:");
MS\Internal\Automation\QueueProcessor.cs (3)
91Debug.Assert(!_quitting, "Can't add items to queue when quitting"); 101Debug.Assert(!_quitting, "Can't add items to queue when quitting"); 156Debug.Assert(_quitting, "MsgWaitForMultipleObjects failed while WaitForWork");
MS\Internal\Automation\Schema.cs (3)
74Debug.Assert( false, "GetPropertyInfo failed " + id ); 86Debug.Assert(false, "GetDefaultValue was passed an unknown property"); 122Debug.Assert( false, "GetAttributeInfo failed " + id );
MS\Internal\Automation\UiaCoreAPI.cs (6)
254Debug.Assert(false, "unsupported property should not have made it this far"); 465Debug.Assert(offsets == null && treeStructures == null, "if nothin found, all out params shoud be null"); 469Debug.Assert(offsets.Length == treeStructures.Length); 669Debug.Assert(false, "Got unknown eventId from core: " + args._eventId); 687Debug.Assert(false, "Got unknown propertyId from core: " + pcargs._propertyId); 715Debug.Assert(false, "Unknown event type from core:" + args._type);
MS\Internal\Automation\WindowHideOrCloseTracker.cs (1)
98Debug.Assert(handlers.Length <= 1, "handlers.Length");
MS\Internal\Automation\WindowShowOrOpenTracker.cs (1)
97Debug.Assert(handlers.Length <= 1, "handlers.Length");
MS\Internal\Automation\WinEventWrap.cs (1)
45Debug.Assert(eventIds != null && eventIds.Length > 0, "eventIds is invalid");
System\Windows\Automation\AutomationElement.cs (1)
816Debug.Assert(responses.Length == 1);
System\Windows\Automation\BasePattern.cs (1)
37Debug.Assert(el != null);
System\Windows\Automation\CacheRequest.cs (1)
559Debug.Assert( _request != null );
System\Windows\Automation\Text\TextRange.cs (2)
72Debug.Assert(!hTextRange.IsInvalid); 73Debug.Assert(pattern != null);
System\Windows\Automation\TextPattern.cs (2)
44Debug.Assert(el != null); 45Debug.Assert(!hPattern.IsInvalid);
UIAutomationClientsideProviders (113)
MS\Internal\AutomationProxies\Accessible.cs (14)
158Debug.Assert(acc != null, "null IAccessible"); 331Debug.Assert(parent != null); 342Debug.Assert(false); 358Debug.Assert(parent != null); 369Debug.Assert(false); 715Debug.Assert( false, "Need to handle Accessible.accFocus case!" ); 761Debug.Assert(_idChild == NativeMethods.CHILD_SELF); 822Debug.Assert(false); 968System.Diagnostics.Debug.Assert(false, "Call to AccessibleChildren() returned E_INVALIDARG."); 1034Debug.Assert(_accessibleChildrenIndex < 0); 1226Debug.WriteLine(string.Format(CultureInfo.CurrentCulture, "Unexpected exception thrown for AccessibleChildren: {0}", e)); 1234Debug.WriteLine(string.Format(CultureInfo.CurrentCulture, "Unexpected hresult from AccessibleChildren: {0} count is {1} and actualCount is {2}", hr, count, actualCount)); 1438Debug.Assert(false, string.Format(CultureInfo.CurrentCulture, "MsaaNativeProvider: IAccessible threw a COMException: {0}", e.Message)); 1460Debug.Assert(false, string.Format(CultureInfo.CurrentCulture, "Unexpected IAccessible exception: {0}", e));
MS\Internal\AutomationProxies\CommonGetThemePartSize.cs (1)
96System.Diagnostics.Debug.Assert (false, "Unsupport Type");
MS\Internal\AutomationProxies\CommonXSendMessage.cs (1)
103System.Diagnostics.Debug.Assert(remoteTextArea.ToInt32() == remoteTextArea.ToInt64());
MS\Internal\AutomationProxies\EventManager.cs (1)
133System.Diagnostics.Debug.WriteLine(string.Format(CultureInfo.CurrentCulture, "Unexpected idProp {0} for idOject 0x{1:x8} on element {2} for event {3}", idProp, idObject, el, eventId));
MS\Internal\AutomationProxies\Misc.cs (2)
2004Debug.Assert(System.Environment.OSVersion.Version.Major < 6); 2075Debug.Assert(System.Environment.OSVersion.Version.Major >= 6);
MS\Internal\AutomationProxies\MSAAEventDispatcher.cs (4)
134Debug.Assert(refcount >= 0); 161Debug.WriteLine(string.Format(CultureInfo.CurrentCulture, "ERROR: AdviseEventRemoved called for {0} and event/property {1} without matching AdviseEventAdded.", hwnd, key), "NativeMsaaProxy"); 167Debug.WriteLine(string.Format(CultureInfo.CurrentCulture, "ERROR: AdviseEventRemoved called for {0} without matching AdviseEventAdded.", hwnd), "NativeMsaaProxy"); 371Debug.Assert(eventId == NativeMethods.EVENT_OBJECT_REORDER);
MS\Internal\AutomationProxies\MSAANativeProvider.cs (6)
65Debug.Assert(acc != null, "acc"); 66Debug.Assert(hwnd != IntPtr.Zero); 238Debug.Assert(_hwnd == UnsafeNativeMethods.WindowFromPhysicalPoint((int)x, (int)y)); 354Debug.Assert(false); 1057Debug.Assert(!IsRoot); 1110Debug.Assert(_hwnd != IntPtr.Zero);
MS\Internal\AutomationProxies\NonClientArea.cs (1)
116System.Diagnostics.Debug.Assert(idChild == 0, string.Format(CultureInfo.CurrentCulture, "Invalid Child Id, idChild == {2}\n\rClassName: \"{0}\"\n\rhwnd = 0x{1:x8}", Misc.ProxyGetClassName(hwnd), hwnd.ToInt32(), idChild));
MS\Internal\AutomationProxies\ProxyFragment.cs (3)
132System.Diagnostics.Debug.Assert(this is ProxyHwnd, "Invalid method called ElementProviderFromPoint"); 219System.Diagnostics.Debug.Assert(fragment != null, "DrillDownFragment: starting point is null"); 224System.Diagnostics.Debug.Assert(fromPoint != null, @"DrillDownFragment: calling ElementProviderFromPoint on Fragment should not return null");
MS\Internal\AutomationProxies\ProxySimple.cs (2)
262System.Diagnostics.Debug.Assert(_sAutomationId != null, "_sAutomationId is null!"); 461System.Diagnostics.Debug.Assert(_parent != null, "Navigate: Leaf element does not have parent");
MS\Internal\AutomationProxies\QueueProcessor.cs (1)
135Debug.Assert(false, "MsgWaitForMultipleObjects failed while WaitForWork");
MS\Internal\AutomationProxies\WindowsButton.cs (1)
107System.Diagnostics.Debug.Assert (idChild == 0, "Invalid Child Id, idChild != 0");
MS\Internal\AutomationProxies\WindowsComboBox.cs (1)
82System.Diagnostics.Debug.Assert (idChild == 0, "Invalid Child Id, idChild != 0");
MS\Internal\AutomationProxies\WindowsContainer.cs (1)
74System.Diagnostics.Debug.Assert(idChild == 0, "Invalid Child Id, idChild != 0");
MS\Internal\AutomationProxies\WindowsEditBox.cs (18)
98System.Diagnostics.Debug.Assert (idChild == 0, "Invalid Child Id, idChild != 0"); 502Debug.Assert(point.x >= 0 && point.x < 65536, "WindowsEditBox.CharFromPos() x coordinate out of range."); 503Debug.Assert(point.y >= 0 && point.y < 65536, "WindowsEditBox.CharFromPos() y coordinate out of range."); 580Debug.Assert(!IsMultiline); 587Debug.Assert(IsMultiline); 617Debug.Assert(hfont != IntPtr.Zero, "WindowsEditBox.GetLogfont got null HFONT"); 622Debug.Assert(false, "WindowsEditBox.GetObject unexpected return value"); 743Debug.Assert(index >= 0, "WindowsEditBox.LineFromChar negative index."); 744Debug.Assert(index <= GetTextLength(), "WindowsEditBox.LineFromChar index out of range."); 803Debug.Assert(index >= 0, "WindowsEditBox.PosFromChar negative index."); 804Debug.Assert(index < GetTextLength(), "WindowsEditBox.PosFromChar index out of range."); 807Debug.Assert(result!=-1, "WindowsEditBox.PosFromChar index out of bounds."); 862Debug.Assert(start >= 0, "WindowsEditBox.SetSel negative start."); 863Debug.Assert(start <= GetTextLength(), "WindowsEditBox.SetSel start out of range."); 864Debug.Assert(end >= 0, "WindowsEditBox.SetSel negative end."); 865Debug.Assert(end <= GetTextLength(), "WindowsEditBox.SetSel end out of range."); 1025Debug.Assert(floor >= 0); 1036Debug.Assert(i >= floor);
MS\Internal\AutomationProxies\WindowsEditBoxRange.cs (1)
53Debug.Assert(provider != null);
MS\Internal\AutomationProxies\WindowsFormsLinkLabel.cs (1)
61System.Diagnostics.Debug.Assert (idChild == 0, "Invalid Child Id, idChild != 0");
MS\Internal\AutomationProxies\WindowsIPAddress.cs (2)
67System.Diagnostics.Debug.Assert (idChild == 0, "Invalid Child Id, idChild != 0"); 119System.Diagnostics.Debug.Assert (index != -1, "GetOverrideProviderForHwnd: cannot find child hwnd index");
MS\Internal\AutomationProxies\WindowsListBox.cs (3)
616System.Diagnostics.Debug.Assert (IsMultipleSelection (), "Calling ClearAll on single-selected listbox"); 932System.Diagnostics.Debug.Assert (_parent is WindowsListBox, "Invalid Parent for a Listbox Item"); 1200System.Diagnostics.Debug.Assert (_listBox.IsMultipleSelection (), "Calling UnSelect on single-selected listbox");
MS\Internal\AutomationProxies\WindowsListView.cs (1)
1973System.Diagnostics.Debug.Assert(el is ListViewItemCheckbox);
MS\Internal\AutomationProxies\WindowsListViewGroup.cs (2)
561System.Diagnostics.Debug.Assert (!WindowsListView.IsDetailMode (hwnd), "GetColumnCountExternal: called when lv is in Detail mode"); 811System.Diagnostics.Debug.Assert (false, "GetCountOfItemsInDimension: failed to get item rect");
MS\Internal\AutomationProxies\WindowsListViewGroupHelper.cs (3)
423System.Diagnostics.Debug.Assert(false, "Cannot add item to the needed group"); 448System.Diagnostics.Debug.Assert(false, "Cannot add item to the needed group"); 814System.Diagnostics.Debug.Assert(min <= _items.Length, "EnsureCapacity: min is > _items.Length");
MS\Internal\AutomationProxies\WindowsListViewItem.cs (2)
511System.Diagnostics.Debug.Assert (parent != null, "Hit null while looking for the SelectionContainer"); 739System.Diagnostics.Debug.Assert (WindowsListView.IsGroupViewEnabled (hwnd), "GetGroupID: called when lv does not have groups");
MS\Internal\AutomationProxies\WindowsListViewItemStartMenu.cs (2)
59System.Diagnostics.Debug.Assert(false, "The listview item on the Start Menu has an unexpected IAccessible role!"); 99System.Diagnostics.Debug.Assert(AccessibleObject != null, "Failed to get a valid IAccessible!");
MS\Internal\AutomationProxies\WindowsMenu.cs (3)
132System.Diagnostics.Debug.Assert(idObject == NativeMethods.OBJID_MENU || idObject == NativeMethods.OBJID_SYSMENU, "Unexpected idObject"); 1371System.Diagnostics.Debug.Assert(false, "Cannot find back the accelerator in the menu!"); 2716System.Diagnostics.Debug.Assert (name.Length > hotKeyStart + 1, "Unexpected end of string");
MS\Internal\AutomationProxies\WindowsNonControl.cs (1)
57System.Diagnostics.Debug.Assert(idChild == 0, "Invalid Child Id, idChild != 0");
MS\Internal\AutomationProxies\WindowsProgressbar.cs (1)
61System.Diagnostics.Debug.Assert (idChild == 0, "Invalid Child Id, idChild != 0");
MS\Internal\AutomationProxies\WindowsRebar.cs (1)
66System.Diagnostics.Debug.Assert (idChild == 0, "Invalid Child Id, idChild != 0");
MS\Internal\AutomationProxies\WindowsRichEdit.cs (5)
76Debug.Assert (idChild == 0, "Invalid Child Id, idChild != 0"); 243Debug.Assert(_document != null); 283Debug.Assert(_document != null); 290Debug.Assert(range.Start == range.End); 326Debug.Assert(_document != null);
MS\Internal\AutomationProxies\WindowsRichEditRange.cs (11)
35Debug.Assert(range != null); 36Debug.Assert(pattern != null); 267Debug.Assert(text == null || text.Length == maxLength); 1143Debug.Assert(charMoved == 0 || charMoved == 1); 1146Debug.Assert(paraMoved == 0 || paraMoved == 1); 1172Debug.Assert(charMoved == 0 || charMoved == -1); 1175Debug.Assert(paraMoved == 0 || paraMoved == -1); 1201Debug.Assert(charMoved == 0 || charMoved == 1); 1204Debug.Assert(paraMoved == 0 || paraMoved == 1); 1230Debug.Assert(charMoved == 0 || charMoved == -1); 1233Debug.Assert(paraMoved == 0 || paraMoved == -1);
MS\Internal\AutomationProxies\WindowsScrollBar.cs (1)
80System.Diagnostics.Debug.Assert (idChild == 0, "Invalid Child Id, idChild != 0");
MS\Internal\AutomationProxies\WindowsSlider.cs (1)
68System.Diagnostics.Debug.Assert (idChild == 0, "Invalid Child Id, idChild != 0");
MS\Internal\AutomationProxies\WindowsSpinner.cs (1)
69System.Diagnostics.Debug.Assert (idChild == 0, "Invalid Child Id, idChild != 0");
MS\Internal\AutomationProxies\WindowsStartMenu.cs (1)
54System.Diagnostics.Debug.Assert(idChild == 0, "Invalid Child Id, idChild != 0");
MS\Internal\AutomationProxies\WindowsStatic.cs (1)
71System.Diagnostics.Debug.Assert(idChild == 0, "Invalid Child Id, idChild != 0");
MS\Internal\AutomationProxies\WindowsStatusBar.cs (1)
67System.Diagnostics.Debug.Assert (idChild == 0, "Invalid Child Id, idChild != 0");
MS\Internal\AutomationProxies\WindowsTab.cs (2)
1183System.Diagnostics.Debug.Assert(false, "XSendMessage.GetItem() failed!"); 1197System.Diagnostics.Debug.Assert(_parent is WindowsTab, "Invalid Parent for a Tab Item");
MS\Internal\AutomationProxies\WindowsToolbarAsMenu.cs (1)
55System.Diagnostics.Debug.Assert(false, "Unexpected role " + role);
MS\Internal\AutomationProxies\WindowsToolbarItemAsMenuItem.cs (1)
48System.Diagnostics.Debug.Assert(false, "Unexpected role " + role);
MS\Internal\AutomationProxies\WindowsTooltip.cs (1)
67System.Diagnostics.Debug.Assert (idChild == 0, "Invalid Child Id, idChild != 0");
MS\Internal\AutomationProxies\WindowsTreeView.cs (1)
1074System.Diagnostics.Debug.Assert (topLevelParent is WindowsTreeView, "Invalid Parent for a TreeView Item");
MS\Internal\AutomationProxies\WindowsUpDown.cs (1)
69System.Diagnostics.Debug.Assert (idChild == 0, "Invalid Child Id, idChild != 0");
MS\Internal\AutomationProxies\WinEventTracker.cs (3)
279Debug.Assert(false, "Exception raising event " + eventId + " for prop " + ecp._idProp + " on hwnd " + hwnd + "\n" + e.Message); 324Debug.Assert(false, "Exception raising event " + eventId + " for prop " + ecp._idProp + " on hwnd " + hwnd + "\n" + e.Message); 468Debug.Assert (hwnd == IntPtr.Zero, @"BuildEventsList: event is global but hwnd is not null");
MS\Win32\UnsafeNativeMethods.cs (1)
410Debug.WriteLine("GetWindowLong failed. Error = " + error);
WindowsBase (568)
Base\MS\Internal\ComponentModel\AttachInfo.cs (2)
144Debug.Assert(parameters != null && parameters.Length == 1, "GetAttachedPropertyMethod should return a method with one parameter."); 171Debug.Assert(instance != null, "Caller should validate non-null instance before calling CanAttach.");
Base\MS\Internal\ComponentModel\DependencyObjectPropertyDescriptor.cs (3)
45Debug.Assert(property != null && dp != null); 46Debug.Assert(!(property is DependencyObjectPropertyDescriptor), "Wrapping a DP in a DP"); 266Debug.Assert(attrs != null);
Base\MS\Internal\ComponentModel\DPCustomTypeDescriptor.cs (1)
171Debug.Assert((filter & _anySet) == filter, "There is a filtering case we did not account for");
Base\MS\Internal\ComponentModel\PropertyChangeTracker.cs (1)
21Debug.Assert(obj != null && property != null);
Base\MS\Internal\ContentType.cs (3)
282Debug.Assert(String.CompareOrdinal(_type, String.Empty) != 0 399Debug.Assert(!IsLinearWhiteSpaceChar(contentType[0]) && !IsLinearWhiteSpaceChar(contentType[contentType.Length - 1])); 494Debug.Assert(s != null);
Base\MS\Internal\FreezableDefaultValueFactory.cs (8)
39Debug.Assert(defaultValue != null, 41Debug.Assert(defaultValue.CanFreeze, 54Debug.Assert(_defaultValuePrototype.IsFrozen); 66Debug.Assert(owner != null && property != null, 104Debug.Assert(owner != null && property != null, 106Debug.Assert(!(owner is Freezable) || !((Freezable)owner).IsFrozen, 108Debug.Assert(property.GetMetadata(owner.DependencyObjectType).UsingDefaultValueFactory, 120Debug.Assert(_mutableDefaultValue != null,
Base\MS\Internal\InheritanceContextChangedEventManager.cs (1)
57Debug.Assert(listener is Expression);
Base\MS\Internal\Interop\ErrorCodes.cs (3)
428Debug.Assert(e != null); 433Debug.Assert(!(e is ArgumentNullException)); 468Debug.Assert(e != null);
Base\MS\Internal\IO\Packaging\CompoundFile\CompoundFileReference.cs (3)
85Debug.Assert(false, "subclasses must override this method"); 96Debug.Assert(false, "subclasses must override this method"); 104Debug.Assert(false, "subclasses must override this method");
Base\MS\Internal\IO\Packaging\CompoundFile\ContainerUtilities.cs (1)
111Debug.Assert(length >= 0, "The length cannot be negative. Caller must verify this");
Base\MS\Internal\IO\Packaging\CompoundFile\RightsManagementEncryptedStream.cs (25)
305Debug.Assert(baseStream != null); 306Debug.Assert(cryptoProvider != null); 325Debug.Assert(BitConverter.IsLittleEndian); 422Debug.Assert(writeCacheStartOftheNextBlock > start); 446Debug.Assert(readCacheStartOftheNextBlock > start); 460Debug.Assert(cacheReadResult > 0); 471Debug.Assert(cache != null); 472Debug.Assert(start >=0); 499Debug.Assert(overlapBlockOffset == start); 559Debug.Assert(start >= 0); 560Debug.Assert(cache != null); 565Debug.Assert(!match, "Must only be called when there is no match"); 593Debug.Assert(blockCount > 0, 605Debug.Assert( newPosition == _prefixLengthSize + firstBlockOffset, 634Debug.Assert(readCryptoBlockCount >=1); // we must have at least 1 692Debug.Assert(blockSize > 1, "GetBlockNo recieved blockSize parameter value <= 1"); 693Debug.Assert(index >= 0 , "GetBlockNo recieved index parameter value < 0"); 844Debug.Assert(streamPosition >= 0); 845Debug.Assert(buffer != null); 846Debug.Assert(count >= 0); 847Debug.Assert(checked(offset + count <= buffer.Length)); 874Debug.Assert(buffer != null); 875Debug.Assert(buffer.Length > 0); 876Debug.Assert(count >= 0); 877Debug.Assert(checked(offset + count <= buffer.Length));
Base\MS\Internal\IO\Packaging\CompoundFile\RightsManagementEncryptionTransform.cs (5)
80Debug.Assert(transformEnvironment != null); 84Debug.Assert(instanceDataStream != null, SR.Get(SRID.NoPublishLicenseStream)); 88Debug.Assert(_useLicenseStorage != null, SR.Get(SRID.NoUseLicenseStorage)); 614Debug.Assert(this.IsReady); 821Debug.Assert(userDesired != null);
Base\MS\Internal\IO\Packaging\CompoundFile\VersionedStreamOwner.cs (1)
388Debug.Assert(_dataOffset == 0);
Base\MS\Internal\IO\Packaging\CompressStream.cs (13)
116default: Debug.Assert(false, "Illegal state for CompressStream - logic error"); break; 182default: Debug.Assert(false, "Illegal state for CompressStream - logic error"); break; 302default: Debug.Assert(false, "Illegal state for CompressStream - logic error"); break; 400default: Debug.Assert(false, "Illegal state for CompressStream - logic error"); break; 482Debug.Assert(_baseStream.Position == 0, 608Debug.Assert(dataLength >= 0); 637Debug.Assert(bytesToSeek > 0, "Logic Error - bytesToSeek should be positive"); 707Debug.Assert(_baseStream.Position == 0); 731Debug.Assert(false, "Illegal state for CompressStream - logic error"); break; 753Debug.Assert(s.Position == 0); 775Debug.Assert(_mode != Mode.Emulation, "Logic error: CachedLength not maintained in Emulation mode - illegal Get"); 781Debug.Assert(_mode != Mode.Emulation, "Logic error: CachedLength not maintained in Emulation mode - illegal Set"); 782Debug.Assert(value >= 0, "Length cannot be negative - logic error?");
Base\MS\Internal\IO\Packaging\InterleavedZipPartStream.cs (1)
231Debug.Assert(newLength - _dir.GetStartOffset(lastPieceNumber) >= 0);
Base\MS\Internal\IO\Packaging\InternalRelationshipCollection.cs (7)
195Debug.Assert(_package.InStreamingCreation, "This method should only be called in streaming creation mode"); 238Debug.Assert(package != null, "package parameter passed should never be null"); 286Debug.Assert(_package.FileOpenAccess == FileAccess.Read || _package.FileOpenAccess == FileAccess.ReadWrite, 427Debug.Assert(!reader.IsEmptyElement, "This method should only be called it the Relationship Element is not empty"); 629Debug.Assert(!target.IsAbsoluteUri, "Uri should be relative at this stage"); 644Debug.Assert(false, "Uri should not be relative at this stage"); 726Debug.Assert(_package.InStreamingCreation, "This method should only be called in streaming creation mode");
Base\MS\Internal\IO\Packaging\PartBasedPackageProperties.cs (2)
450Debug.Assert(!initializing || reader != null); 866Debug.Assert(entry.Value != null || _package.InStreamingCreation);
Base\MS\Internal\IO\Packaging\PartManifestEntry.cs (1)
51Debug.Assert(_owningPartUri != null, "Logic error: OwningPart is null on a non-Relationship entry");
Base\MS\Internal\IO\Packaging\PieceNameHelper.cs (3)
50Debug.Assert(zipFileInfo != null); 51Debug.Assert(prefixName != null && prefixName != String.Empty); 52Debug.Assert(pieceNumber >= 0);
Base\MS\Internal\IO\Packaging\SparseMemoryStream.cs (15)
190Debug.Assert(_currentStreamPosition >= 0); 208Debug.Assert(bytesToRead > 0); 270Debug.Assert(_currentStreamPosition >= 0); 502Debug.Assert(gap >= 0); 560Debug.Assert(prevMemStreamBlock.Stream.Length > 0); 567Debug.Assert(prevMemStreamBlock.Stream.Length > 0); 631Debug.Assert(memStreamBlock.Stream.Length > 0); 644Debug.Assert(!_isolatedStorageMode); 659Debug.Assert(_memoryStreamList.Count ==0); // it must be empty in isolated storage mode 681Debug.Assert(newMemStreamBlock.Stream.Length > 0); 742Debug.Assert(!_isolatedStorageMode); 761Debug.Assert(trackingPosition == _currentStreamLength); 777Debug.Assert(toSkip >= 0); 859Debug.Assert(offset >=0); 881Debug.Assert(value >= 0);
Base\MS\Internal\IO\Packaging\TrackingMemoryStream.cs (2)
35Debug.Assert(memoryStreamFactory != null); 42Debug.Assert(memoryStreamFactory != null);
Base\MS\Internal\IO\Packaging\TrackingMemoryStreamFactory.cs (1)
41Debug.Assert(_bufferedMemoryConsumption >=0, "we end up having buffers of negative size");
Base\MS\Internal\IO\Packaging\XmlDigitalSignatureProcessor.cs (4)
175Debug.Assert(_manager.Package.PartExists(partEntry.Uri)); 784Debug.Assert(SignaturePart.GetStream().Length == 0, "Logic Error: Can't sign when signature already exists"); 947Debug.Assert(partEntry.IsRelationshipEntry); 1244Debug.Assert(references != null);
Base\MS\Internal\IO\Packaging\XmlSignatureManifest.cs (5)
193Debug.Assert(reader != null); 245Debug.Assert(reader != null); 489Debug.Assert(manager != null); 490Debug.Assert(xDoc != null); 491Debug.Assert(hashAlgorithm != null);
Base\MS\Internal\IO\Packaging\XmlSignatureProperties.cs (2)
285Debug.Assert(reader.NodeType == XmlNodeType.EndElement); 306Debug.Assert(reader.NodeType == XmlNodeType.EndElement);
Base\MS\Internal\IO\Packaging\XmlStringTable.cs (3)
36Debug.Assert((int)ID._IllegalValue == _table.Length - 1, "ID enumeration should match TableEntry array - verify edits are matching"); 37Debug.Assert(i >= ID.OpcSignatureNamespace && i < ID._IllegalValue, "string index out of bounds"); 38Debug.Assert(i == _table[(int)i].id, "table enum out of order - verify order");
Base\MS\Internal\IO\Zip\Crc32.cs (4)
55Debug.Assert(stream != null); 75Debug.Assert((offset >=0) && (count >=0) && (offset+count <= buffer.Length)); 120Debug.Assert(bitOrdinal < 32); 128Debug.Assert(bitOrdinal < 32);
Base\MS\Internal\IO\Zip\ProgressiveCrcCalculatingStream.cs (2)
240Debug.Assert(underlyingStream != null); 241Debug.Assert(blockManager != null);
Base\MS\Internal\IO\Zip\ZipFileInfo.cs (1)
162Debug.Assert((fileBlock != null) && (zipArchive != null));
Base\MS\Internal\IO\Zip\ZipIOBlockManager.cs (43)
197Debug.Assert(!_openStreaming, "Not legal in Streaming mode"); 263Debug.Assert(_openStreaming || _archiveStream.Length == 0); 266Debug.Assert(_endOfCentralDirectoryBlock == null); 279Debug.Assert(_endOfCentralDirectoryBlock == null); 280Debug.Assert(!_openStreaming, "Not legal in Streaming mode"); 319Debug.Assert(!_openStreaming, "Not legal in Streaming mode"); 320Debug.Assert(CentralDirectoryBlock.FileExists(zipFileName)); // it must be in the central directory 333Debug.Assert(!_openStreaming, "Not legal in Streaming mode"); 335Debug.Assert(localFileBlock != null, " At this point local File block must be preloaded"); 336Debug.Assert(CentralDirectoryBlock.FileExists(localFileBlock.FileName), 354Debug.Assert(moveBlockSize >=0); 355Debug.Assert(!_openStreaming, "Not legal in Streaming mode"); 471Debug.Assert(archiveStream != null); 565Debug.Assert(checked(buffer.Length-offset) >= sizeof(Int16)); 575Debug.Assert(checked(buffer.Length-offset) >= sizeof(Int32)); 585Debug.Assert(checked(buffer.Length-offset) >= sizeof(Int64)); 595Debug.Assert(checked(buffer.Length-offset) >= sizeof(UInt16)); 605Debug.Assert(checked(buffer.Length-offset) >= sizeof(UInt32)); 615Debug.Assert(checked(buffer.Length-offset) >= sizeof(UInt64)); 664Debug.Assert(size >=0); 665Debug.Assert(offset >=0); 666Debug.Assert(onDiskSize >=0); 667Debug.Assert(onDiskOffset >=0); 681Debug.Assert(onDiskSize >=0); 719Debug.Assert(blockSizeToCache >0); // there must be a non empty block at this point that needs to be cached 836Debug.Assert(_centralDirectoryBlock != null 873Debug.Assert(!_openStreaming, "Not legal in Streaming mode"); 1057Debug.Assert(_zip64EndOfCentralDirectoryBlock != null); 1060Debug.Assert(!IsCentralDirectoryBlockLoaded); 1065Debug.Assert(blockPosition >= 0); 1076Debug.Assert(_centralDirectoryBlock == null); 1077Debug.Assert(!_openStreaming, "Not legal in Streaming mode"); 1090Debug.Assert ((_zip64EndOfCentralDirectoryBlock == null) && 1116Debug.Assert(_zip64EndOfCentralDirectoryBlock == null); 1131Debug.Assert(_zip64EndOfCentralDirectoryBlock == null); 1132Debug.Assert(!_openStreaming, "Not legal in Streaming mode"); 1143Debug.Assert(_zip64EndOfCentralDirectoryLocatorBlock == null); 1157Debug.Assert(_zip64EndOfCentralDirectoryLocatorBlock == null); 1158Debug.Assert(!_openStreaming, "Not legal in Streaming mode"); 1170Debug.Assert(!block.GetDirtyFlag(true)); // closingFlag==true used as a more conservative option 1171Debug.Assert(!_openStreaming, "Not legal in Streaming mode"); 1214Debug.Assert(block.GetDirtyFlag(true) || // closingFlag==true used as a more conservative option 1223Debug.Assert(block.GetDirtyFlag(true) || // closingFlag==true used as a more conservative option
Base\MS\Internal\IO\Zip\ZipIOCentralDirectoryBlock.cs (4)
94Debug.Assert(_offset >=0); 195Debug.Assert(CentralDirectoryDictionary.Contains(localFileBlock.FileName)); 379Debug.Assert(h1 != null && h2 != null, "HeaderFileOffsetComparer: Comparing the wrong data types"); 487Debug.Assert(! (_blockManager.Zip64EndOfCentralDirectoryBlock.Size==0)
Base\MS\Internal\IO\Zip\ZipIOCentralDirectoryFileHeader.cs (5)
137Debug.Assert(_fileNameLength > 0); // we validate this for both parsing and API entry points 345Debug.Assert((compressedSize >= 0) && (uncompressedSize>=0) && (offset >=0)); 386Debug.Assert(DiskNumberStart == 0); 406Debug.Assert(_versionNeededToExtract <= fileBlock.VersionNeededToExtract, "Should never be making this smaller"); 439Debug.Assert(String.CompareOrdinal(_stringFileName, fileBlock.FileName) == 0);
Base\MS\Internal\IO\Zip\ZipIOEndOfCentralDirectoryBlock.cs (7)
75Debug.Assert(_offset >=0); 300Debug.Assert(blockManager != null); 306Debug.Assert(archiveStream.CanSeek); 346Debug.Assert(buffer != null); 348Debug.Assert(buffer.Length >= _fixedMinimalRecordSize); // the end of central directory record must fit in there 350Debug.Assert(pos <= buffer.Length - _fixedMinimalRecordSize); // enough space to fit the record after pos 352Debug.Assert(bufferOffsetFromEndOfStream >= _fixedMinimalRecordSize); // there is no reason to start searching for the record
Base\MS\Internal\IO\Zip\ZipIOExtraField.cs (1)
173Debug.Assert(Math.Abs(size) <= 100);
Base\MS\Internal\IO\Zip\ZipIOExtraFieldElement.cs (3)
121Debug.Assert(size >= _size); 132Debug.Assert(_size == _data.Length); 192Debug.Assert(data != null);
Base\MS\Internal\IO\Zip\ZipIOExtraFieldPaddingElement.cs (2)
58Debug.Assert(size >= MinimumSize); 85Debug.Assert(sniffiedBytes.Length == _signatureSize);
Base\MS\Internal\IO\Zip\ZipIOExtraFieldZip64Element.cs (9)
61Debug.Assert(reader != null); 131Debug.Assert(SizeField > 0); 225Debug.Assert((_zip64ExtraFieldUsage & ZipIOZip64ExtraFieldUsage.UncompressedSize) != 0); 230Debug.Assert(value >= 0); 242Debug.Assert((_zip64ExtraFieldUsage & ZipIOZip64ExtraFieldUsage.CompressedSize) != 0); 247Debug.Assert(value >= 0); 259Debug.Assert((_zip64ExtraFieldUsage & ZipIOZip64ExtraFieldUsage.OffsetOfLocalHeader) != 0); 264Debug.Assert(value >= 0); 276Debug.Assert((_zip64ExtraFieldUsage & ZipIOZip64ExtraFieldUsage.DiskNumber) != 0);
Base\MS\Internal\IO\Zip\ZipIOFileItemStream.cs (21)
94Debug.Assert(_cachePrefixStream == null); // we only expect this thing to be not null during Archive Save execution 142Debug.Assert(_cachePrefixStream == null); // we only expect this thing to be not null during Archive Save execution 179Debug.Assert(_cachePrefixStream == null); // we only expect this thing to be not null during Archive Save execution 182Debug.Assert(_currentStreamPosition >= 0); 214Debug.Assert(persistedTailSize > 0); 218Debug.Assert(diskBytesToRead > 0); 271Debug.Assert(_cachePrefixStream == null); // we only expect this thing to be not null during Archive Save execution 274Debug.Assert(_currentStreamPosition >= 0); 291Debug.Assert(!_blockManager.Streaming); 344Debug.Assert(blockManager != null); 345Debug.Assert(persistedOffset >=0); 346Debug.Assert(persistedSize >= 0); 347Debug.Assert(block != null); 405Debug.Assert(_offset >=0); 418Debug.Assert(_cachePrefixStream == null); // _cachePrefixStream must not be used in streaming cases at all 420Debug.Assert(_blockManager.Streaming); 447Debug.Assert(!_blockManager.Streaming); 468Debug.Assert(moveBlockSize >=0); 480Debug.Assert(_cachePrefixStream.Length > 0); // should be taken care of by the constructor 513Debug.Assert(newPersistedSize == _currentStreamLength); 515Debug.Assert(_cachePrefixStream == null); // we only expect this thing to be not null during Archive Save execution
Base\MS\Internal\IO\Zip\ZipIOLocalFileBlock.cs (14)
106Debug.Assert(!_blockManager.Streaming, "Not legal in Streaming mode"); 113Debug.Assert(_offset >=0); 125Debug.Assert(_blockManager.Streaming, "Only legal in Streaming mode"); 184Debug.Assert(!_blockManager.Streaming, "Not legal in Streaming mode"); 362Debug.Assert(!blockManager.Streaming); 363Debug.Assert(blockManager.CentralDirectoryBlock.FileExists(fileName)); 393Debug.Assert(Enum.IsDefined(typeof(CompressionMethodEnum), compressionMethod)); 394Debug.Assert(Enum.IsDefined(typeof(DeflateOptionEnum), deflateOption)); 421Debug.Assert(block._fileItemStream.Position == 0, "CompressStream assumes base stream is at position zero"); 478Debug.Assert(_exposedPublicStreams.Count == 1, "Should only be one stream returned in streaming mode"); 483Debug.Assert((!_blockManager.Streaming) || (_exposedPublicStreams == null), 500Debug.Assert(_exposedPublicStreams != null); 730Debug.Assert(!_blockManager.Streaming, "Not legal in Streaming mode"); 764Debug.Assert(_fileItemStream.Position == 0, "CompressStream assumes base stream is at position zero");
Base\MS\Internal\IO\Zip\ZipIOLocalFileHeader.cs (5)
51Debug.Assert(Enum.IsDefined(typeof(CompressionMethodEnum), compressionMethod)); 52Debug.Assert(Enum.IsDefined(typeof(DeflateOptionEnum), deflateOption)); 74Debug.Assert(deflateOption != DeflateOptionEnum.None); //this should be ensured by the higher levels 303Debug.Assert(Enum.IsDefined(typeof(DeflateOptionEnum), value)); 304Debug.Assert(value != DeflateOptionEnum.None);
Base\MS\Internal\IO\Zip\ZipIOModeEnforcingStream.cs (1)
300Debug.Assert(baseStream != null);
Base\MS\Internal\IO\Zip\ZipIORawDataFileBlock.cs (9)
75Debug.Assert(_offset >=0); 94Debug.Assert(moveBlockSize >=0); 108Debug.Assert(_cachePrefixStream.Length > 0); // should be taken care of by the constructor 183Debug.Assert(block != null); 184Debug.Assert(block.Offset >=0); 185Debug.Assert(block.Size > 0); 196Debug.Assert(offset >=0); 211Debug.Assert(_cachePrefixStream == null); 214Debug.Assert(DiskImageContains(block));
Base\MS\Internal\IO\Zip\ZipIOZip64EndOfCentralDirectoryBlock.cs (5)
70Debug.Assert(_offset >=0); 99Debug.Assert(_zip64ExtensibleDataSector != null); 100Debug.Assert(_zip64ExtensibleDataSector.Length == 261Debug.Assert(blockManager != null); 302Debug.Assert(_size >= _fixedMinimalRecordSize);
Base\MS\Internal\IO\Zip\ZipIOZip64EndOfCentralDirectoryLocatorBlock.cs (4)
70Debug.Assert(_offset >=0); 161Debug.Assert(SniffTheBlockSignature(blockManager)); 177Debug.Assert(!SniffTheBlockSignature(blockManager)); 220Debug.Assert(blockManager != null);
Base\MS\Internal\ObservableCollectionDefaultValueFactory.cs (3)
52Debug.Assert(owner != null && property != null, 77Debug.Assert(owner != null && property != null, 79Debug.Assert(property.GetMetadata(owner.DependencyObjectType).UsingDefaultValueFactory,
Base\MS\Internal\PriorityQueue.cs (28)
65Debug.Assert(chain != null, "PriorityQueue.Dequeue: a chain should exist."); 68Debug.Assert(item != null, "PriorityQueue.Dequeue: a priority item should exist."); 90Debug.Assert(chain != null, "PriorityQueue.Peek: a chain should exist."); 93Debug.Assert(item != null, "PriorityQueue.Peek: a priority item should exist."); 103Debug.Assert(item != null, "PriorityQueue.RemoveItem: invalid item."); 104Debug.Assert(item.Chain != null, "PriorityQueue.RemoveItem: a chain should exist."); 181Debug.Assert(chain.Tail == null, "PriorityQueue.InsertItemInPriorityChain: both the head and the tail should be null."); 186Debug.Assert(chain.Tail != null, "PriorityQueue.InsertItemInPriorityChain: both the head and the tail should not be null."); 206Debug.Assert(chain != null, "PriorityQueue.InsertItemInPriorityChain: a chain must be provided."); 207Debug.Assert(item.Chain == null && item.PriorityPrev == null && item.PriorityNext == null, "PriorityQueue.InsertItemInPriorityChain: item must not already be in a priority chain."); 217Debug.Assert(chain.Tail != null, "PriorityQueue.InsertItemInPriorityChain: both the head and the tail should not be null."); 225Debug.Assert(chain.Tail == null, "PriorityQueue.InsertItemInPriorityChain: both the head and the tail should be null."); 242Debug.Assert(item.Chain.Tail == after, "PriorityQueue.InsertItemInPriorityChain: the chain's tail should be the item we are inserting after."); 253Debug.Assert(item != null, "PriorityQueue.RemoveItemFromPriorityChain: invalid item."); 254Debug.Assert(item.Chain != null, "PriorityQueue.RemoveItemFromPriorityChain: a chain should exist."); 259Debug.Assert(item.Chain.Head != item, "PriorityQueue.RemoveItemFromPriorityChain: the head should not point to this item."); 265Debug.Assert(item.Chain.Head == item, "PriorityQueue.RemoveItemFromPriorityChain: the head should point to this item."); 273Debug.Assert(item.Chain.Tail != item, "PriorityQueue.RemoveItemFromPriorityChain: the tail should not point to this item."); 279Debug.Assert(item.Chain.Tail == item, "PriorityQueue.RemoveItemFromPriorityChain: the tail should point to this item."); 310Debug.Assert(item.SequentialPrev == null && item.SequentialNext == null, "PriorityQueue.InsertItemInSequentialChain: item must not already be in the sequential chain."); 318Debug.Assert(_tail != null, "PriorityQueue.InsertItemInSequentialChain: both the head and the tail should not be null."); 326Debug.Assert(_tail == null, "PriorityQueue.InsertItemInSequentialChain: both the head and the tail should be null."); 343Debug.Assert(_tail == after, "PriorityQueue.InsertItemInSequentialChain: the tail should be the item we are inserting after."); 354Debug.Assert(item != null, "PriorityQueue.RemoveItemFromSequentialChain: invalid item."); 359Debug.Assert(_head != item, "PriorityQueue.RemoveItemFromSequentialChain: the head should not point to this item."); 365Debug.Assert(_head == item, "PriorityQueue.RemoveItemFromSequentialChain: the head should point to this item."); 373Debug.Assert(_tail != item, "PriorityQueue.RemoveItemFromSequentialChain: the tail should not point to this item."); 379Debug.Assert(_tail == item, "PriorityQueue.RemoveItemFromSequentialChain: the tail should point to this item.");
Base\MS\Internal\Security\RightsManagement\ClientSession.cs (25)
320Debug.Assert((_envHandle != null) && (!_envHandle.IsInvalid)); 615Debug.Assert((licenseStorageSessionHandle != null) && (!licenseStorageSessionHandle.IsInvalid)); 702Debug.Assert(serializedUseLicense != null); 703Debug.Assert(unboundRightsList != null); 704Debug.Assert(boundLicenseParams != null); 906Debug.Assert((authentication == AuthenticationType.Windows) || 980Debug.Assert((authentication == AuthenticationType.Windows) || 1237Debug.Assert(attributeSize == SystemTime.Size); // if isn't true it is an indication of a problem in the underlying libraries 1310Debug.Assert((queryRootHandle != null) && (!queryRootHandle.IsInvalid)); 1333Debug.Assert((queryRootHandle != null) && (!queryRootHandle.IsInvalid)); 1345Debug.Assert((querySubHandle != null) && (!querySubHandle.IsInvalid)); 1390Debug.Assert((queryRootHandle != null) && (!queryRootHandle.IsInvalid)); 1417Debug.Assert((queryRootHandle != null) && (!queryRootHandle.IsInvalid)); 1468Debug.Assert((queryRootHandle != null) && (!queryRootHandle.IsInvalid)); 1481Debug.Assert((workItemQueryHandle != null) && (!workItemQueryHandle.IsInvalid)); 1625Debug.Assert((queryRootHandle != null) && (!queryRootHandle.IsInvalid)); 1638Debug.Assert((workItemQueryHandle != null) && (!workItemQueryHandle.IsInvalid)); 1651Debug.Assert((rightGroupQueryHandle != null) && (!rightGroupQueryHandle.IsInvalid)); 1698Debug.Assert((rightQueryHandle != null) && (!rightQueryHandle.IsInvalid)); 1722Debug.Assert((conditionListHandle != null) && (!conditionListHandle.IsInvalid)); 1738Debug.Assert((rangeTimeQueryHandle != null) && (!rangeTimeQueryHandle.IsInvalid)); 1771Debug.Assert((queryRootHandle != null) && (!queryRootHandle.IsInvalid)); 1786Debug.Assert((workQueryHandle != null) && (!workQueryHandle.IsInvalid)); 1855Debug.Assert((queryRootHandle != null) && (!queryRootHandle.IsInvalid)); 1875Debug.Assert((distributionPointQueryHandle != null) && (!distributionPointQueryHandle.IsInvalid));
Base\MS\Internal\Security\RightsManagement\IssuanceLicense.cs (6)
106Debug.Assert(!boundLicenseHandle.IsClosed); // it must be either present or not 160Debug.Assert(rightValidityIntervalDays >= 0); // our internal code makes the guarantee that is is not negative 485Debug.Assert((rightHandle != null) && (!rightHandle.IsInvalid)); 518Debug.Assert((userHandle != null) && (!userHandle.IsInvalid)); 661Debug.Assert((userHandle != null) && (!userHandle.IsInvalid)); 814Debug.Assert((rightHandle != null) && (!rightHandle.IsInvalid));
Base\MS\Internal\Security\RightsManagement\RightNameExpirationInfoPair.cs (1)
33Debug.Assert(rightName != null);
Base\MS\Internal\Threading\ExceptionWrapper.cs (1)
54Debug.Assert(numArgs == 0 || // old API, no args
Base\MS\Internal\Utilities.cs (1)
77Debug.Assert(Marshal.IsComObject(t));
Base\MS\Internal\Verify.cs (1)
49Debug.Assert(!string.IsNullOrEmpty(name));
Base\MS\Internal\WeakEventTable.cs (1)
339Debug.Assert(_toRemove.Count == 0, "to-remove list should be empty");
Base\System\ComponentModel\DependencyPropertyDescriptor.cs (1)
41Debug.Assert(property != null || !isAttached, "Demand-load of property descriptor is only supported for direct properties");
Base\System\ComponentModel\PropertyChangedEventManager.cs (4)
190Debug.Assert(_toRemove.Count == 0, "to-remove list should be empty"); 369Debug.Assert(listener != null && source != null && propertyName != null, 378Debug.Assert(listener != null && source != null && propertyName != null, 565Debug.Assert((String)de.Key != AllListenersKey, "special key should not appear");
Base\System\IO\Packaging\CompoundFile\DataSpaceManager.cs (11)
341Debug.Assert(baseStream != null); 583Debug.Assert( null == _dataSpaceDefinitions, 585Debug.Assert( null == _transformDefinitions, 807Debug.Assert( TransformLabelIsDefined( transformLabel ), 1437Debug.Assert( transformInstance != null, "A transform instance should be available if its name is in the transformDefinitions hashtable"); 1468Debug.Assert(transformInstance.ExtraData.Length > 0); 1511Debug.Assert( DataSpaceIsDefined( label ), 1532Debug.Assert( null != dataSpaceLabel, 1537Debug.Assert( null != transformStack, 1545Debug.Assert( null != transformLayer, "Data space definition included an undefined transform" ); 1557Debug.Assert( null != transformLayer.transformReference,
Base\System\IO\Packaging\CompoundFile\StorageInfo.cs (8)
212Debug.Assert( null != childElement as StorageInfoCore, 260Debug.Assert( null != childElement as StreamInfoCore, 787Debug.Assert( null != deadElementWalking, 1118Debug.Assert( null != childCore, "Expected a child with valid core object in cache" ); 1333Debug.Assert(rootStorage != null, "Root storage cannot be null if StorageInfo and empty parentStorage"); 1348Debug.Assert( 1353Debug.Assert( InternalExists(), 1420Debug.Assert( null != core.validEnumerators[ desiredArrayType ],
Base\System\IO\Packaging\EncryptedPackage.cs (2)
899Debug.Assert( 1141Debug.Assert(!siPackage.InternalExists());
Base\System\IO\Packaging\Package.cs (2)
489Debug.Assert((parts != null), 1504Debug.Assert(access==FileAccess.Read || access == FileAccess.Write,
Base\System\IO\Packaging\PackageDigitalSignature.cs (2)
355Debug.Assert(processor.PackageSignature == null, "Logic Error: one processor per-signature"); 423Debug.Assert(certificatePart != null, "Logic Error: Not expecting setting certificate part to null on digital signature");
Base\System\IO\Packaging\PackageDigitalSignatureManager.cs (7)
742Debug.Assert(index < _signatures.Count); 818Debug.Assert(index < _signatures.Count); 1079Debug.Assert(signatureUri != null); 1080Debug.Assert(countOfSignaturesRemaining >= 0); 1161Debug.Assert(Uri.Compare(r.SourceUri, 1188Debug.Assert(uri != null, "Improper use of delegate - context must be Uri"); 1325Debug.Assert(!_originPartExists, "Logic Error: If OriginPartExists, OriginSearchConducted should be true.");
Base\System\IO\Packaging\PackagePart.cs (3)
368Debug.Assert(!IsStreamClosed(s)); 646Debug.Assert(_deleted != true, "PackagePart.Flush should never be called on a deleted part"); 729Debug.Assert(_deleted != true, "PackagePart.FlushRelationsips should never be called on a deleted part");
Base\System\IO\Packaging\PackagePartCollection.cs (1)
103Debug.Assert(partList != null, "partDictionary parameter cannot be null");
Base\System\IO\Packaging\PackageRelationship.cs (3)
188Debug.Assert((targetMode == TargetMode.External || !targetUri.IsAbsoluteUri), 192Debug.Assert ((targetMode >= TargetMode.Internal || targetMode <= TargetMode.External), 196Debug.Assert(relationshipType.Trim() != String.Empty,
Base\System\IO\Packaging\PackageRelationshipCollection.cs (4)
81Debug.Assert(relationships != null, "relationships parameter cannot be null"); 125Debug.Assert((enumerator != null), "Enumerator cannot be null"); 126Debug.Assert(filter != null, "PackageRelationship filter string cannot be null"); 129Debug.Assert(filter.Trim() != String.Empty,
Base\System\IO\Packaging\PackageRelationshipSelector.cs (1)
189Debug.Assert(false, "This option should never be called");
Base\System\IO\Packaging\PackUriHelper.cs (14)
459Debug.Assert((partName.Length - file.Length) > 0, 517Debug.Assert((path.Length - partNameWithoutExtension.Length - _relationshipPartExtensionName.Length - 1) > 0, 523Debug.Assert((path.Length - _relationshipPartSegmentName.Length) > 0, 630Debug.Assert(partUriString != null && partUriString.Length == 0); 635Debug.Assert(partUriString != null && partUriString.Length > 0); 643Debug.Assert(partUri != null, "Null reference check for this uri parameter should have been made earlier"); 917Debug.Assert(partUri != null, "Null reference check for this uri parameter should have been made earlier"); 918Debug.Assert(!(partUri is ValidatedPartUri), "This method should only be called when we have not already validated the part uri"); 952Debug.Assert(partName != null, "Null reference check for this partName parameter should have been made earlier"); 967Debug.Assert(packUri != null, "packUri parameter cannot be null"); 987Debug.Assert(packUri != null, "packUri parameter cannot be null"); 1191Debug.Assert(partUriString != null && partUriString.Length > 0); 1239Debug.Assert(segments.Length > 0 && segments[0] == String.Empty); 1242Debug.Assert(String.CompareOrdinal((Path.GetExtension(segments[segments.Length - 1])), _relationshipPartUpperCaseExtension) == 0);
Base\System\IO\Packaging\ZipPackage.cs (8)
479Debug.Assert(opcName != null && opcName.Length > 0); 526Debug.Assert(false, "Encountered an invalid CompressionOption enum value"); 566Debug.Assert(zipItemName != null, "The parameter zipItemName should not be null"); 597Debug.Assert(Enum.IsDefined(typeof(CompressionMethodEnum), zipFileInfo.CompressionMethod), "Enum value is not in range"); 598Debug.Assert(Enum.IsDefined(typeof(DeflateOptionEnum), zipFileInfo.DeflateOption), "Enum value is not in range"); 622default: Debug.Assert(false, "Encountered and invalid value for DeflateOptionEnum"); 630Debug.Assert(sortedPieceInfoList != null); 1390Debug.Assert(!reader.IsEmptyElement, "This method should only be called it the Relationship Element is not empty");
Base\System\Security\RightsManagement\CryptoProvider.cs (2)
480Debug.Assert(decryptorHandle != null); 512Debug.Assert(encryptorHandle != null);
Base\System\Security\RightsManagement\SecureEnvironment.cs (1)
362Debug.Assert(IsUserActivated(user));
Base\System\Windows\Data\DataSourceProvider.cs (1)
349Debug.Assert(_deferLevel > 0);
Base\System\Windows\DependencyObject.cs (37)
91Debug.Assert(!(this is Freezable), "A Freezable should not call DO's implementation of Seal()"); 321Debug.Assert(!DO_Sealed, "A Sealed DO cannot be modified"); 379Debug.Assert(reference != null, "the only modified values that can have deferredreferences are (a) expression, (b) coerced control value"); 626Debug.Assert(dp != null); 666Debug.Assert(!coerceWithCurrentValue, "Don't call SetCurrentValue with UnsetValue"); 806Debug.Assert(!coerceWithCurrentValue, "Expression values not supported in SetCurrentValue"); 1509Debug.Assert(newEntry.BaseValueSourceInternal != BaseValueSourceInternal.Unknown, "Value source should be known at this point"); 1681Debug.Assert(!(newEntry.IsCoerced && !newEntry.IsCoercedWithCurrentValue) && 1769Debug.Assert(dependentList != null, "dependentList should either be unset or non-null"); 1783Debug.Assert(dependentList != null, "dependentList should either be unset or non-null"); 2275Debug.Assert(!DO_Sealed, "A Sealed DO cannot be modified"); 2422Debug.Assert((!source.DependencyObject.IsSealed) || 2443Debug.Assert(dependentListObj != null, "dependentList should either be unset or non-null"); 2514Debug.Assert(getExpressionCore != null, "getExpressionCore cannot be null"); 2515Debug.Assert(_getExpressionCore == null, "The 'alternative Expression storage' feature has already been registered"); 2704Debug.Assert(CanModifyEffectiveValues == false, "We do not expect re-entrancy here."); 2821Debug.Assert(InheritanceContextChangedHandlersField.GetValue(this) == null, 2869Debug.Assert(!DO_Sealed, "A Sealed DO cannot be modified"); 2930Debug.Assert(!DO_Sealed, "A Sealed DO cannot be modified"); 2964Debug.Assert((_packedData & 0x3E000000) == 0, "InheritanceParent should not be set in a Freezable, which manages its own inheritance context."); 2967Debug.Assert(!DO_Sealed, "A Sealed DO cannot be modified"); 2971Debug.Assert(!IsSelfInheritanceParent, "If the IsSelfInheritanceParent is set then the InheritanceParent should have been ----d."); 3023Debug.Assert(!DO_Sealed, "A Sealed DO cannot be modified"); 3064Debug.Assert(inheritanceParent != null, "Must have inheritanceParent"); 3065Debug.Assert(inheritanceParent.IsSelfInheritanceParent, "An inheritanceParent should always be one that has all the inheritable properties cached on self"); 3183Debug.Assert(!DO_Sealed, "A Sealed DO cannot be modified"); 3233Debug.Assert(!DO_Sealed, "A Sealed DO cannot be modified"); 3335Debug.Assert(dp == null || (dp.GlobalIndex == newEntry.PropertyIndex), "EffectiveValueEntry & DependencyProperty do not match"); 3345Debug.Assert(value != DependencyProperty.UnsetValue, "Value to be set cannot be UnsetValue"); 3346Debug.Assert(valueSource != BaseValueSourceInternal.Unknown, "ValueSource cannot be Unknown"); 3349Debug.Assert(!DO_Sealed, "A Sealed DO cannot be modified"); 3401Debug.Assert(entry.BaseValueSourceInternal != BaseValueSourceInternal.Local || valueSource == BaseValueSourceInternal.Local, 3408Debug.Assert(dp == null || (dp.GlobalIndex == entry.PropertyIndex), "EffectiveValueEntry & DependencyProperty do not match"); 3435Debug.Assert(value != DependencyProperty.UnsetValue, "Value to be set cannot be UnsetValue"); 3436Debug.Assert(baseValue != DependencyProperty.UnsetValue, "BaseValue to be set cannot be UnsetValue"); 3437Debug.Assert(entryIndex.Found == true, "The baseValue for the expression should have been inserted prior to this and hence there should already been an entry for it."); 3440Debug.Assert(!DO_Sealed, "A Sealed DO cannot be modified");
Base\System\Windows\DependencyObjectType.cs (1)
65Debug.Assert(systemType != null && typeof(DependencyObject).IsAssignableFrom(systemType), "Invalid systemType argument");
Base\System\Windows\DependencyProperty.cs (1)
967Debug.Assert( ReadOnly, "Why are we trying to validate read-only key on a property that is not read-only?");
Base\System\Windows\DependencyPropertyKey.cs (1)
54Debug.Assert(_dp==null,"This should only be used when we need a placeholder and have a temporary value of null. It should not be used to change this property.");
Base\System\Windows\EffectiveValueEntry.cs (22)
54Debug.Assert(value != DependencyProperty.UnsetValue); 61Debug.Assert(Object.Equals(modifiedValue.BaseValue, baseValue)); 62Debug.Assert(!(baseValue is DeferredReference)); 63Debug.Assert(IsDeferredReference == (value is DeferredReference)); 68Debug.Assert((value != DependencyProperty.UnsetValue) && 78Debug.Assert(!(modifiedValue.AnimatedValue is DeferredReference)); 79Debug.Assert(Object.Equals(modifiedValue.BaseValue, baseValue) || 81Debug.Assert(!(baseValue is DeferredReference) && 88Debug.Assert(value != DependencyProperty.UnsetValue && 116Debug.Assert(skipBaseValueChecks || 120Debug.Assert(!(baseValue is DeferredReference) && 178Debug.Assert(hasExpressionMarker == (value == DependencyObject.ExpressionInAlternativeStore), "hasExpressionMarker flag must match value"); 252Debug.Assert(value is DeferredReference == IsDeferredReference); 336Debug.Assert(HasExpressionMarker); 356Debug.Assert(ModifiedValue != null); 417Debug.Assert(IsExpression == true); 424Debug.Assert(entry.IsDeferredReference == (entry.Value is DeferredReference), "Value and DeferredReference flag should be in sync; hitting this may mean that it's time to divide the DeferredReference flag into a set of flags, one for each modifier"); 488Debug.Assert(Value != DependencyProperty.UnsetValue); 493Debug.Assert(ModifiedValue != null && ModifiedValue.BaseValue != DependencyProperty.UnsetValue); 505Debug.Assert(BaseValueSourceInternal == BaseValueSourceInternal.Local, "This can happen only on an entry already having a local value"); 509Debug.Assert(Value != DependencyProperty.UnsetValue); 514Debug.Assert(ModifiedValue != null && ModifiedValue.BaseValue != DependencyProperty.UnsetValue);
Base\System\Windows\Freezable.cs (30)
64Debug.Assert(!Freezable_Frozen 937Debug.Assert(srcEntry.BaseValueSourceInternal != BaseValueSourceInternal.Default || srcEntry.HasModifiers); 946Debug.Assert(sourceValue != DependencyProperty.UnsetValue); 975Debug.Assert(!(sourceValue is Expression && sourceValue is Freezable), 1042Debug.Assert(owner != null && child != null, 1074Debug.Assert(context != null); 1115Debug.Assert(!failed); 1136Debug.Assert(Freezable_UsingSingletonContext); 1137Debug.Assert(SingletonContext != null); 1156Debug.Assert(Freezable_UsingContextList); 1178Debug.Assert(context != null); 1206Debug.Assert(context != null); 1230Debug.Assert(context != null); 1253Debug.Assert(Freezable_UsingSingletonContext); 1286Debug.Assert(!Freezable_UsingSingletonContext && !Freezable_UsingContextList); 1287Debug.Assert(context != null); 1318Debug.Assert(context != null); 1434Debug.Assert(handler != null); 1459Debug.Assert(handler != null); 1498Debug.Assert(Freezable_UsingSingletonHandler); 1518Debug.Assert(Freezable_UsingHandlerList && HandlerList.Count == 0); 1538Debug.Assert(Freezable_UsingSingletonHandler); 1568Debug.Assert(!Freezable_UsingHandlerList && !Freezable_UsingSingletonHandler); 1569Debug.Assert(handler != null); 1612Debug.Assert(Freezable_UsingContextList && !Freezable_UsingSingletonContext, 1629Debug.Assert(Freezable_UsingContextList && !Freezable_UsingSingletonContext, 1651Debug.Assert(Freezable_UsingHandlerList && !Freezable_UsingSingletonHandler, 1675Debug.Assert(Freezable_UsingSingletonHandler && !Freezable_UsingHandlerList, 1701Debug.Assert(Freezable_UsingSingletonContext && !Freezable_UsingContextList, 1725Debug.Assert(Freezable_UsingSingletonContext && !Freezable_UsingContextList,
Base\System\Windows\Markup\TypeConverterHelper.cs (2)
106Debug.Assert(null != memberInfo, "Null passed for memberInfo to GetConverterType"); 123Debug.Assert(null != type, "Null passed for type to GetConverterType");
Base\System\Windows\Markup\XmlCompatibilityReader.cs (1)
350Debug.Assert(Scope.ShouldProcessContent(namespaceName, Reader.LocalName));
Base\System\Windows\Markup\XmlWrappingReader.cs (1)
49Debug.Assert( baseReader != null );
Base\System\Windows\Media\Matrix.cs (11)
952Debug.Assert(_m21 == 0); 953Debug.Assert(_m12 == 0); 954Debug.Assert(_offsetX == 0); 955Debug.Assert(_offsetY == 0); 958Debug.Assert(_m21 == 0); 959Debug.Assert(_m12 == 0); 960Debug.Assert(_m11 == 1); 961Debug.Assert(_m22 == 1); 964Debug.Assert(_m21 == 0); 965Debug.Assert(_m12 == 0); 968Debug.Assert(false);
Base\System\Windows\PropertyMetadata.cs (3)
138Debug.Assert(owner != null && property != null, 173Debug.Assert(!owner.IsSealed, 193Debug.Assert(!(result is DispatcherObject) || ((DispatcherObject)result).Dispatcher == owner.Dispatcher);
Base\System\Windows\Rect.cs (1)
145Debug.Assert((!(_width < 0) && !(_height < 0)) || (this == Empty));
Base\System\Windows\Threading\Dispatcher.cs (5)
1468Debug.Assert(timeout.TotalMilliseconds >= 0 || timeout == TimeSpan.FromMilliseconds(-1)); 1469Debug.Assert(operation.Priority != DispatcherPriority.Send || !CheckAccess()); // should be handled by caller 1506Debug.Assert(operation.Status == DispatcherOperationStatus.Completed || 1522Debug.Assert(operation.Status == DispatcherOperationStatus.Aborted); 1952Debug.Assert(isSentinel, "this ctor is only for creating a 'sentinel' dispatcher");
Base\System\Windows\Threading\DispatcherExceptionEventArgs.cs (1)
105Debug.Assert(exception != null);
Base\System\Windows\Threading\DispatcherExceptionFilterEventArgs.cs (1)
117Debug.Assert(exception != null);
Shared\MS\Internal\CopyOnWriteList.cs (2)
76Debug.Assert(null!=obj, "CopyOnWriteList.Add() should not be passed null."); 95Debug.Assert(null!=obj, "CopyOnWriteList.Remove() should not be passed null.");
Shared\MS\Internal\Invariant.cs (1)
269Debug.Assert(false, "Invariant failure: " + message, detailMessage);
Shared\MS\Internal\IO\Packaging\PackagingUtilities.cs (3)
325Debug.Assert(bytesLeftToCopy == 0); 416Debug.Assert(reader != null, "xmlReader should not be null"); 417Debug.Assert(reader.NodeType == XmlNodeType.Element, "XmlReader should be positioned at an Element");
Shared\MS\Internal\MatrixUtil.cs (1)
279Debug.Assert(matrix._type != MatrixTypes.TRANSFORM_IS_IDENTITY);
Shared\MS\Internal\Permissions\InternalPermissions.cs (1)
68Debug.Assert(GetType().IsSerializable);
Shared\MS\Internal\SafeSecurityHelper.cs (1)
467Debug.Assert(target != null);
Shared\MS\Internal\TokenizerHelper.cs (2)
201Debug.Assert(!Char.IsWhiteSpace(currentChar),"Token started on Whitespace"); 344Debug.Assert(null != numberFormat);
Shared\MS\Internal\WeakReferenceList.cs (5)
52Debug.Assert(null != item, "WeakReferenceList.Contains() should not be passed null."); 88Debug.Assert(null!=obj, "WeakReferenceList.Add() should not be passed null."); 97Debug.Assert(null!=obj, "WeakReferenceList.Add() should not be passed null."); 126Debug.Assert(null!=obj, "WeakReferenceList.Remove() should not be passed null."); 147Debug.Assert(null!=obj, "WeakReferenceList.Add() should not be passed null.");
Shared\MS\Utility\FrugalList.cs (2)
191Debug.Assert(start >= _previousEnd, "Arguments out of order during Compact"); 192Debug.Assert(_validItemCount + end - start <= _newCount, "Too many items copied during Compact");
Shared\MS\Utility\FrugalMap.cs (11)
128Debug.Assert(INVALIDKEY != key); 234Debug.Assert(INVALIDKEY != key); 392Debug.Assert(INVALIDKEY != key); 554Debug.Assert(INVALIDKEY != key); 874Debug.Assert(INVALIDKEY != key); 1134Debug.Assert(INVALIDKEY != key); 1349Debug.Assert(INVALIDKEY != key); 1413Debug.Assert(INVALIDKEY != key); 1569Debug.Assert(INVALIDKEY != key); 1838Debug.Assert(INVALIDKEY != key); 1894Debug.Assert(INVALIDKEY != key);
Shared\MS\Utility\TraceProvider.cs (4)
115Debug.Assert(IsEnabled(keywords, level)); 156Debug.Assert(IsEnabled(keywords, level)); 160Debug.Assert(argCount <= s_etwMaxNumberArguments); 182Debug.Assert(stringIndex < s_etwAPIMaxStringCount); // need to increase string count or emit fewer strings
Shared\MS\Win32\HwndWrapper.cs (1)
388System.Diagnostics.Debug.WriteLine("Non-zero WndProc result=" + result);
Shared\MS\Win32\NativeMethodsOther.cs (1)
41Debug.Assert((0xFFFF0000 & errorCode) == 0);
Shared\MS\Win32\UnsafeNativeMethodsCLR.cs (10)
279Debug.WriteLine("DeleteObject failed. Error = " + error); 602Debug.WriteLine("CloseHandle failed. Error = " + error); 678Debug.WriteLine("UnmapViewOfFile failed. Error = " + error); 768System.Diagnostics.Debug.WriteLine("GetCursorPos failed!"); 1797Debug.WriteLine("DestroyIcon failed. Error = " + error); 1827Debug.WriteLine("DeleteObject failed. Error = " + error); 1858Debug.WriteLine("CreateDIBSection failed. Error = " + error); 1882Debug.WriteLine("CreateBitmap failed. Error = " + error); 1907Debug.WriteLine("DestroyIcon failed. Error = " + error); 1930Debug.WriteLine("CreateIconIndirect failed. Error = " + error);
Shared\MS\Win32\UnsafeNativeMethodsOther.cs (4)
607Debug.Assert(handle != IntPtr.Zero); 758Debug.WriteLine("GetWindowLongPtr failed. Error = " + error); 796Debug.WriteLine("GetWindowLong failed. Error = " + error); 979Debug.WriteLine("GetIconInfo failed. Error = " + error);
Shared\System\Windows\Markup\ReflectionHelper.cs (3)
112Debug.Assert(null != type, "Type passed to IsInternalType is null"); 133Debug.Assert(null != type, "Type passed to IsPublicType is null"); 415Debug.Assert(!assemblyPath.EndsWith("\\", StringComparison.Ordinal), "the assembly path should be a full file path containing file extension");
WsatConfig (8)
CommandLine\ArgumentsParser.cs (1)
138Debug.Assert(config != null, "config is null");
CommandLine\OptionUsage.cs (3)
160Debug.Assert(string.IsNullOrEmpty(optionAbbr)); 185Debug.Assert(optionUses.Count > 1); 261Debug.Assert(this.stringBuilder != null, "stringBuilder cannot be null");
Configuration\MsdtcWrapper.cs (1)
205System.Diagnostics.Debug.Assert(controller != null,
Configuration\RegistryExceptionHelper.cs (1)
52System.Diagnostics.Debug.Assert(false, "registryHive is not supported");
Configuration\WsatConfiguration.cs (2)
302Debug.Assert(IsClustered); 529System.Diagnostics.Debug.Assert(!(IsLocalMachine || IsClustered));
WsatUI (4)
Configuration\MsdtcWrapper.cs (1)
205System.Diagnostics.Debug.Assert(controller != null,
Configuration\RegistryExceptionHelper.cs (1)
52System.Diagnostics.Debug.Assert(false, "registryHive is not supported");
Configuration\WsatConfiguration.cs (2)
302Debug.Assert(IsClustered); 529System.Diagnostics.Debug.Assert(!(IsLocalMachine || IsClustered));
XamlBuildTask (2)
Microsoft\Build\Tasks\Xaml\ClassImporter.cs (2)
129Debug.Fail("Unrecognized XamlNodeType value" + reader.NodeType.ToString()); 213Debug.Fail("Unrecognized XamlNodeType value" + reader.NodeType.ToString());