12445 references to Assert
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 (124)
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");
BuildTasks\Ms\Internal\MarkupCompiler\MarkupCompiler.cs (3)
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");
BuildTasks\Ms\Internal\MarkupCompiler\ParserExtension.cs (4)
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");
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\System\Windows\Markup\BamlMapTable.cs (2)
1034Debug.Assert(assemblyFullName.Length != 0, "empty assembly"); 1480Debug.Assert(GetHashTableData(stringValue) == null,
Framework\System\Windows\Markup\BamlRecordHelper.cs (1)
135Debug.Assert(false, "Unhandled case in DoesRecordTypeHaveDebugExtension");
Framework\System\Windows\Markup\BamlRecords.cs (20)
699Debug.Assert(false,"Assembly, Type and Attribute records are not cached, so don't ask for one."); 724Debug.Assert(false,"Unknown RecordType"); 869set { Debug.Assert (value == -1, "Setting fixed record to an invalid size"); } 878Debug.Assert(false, "Must override RecordType"); 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"); } 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"); 4952Debug.Assert((propertyMember is MethodInfo) || (propertyMember is PropertyInfo)
Framework\System\Windows\Markup\BamlRecordWriter.cs (11)
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"); 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 (1)
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 (1)
1301Debug.Assert (mode != StyleMode.Base || xamlPropertyNode.PropName != XamlStyleSerializer.TargetTypePropertyName,
Framework\System\Windows\Markup\TreeBuilder.cs (1)
98Debug.Assert (false, "Parse Fragment was not overidden");
Framework\System\Windows\Markup\XamlParser.cs (4)
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"); 1351Debug.Assert(null == _bamlWriter || null == value, "XamlParser already had a bamlWriter");
Framework\System\Windows\Markup\XamlReaderHelper.cs (40)
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"); 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"); 1847Debug.Assert(null == dynamicObject,"DynamicObject should be null for code"); 2015Debug.Assert(false == endTagHasBeenRead, "Read past end tag on end tag"); 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"); 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"); 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"); 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 (15)
1029Debug.Assert(null != localName, "null localName"); 1030Debug.Assert(null != xmlNamespace, "null xmlNamespace"); 2001Debug.Assert(typeInfo != null, "Must have cached type info at this point"); 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,
Shared\MS\Internal\TokenizerHelper.cs (1)
201Debug.Assert(!Char.IsWhiteSpace(currentChar),"Token started on Whitespace");
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 (487)
Core\CSharp\MS\Internal\Ink\EllipticalNodeOperations.cs (3)
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");
Core\CSharp\MS\Internal\Ink\ExtendedPropertyCollection.cs (1)
325System.Diagnostics.Debug.Assert(!this.Contains(extendedProperty.Id), "ExtendedProperty already belongs to the collection");
Core\CSharp\MS\Internal\Ink\GestureRecognizer\NativeRecognizer.cs (3)
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" );
Core\CSharp\MS\Internal\Ink\InkSerializedFormat\CustomAttributeSerializer.cs (1)
998Debug.Assert(false, "Missing case statement!");
Core\CSharp\MS\Internal\Ink\InkSerializedFormat\DrawingAttributeSerializer.cs (3)
303System.Diagnostics.Debug.Assert(false, "Corrupt Matrix in the ExtendedPropertyCollection!"); 530System.Diagnostics.Debug.Assert(da.Color != (Color)DrawingAttributes.GetDefaultDrawingAttributeValue(KnownIds.Color), "Color was put in the EPC for the default value!"); 649System.Diagnostics.Debug.Assert(da.StylusTip != StylusTip.Ellipse, "StylusTip was put in the EPC for the default value!");
Core\CSharp\MS\Internal\Ink\InkSerializedFormat\StrokeSerializer.cs (1)
318System.Diagnostics.Debug.Assert(false, "ExtendedProperties for points are not supported");
Core\CSharp\MS\Internal\Ink\StrokeNode.cs (3)
266Debug.Assert(false, "StrokeNodeOperations.GetPointsAtStartOfSegment failed to find the D position"); 379Debug.Assert(false, "StrokeNodeOperations.GetPointsAtEndOfSegment failed to find the B position"); 647Debug.Assert(false, "Couldn't find all 4 indexes in StrokeNodeOperations.GetPointsAtMiddleSegment");
Core\CSharp\MS\Internal\Ink\StrokeRenderer.cs (2)
357Debug.Assert(!prevStrokeNode.GetConnectingQuad().IsEmpty, "prevStrokeNode.GetConnectingQuad() is Empty!"); 464Debug.Assert(!strokeNode.GetConnectingQuad().IsEmpty, "strokeNode.GetConnectingQuad was empty, this is unexpected");
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 (2)
786Debug.Assert(_fullStreamLength >= 0, "We assume _fullStreamLength is correct for Http cases - only Ftp can return bogus values"); 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\Media\VisualTreeUtils.cs (3)
253Debug.Assert((visual == null) != (visual3D == null), 274Debug.Assert(castSucceeded && ((visual == null) != (visual3D == null)), 281Debug.Assert(!castSucceeded && visual == null && visual3D == null,
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\M3DUtil.cs (2)
45Debug.Assert(!bounds.IsEmpty, 389Debug.Assert(camera != null, "Caller is responsible for ensuring camera is not null.");
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 (4)
611Debug.Assert(false,"Unknown OpenType layout table!"); 1110Debug.Assert(false,"Ext.Lookup processed earlier!"); 1196Debug.Assert(false,"Ext.Lookup processed earlier!"); 1209Debug.Assert(false,"Unknown OpenType layout table!");
Core\CSharp\MS\Internal\Shaping\TypefaceMap.cs (1)
408Debug.Assert(index >= 0, "Invalid scaled shapeable typeface index spans");
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\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\FullTextState.cs (1)
312Debug.Assert(lsccp > 0, "Zero-length text line!");
Core\CSharp\MS\Internal\TextFormatting\LineServicesCallbacks.cs (9)
211Debug.Assert(TextStore.IsContent(plsrun), "Unrecognizable run!"); 212Debug.Assert(lsrun.RunProp != null, "invalid lsrun!"); 673Debug.Assert(markerStore != null, "No marker store, yet autonumbering is specified!"); 745Debug.Assert( 813Debug.Assert( 1357Debug.Assert(false, "Not supported TextDecorationUnit"); 1384Debug.Assert(false, "Not supported TextDecorationUnit"); 2499Debug.Assert(false, "Unsupported installed object!"); 2800Debug.Assert(fGeometryProvided == 0, "Line enumeration doesn't need geometry information");
Core\CSharp\MS\Internal\TextFormatting\TextMarkerSource.cs (1)
137Debug.Assert(false, "Invalid marker style");
Core\CSharp\MS\Internal\TextFormatting\TextRunCacheImp.cs (2)
196Debug.Assert(textRun != null && runLength > 0, "Invalid run!"); 269Debug.Assert(
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\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\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\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\FreezableCollection.cs (2)
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 (2)
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\IncrementalHitTester.cs (2)
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.");
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 (1)
808Debug.Assert(false, "Unknown Speech Mode");
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 (2)
101Debug.Assert(element != null, "element should be non-null."); 130Debug.Assert(element != null, "element should be non-null.");
Core\CSharp\System\Windows\Input\ManipulationLogic.cs (1)
336Debug.Assert(_generatedEvent == null, "There is already a generated event waiting to be pushed.");
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\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 (3)
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.");
Core\CSharp\System\Windows\Interop\HwndSource.cs (3)
1231Debug.Assert(_hwndTarget!= null, "HwndTarget is null"); 1232Debug.Assert(_hwndTarget.IsDisposed == false, "HwndTarget is disposed"); 2616Debug.Assert(null!=ikis, "ChildSinkWithFocus called when none had focus");
Core\CSharp\System\Windows\Media\Animation\AnimationLayer.cs (6)
36Debug.Assert(defaultDestinationValue != DependencyProperty.UnsetValue, 83Debug.Assert(handoffBehavior == HandoffBehavior.Compose, 85Debug.Assert(defaultDestinationValue == DependencyProperty.UnsetValue, 137Debug.Assert(_hasStickySnapshotValue, 147Debug.Assert(_animationClocks != null 155Debug.Assert(index >= 0,
Core\CSharp\System\Windows\Media\Animation\AnimationStorage.cs (10)
515Debug.Assert(index > -1, 544Debug.Assert(_hasStickySnapshotValue, 596Debug.Assert(animationClocks != null, 598Debug.Assert(animationClocks.Count > 0, 600Debug.Assert(!animationClocks.Contains(null), 602Debug.Assert(HandoffBehaviorEnum.IsDefined(handoffBehavior), 715Debug.Assert(HandoffBehaviorEnum.IsDefined(handoffBehavior), 788Debug.Assert(HandoffBehaviorEnum.IsDefined(handoffBehavior), 904Debug.Assert(storage != null, 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 (24)
1412Debug.Assert(_resolvedDuration != Duration.Automatic, "_resolvedDuration should never be set to Automatic."); 1960Debug.Assert(_currentDuration != Duration.Automatic, "_currentDuration should never be Automatic."); 2187Debug.Assert(_currentDuration == Duration.Forever, "_currentDuration has an invalid enum value."); 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."); 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."); 2460Debug.Assert(_resolvedDuration == Duration.Forever, "_resolvedDuration should be Forever when NaturalDuration is Automatic."); 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."); 2670Debug.Assert(!_currentIterationBeginTime.HasValue, "_currentIterationBeginTime should not have a value when _beginTime has no value."); 3095Debug.Assert(_rootData != null, "A root Clock must have the _rootData structure initialized."); 3415Debug.Assert(!current.IsRoot, "Root nodes never should reset their Slip amounts with ResetSlipOnSubtree(), even when seeking."); 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 (8)
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"); 465Debug.Assert(IsTimeManager, "Invalid call to RootActivate for a non-root Clock"); 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\Generated\BooleanAnimationUsingKeyFrames.cs (6)
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\ByteAnimationUsingKeyFrames.cs (6)
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\CharAnimationUsingKeyFrames.cs (6)
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\ColorAnimationUsingKeyFrames.cs (6)
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\DecimalAnimationUsingKeyFrames.cs (6)
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\DoubleAnimationUsingKeyFrames.cs (6)
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\Int16AnimationUsingKeyFrames.cs (6)
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\Int32AnimationUsingKeyFrames.cs (6)
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\Int64AnimationUsingKeyFrames.cs (6)
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\MatrixAnimationUsingKeyFrames.cs (6)
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\ObjectAnimationUsingKeyFrames.cs (6)
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\Point3DAnimationUsingKeyFrames.cs (6)
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\PointAnimationUsingKeyFrames.cs (6)
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\QuaternionAnimationUsingKeyFrames.cs (6)
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\RectAnimationUsingKeyFrames.cs (6)
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\Rotation3DAnimationUsingKeyFrames.cs (6)
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\SingleAnimationUsingKeyFrames.cs (6)
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\SizeAnimationUsingKeyFrames.cs (6)
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\StringAnimationUsingKeyFrames.cs (6)
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\TimelineCollection.cs (2)
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\Vector3DAnimationUsingKeyFrames.cs (6)
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\VectorAnimationUsingKeyFrames.cs (6)
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\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 (1)
195Debug.Assert(InternalTarget == AutoWrapVisual,
Core\CSharp\System\Windows\Media\Effects\Generated\BitmapEffectCollection.cs (2)
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\ShaderEffect.cs (1)
740Debug.Assert(!hBrush.IsNull || ss._brush == null, "If brush isn't null, hBrush better not be");
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\FormattedText.cs (2)
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\Brush.cs (2)
461Debug.Assert(s_Transform == null || s_Transform.IsFrozen, 465Debug.Assert(s_RelativeTransform == null || s_RelativeTransform.IsFrozen,
Core\CSharp\System\Windows\Media\Generated\CombinedGeometry.cs (2)
472Debug.Assert(s_Geometry1 == null || s_Geometry1.IsFrozen, 476Debug.Assert(s_Geometry2 == null || s_Geometry2.IsFrozen,
Core\CSharp\System\Windows\Media\Generated\DashStyle.cs (1)
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\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\DrawingGroup.cs (1)
895Debug.Assert(s_Children == null || s_Children.IsFrozen,
Core\CSharp\System\Windows\Media\Generated\GeneralTransformCollection.cs (2)
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 (1)
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\GeometryGroup.cs (1)
525Debug.Assert(s_Children == null || s_Children.IsFrozen,
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 (2)
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 (2)
392Debug.Assert(s_GuidelinesX == null || s_GuidelinesX.IsFrozen, 396Debug.Assert(s_GuidelinesY == null || s_GuidelinesY.IsFrozen,
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\PathFigure.cs (1)
288Debug.Assert(s_Segments == null || s_Segments.IsFrozen,
Core\CSharp\System\Windows\Media\Generated\PathFigureCollection.cs (2)
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 (1)
317Debug.Assert(s_Figures == null || s_Figures.IsFrozen,
Core\CSharp\System\Windows\Media\Generated\PathSegmentCollection.cs (2)
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 (1)
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\TextEffectCollection.cs (2)
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 (1)
480Debug.Assert(s_Children == null || s_Children.IsFrozen,
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\GeometryHitTestParameters.cs (1)
104Debug.Assert(_hitGeometryInternal.Transform.Value == _hitGeometryCache.Transform.Value,
Core\CSharp\System\Windows\Media\ImageSourceConverter.cs (1)
250Debug.Assert(rawData != null, "rawData is null.");
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\BitmapVisualManager.cs (1)
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\MediaContext.cs (10)
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, 1422Debug.Assert(dispatcher != null, "Dispatcher required"); 2200Debug.Assert(_needToCommitChannel, "CommitChannel called with nothing on the channel"); 2204Debug.Assert(!InterlockIsWaiting, 2280Debug.Assert(InterlockIsEnabled,
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\MediaSystem.cs (1)
309Debug.Assert(reference != null, "The reference object can not be null.");
Core\CSharp\System\Windows\Media\PathStreamGeometryContext.cs (4)
86Debug.Assert(_figures == null, "It is illegal to call SetFigureCount multiple times or after BeginFigure."); 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.");
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\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\Visual.cs (6)
178Debug.Assert(false, "TYPE_VISUAL or TYPE_VIEWPORT3DVISUAL expected."); 1981Debug.Assert(Point.Equals(pointParams.HitPoint, backupHitPoint), 3081Debug.Assert(bed != null, "Must be non-null because otherwise the code would have earlied out where new value is compared against old value."); 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."); 5288Debug.Assert(cyclicBrushToChannelsMap != null, "Visual brush roots need to have the visual brush to channels map!");
Core\CSharp\System\Windows\Media\VisualCollection.cs (3)
299Debug.Assert(value == 0, "There shouldn't be a case where value != 0."); 300Debug.Assert(_size == 0, "Size must be 0 here."); 871Debug.Assert(newIndex >= 0 && newIndex <= _size, "New index is invalid");
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\Camera.cs (1)
361Debug.Assert(s_Transform == null || s_Transform.IsFrozen,
Core\CSharp\System\Windows\Media3D\Generated\DiffuseMaterial.cs (1)
402Debug.Assert(s_Brush == null || s_Brush.IsFrozen,
Core\CSharp\System\Windows\Media3D\Generated\EmissiveMaterial.cs (1)
374Debug.Assert(s_Brush == null || s_Brush.IsFrozen,
Core\CSharp\System\Windows\Media3D\Generated\GeneralTransform3DCollection.cs (2)
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\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 (1)
476Debug.Assert(s_Children == null || s_Children.IsFrozen,
Core\CSharp\System\Windows\Media3D\Generated\MeshGeometry3D.cs (4)
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 (1)
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 (1)
493Debug.Assert(s_Children == null || s_Children.IsFrozen,
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\RotateTransform3D.cs (1)
449Debug.Assert(s_Rotation == null || s_Rotation.IsFrozen,
Core\CSharp\System\Windows\Media3D\Generated\SpecularMaterial.cs (1)
402Debug.Assert(s_Brush == null || s_Brush.IsFrozen,
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 (1)
476Debug.Assert(s_Children == null || s_Children.IsFrozen,
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 (4)
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 (5)
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,
Core\CSharp\System\Windows\Media3D\Quaternion.cs (1)
544Debug.Assert(!(cosOmega < -1.0) && !(cosOmega > 1.0),
Core\CSharp\System\Windows\Media3D\Viewport3DVisual.cs (3)
658Debug.Assert( 678Debug.Assert( 780Debug.Assert(!CheckFlagsAnd(channel, VisualProxyFlags.IsContentNodeConnected),
Core\CSharp\System\Windows\Media3D\Visual3D.cs (10)
475Debug.Assert(VisualTreeHelper.GetParent(this) != null, "If oldParent is null, current parent should != null."); 1082Debug.Assert(boundsAreEqual, errorString); 1236Debug.Assert((flags & VisualProxyFlags.IsContentNodeConnected) == 0, 1613Debug.Assert(child.InheritanceContext == this, 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\QueryContinueDragEventArgs.cs (1)
49Debug.Assert(false, "Invalid dragDropKeyStates");
Core\CSharp\System\Windows\UIElement.cs (4)
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");
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");
PresentationFramework (1057)
src\Framework\MS\Internal\Annotations\Anchoring\AttachedAnnotation.cs (7)
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, 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 (2)
126Debug.Assert(numOfPages >= 0, "start page number is bigger than the end page number"); 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\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 (2)
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");
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 (5)
108Debug.Assert(_contentId == 0 || _contentId == value, 394Debug.Assert(endingPF.ParentPageFunctionId == Guid.Empty, 594Debug.Assert(ns != null, "Fragment navigation won't work when the INavigator doesn't have a NavigationService."); 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 (2)
339Debug.Assert(navigationService != null, "NavigationService cannot be null for journal navigations"); 444Debug.Assert(_journal == null && value != null,
src\Framework\MS\Internal\AppModel\ReturnEventSaver.cs (1)
134Debug.Assert(caller != null, "Caller should not be 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\InkCanvasInnerCanvas.cs (1)
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 (4)
739Debug.Assert(false, "The annotation data does match with the current content control in StickyNote"); 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 (1)
406Debug.Assert(node != null, "Try to load data from an invalid node");
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\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 (1)
431Debug.Assert(startingIndex >= 0, "Source composite collection failed to supply an index");
src\Framework\MS\Internal\Data\DataExtensionMethods.cs (1)
41Debug.Assert(false, "Unsupported list passed to Search");
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\Documents\Application\DocumentApplicationJournalEntry.cs (1)
86Debug.Assert(docViewer != null, "PUIDocumentApplicationDocumentViewer not found.");
src\Framework\MS\Internal\Documents\HostedElements.cs (1)
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\TableTextElementCollectionInternal.cs (1)
352Debug.Assert(false, "Garbage in logical tree.");
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 (1)
354Debug.Assert(lines != null && lines.Count > 0, "Line array is empty.");
src\Framework\MS\Internal\Globalization\BamlResourceSerializer.cs (2)
62Debug.Assert(output != null, "The output stream given is null"); 63Debug.Assert(tree != null && tree.Root != null, "The tree to be serialized is null.");
src\Framework\MS\Internal\Globalization\BamlTreeMap.cs (2)
53Debug.Assert(tree!= null, "Baml Tree is empty"); 54Debug.Assert(localizer!= null, "BamlLocalizer is null");
src\Framework\MS\Internal\Globalization\BamlTreeNode.cs (2)
46Debug.Assert(root != null, "Baml tree root is null!"); 47Debug.Assert(size > 0, "Baml tree size is less than 1");
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 (1)
522Debug.Assert(false, "Can't process localizability attribute on nodes other than Element, Property and LiteralContent.");
src\Framework\MS\Internal\Helper.cs (5)
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"); 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 (1)
188Debug.Assert(false , "CopySelectData: InkCanvas should have a selection!");
src\Framework\MS\Internal\Ink\EditingCoordinator.cs (17)
100Debug.Assert(ActiveEditingBehavior == SelectionEditor, 193Debug.Assert(currentBehavior is StylusEditingBehavior, 215Debug.Assert(currentBehavior is StylusEditingBehavior, 329Debug.Assert(_activationStack.Count == 1, "The behavior stack has to contain one behavior."); 385Debug.Assert(behavior == LassoSelectionBehavior || behavior == SelectionEditingBehavior, 396Debug.Assert(behavior != LassoSelectionBehavior && behavior != SelectionEditingBehavior, 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."); 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 (5)
93Debug.Assert(EditingCoordinator.IsInMidStroke, "SwitchToMode should only be called in a mid-stroke"); 156Debug.Assert(false, "Unknown InkCanvasEditingMode!"); 189Debug.Assert(_cachedPointEraserCursor != null, "_cachedPointEraserCursor shouldn't be null."); 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 (9)
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, 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\LassoSelectionBehavior.cs (5)
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."); 599Debug.Assert(!_disableLasso && _lassoHelper == null, "StartLasso is called unexpectedly.");
src\Framework\MS\Internal\Ink\PenCursorManager.cs (1)
72Debug.Assert(tranform.HasInverse, "The transform has to be invertable.");
src\Framework\MS\Internal\Ink\SelectionEditingBehavior.cs (1)
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\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\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\CellParagraph.cs (3)
77Debug.Assert(Cell.Index != -1 && Cell.ColumnIndex != -1, 149Debug.Assert(Cell.Index != -1 && Cell.ColumnIndex != -1, 178Debug.Assert(Cell.Index != -1 && Cell.ColumnIndex != -1,
src\Framework\MS\Internal\PtsHost\FigureParagraph.cs (1)
331Debug.Assert(false, "Tight wrap is not currently supported.");
src\Framework\MS\Internal\PtsHost\FloaterBaseParagraph.cs (1)
130Debug.Assert(false, "Tight wrap is not currently supported.");
src\Framework\MS\Internal\PtsHost\FloaterParagraph.cs (1)
852Debug.Assert(false, "Unknown type of anchor.");
src\Framework\MS\Internal\PtsHost\Line.cs (3)
76Debug.Assert(_line != null, "Line has been already disposed."); 425Debug.Assert(DoubleUtil.GreaterThanOrClose(rect.Width, 0), "Negative inline object's width."); 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\Pts.cs (3)
66Debug.Assert(ptsContext != null, "Null argument 'ptsContext' - required for return value validation."); 101Debug.Assert(ptsContext != null, "Null argument 'ptsContext' - required for return value validation."); 218Debug.Assert(false, "Unknown WrapDirection value.");
src\Framework\MS\Internal\PtsHost\PtsHelper.cs (1)
1008Debug.Assert(cColumns > 0, "At least one column is required.");
src\Framework\MS\Internal\PtsHost\PtsHost.cs (19)
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."); 3140Debug.Assert(false, "PTS.ObjGetFootnoteInfo is not implemented.");
src\Framework\MS\Internal\PtsHost\PtsPage.cs (1)
181Debug.Assert(breakRecord == null || !_section.StructuralCache.DestroyStructure, "Cannot format from dirty break record unless StructuralCache.DestroyStructure is not set.");
src\Framework\MS\Internal\PtsHost\SubpageParagraph.cs (1)
214Debug.Assert(fSuppressTopSpace == 1, "Top space should be always suppressed at the top of broken paragraph.");
src\Framework\MS\Internal\PtsHost\TableParaClient.cs (2)
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");
src\Framework\MS\Internal\PtsHost\TableParagraph.cs (2)
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 (10)
150Debug.Assert(false, "Should not get here. ParaCache is not currently used."); 267Debug.Assert(false, "Should not get here. ParaCache is not currently used."); 367Debug.Assert(false, "Should not get here. ParaCache is not currently used."); 429Debug.Assert(false, "Should not get here. ParaCache is not currently used."); 820Debug.Assert(false, "Should not get here. ParaCache is not currently used."); 910Debug.Assert(false, "Should not get here. ParaCache is not currently used."); 983Debug.Assert(false, "Should not get here. ParaCache is not currently used."); 1043Debug.Assert(false, "Should not get here. ParaCache is not currently used."); 1219Debug.Assert(false, "Should not get here. ParaCache is not currently used."); 1552Debug.Assert(false, "Should not get here. ParaCache is not currently used.");
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 (11)
72Debug.Assert(run != null, "TextRun has not been created."); 73Debug.Assert(run.Length > 0, "TextRun has to have positive length."); 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\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\SimpleLine.cs (2)
42Debug.Assert(dcp >= 0, "Character index must be non-negative."); 82Debug.Assert(dcp >= 0, "Character index must be non-negative.");
src\Framework\MS\Internal\Text\TypographyProperties.cs (2)
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 (9)
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");
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 (2)
168Debug.Assert(loadedPending != null && loadedPending.Length == 3, 205Debug.Assert(unloadedPending != null && unloadedPending.Length == 3,
src\Framework\System\Windows\Controls\AVElementHelper.cs (1)
65Debug.Assert((element != null), "Element is null");
src\Framework\System\Windows\Controls\ComboBox.cs (4)
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\ContextMenu.cs (1)
493Debug.Assert(_parentPopup == null, "_parentPopup should be null");
src\Framework\System\Windows\Controls\DataGrid.cs (14)
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."); 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 (17)
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"); 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 (2)
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 (15)
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."); 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"); 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");
src\Framework\System\Windows\Controls\DataGridColumnHeaderCollection.cs (1)
51Debug.Assert(e.Property == DataGridColumn.HeaderProperty, "We only want to know about the header property changing");
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\DataGridRow.cs (2)
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\Grid.cs (1)
2453Debug.Assert(!def.IsShared, "*-defs cannot be shared");
src\Framework\System\Windows\Controls\GridSplitter.cs (2)
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 (12)
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"); 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."); 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 (2)
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 (14)
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"); 2461Debug.Assert(strokes != null 2803Debug.Assert(removeSelectedStrokes || removeSelectedElements, "At least either Strokes or Elements should be removed!");
src\Framework\System\Windows\Controls\InkPresenter.cs (2)
468Debug.Assert(newStrokes != null, "Cannot set a null to InkPresenter"); 499Debug.Assert(addedStrokes != null, "The added StrokeCollection cannot be null.");
src\Framework\System\Windows\Controls\ItemCollection.cs (5)
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 (2)
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");
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 (8)
34Debug.Assert(offset >= 0 && offset <= container.SymbolCount, "Bad PasswordTextPointer offset!"); 58Debug.Assert(!_isFrozen, "Can't reposition a frozen pointer!"); 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\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\DatePickerTextBox.cs (2)
155Debug.Assert( 195Debug.Assert(datePickerTextBox != null, "The source is not an instance of a DatePickerTextBox!");
src\Framework\System\Windows\Controls\Primitives\MenuBase.cs (1)
819Debug.Assert(CheckAccess(), "IsMenuMode requires context access");
src\Framework\System\Windows\Controls\Primitives\Popup.cs (11)
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."); 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\Selector.cs (10)
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"); 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"); 2341Debug.Assert(_active, "There must be a selection change active when you call SelectionChange.End()"); 2375Debug.Assert(_toSelect.Count <= 1, "_toSelect.Count was > 1"); 2552Debug.Assert(info != null, "parameter info should not be null"); 2609Debug.Assert(info != null, "info should not be null");
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\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\TextBlock.cs (4)
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."); 3055Debug.Assert(sender == _complexContent.TextContainer, "Received text change for foreign TextContainer."); 3435Debug.Assert(DoubleUtil.AreClose(lineHeight, lineMetrics.Height), "Line height is out of sync.");
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 (20)
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."); 1641Debug.Assert(list != null, "list should not be null.");
src\Framework\System\Windows\Controls\VirtualizingStackPanel.cs (65)
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"); 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"); 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"); 9245Debug.Assert(!InRecyclingMode, "This method only applies to standard virtualization"); 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\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 (4)
595Debug.Assert(_newItemIndex != -2 && newItem == _newItem, "AddNew did not raise expected events"); 628Debug.Assert(_newItemIndex == -2 && _newItem == NoNewItem, "unexpected call to BeginAddNew"); 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\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\XmlDataProvider.cs (1)
288Debug.Assert(_domSetDocument == null, "Should not be possible to be using Source and user-set Doc at the same time.");
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 (3)
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");
src\Framework\System\Windows\Documents\ColumnResizeAdorner.cs (1)
146Debug.Assert(_adornerLayer == null, "Attempt to overwrite existing AdornerLayer!");
src\Framework\System\Windows\Documents\CompositionAdorner.cs (3)
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\DocumentSequenceHighlightLayer.cs (1)
59Debug.Assert(false, "This method is not implemented and not expected to be called.");
src\Framework\System\Windows\Documents\DocumentSequenceTextContainer.cs (1)
459Debug.Assert(false, "should never be here");
src\Framework\System\Windows\Documents\DocumentSequenceTextPointer.cs (5)
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!"); 1109Debug.Assert(false, "invalid TextPointerContext");
src\Framework\System\Windows\Documents\FixedDocument.cs (2)
1148Debug.Assert(!highlightTransitionPosition.IsNull, "Highlight start not followed by highlight end!"); 1164Debug.Assert(!highlightTransitionPosition.IsNull, "Highlight start not followed by highlight end!");
src\Framework\System\Windows\Documents\FixedPage.cs (1)
637Debug.Assert(dpo != null, "GetLinkUri shouldn't be called for non-DependencyObjects.");
src\Framework\System\Windows\Documents\FixedSOMPageConstructor.cs (2)
64Debug.Assert(stroke || fill, "should not be a nop"); 203Debug.Assert(false, "It should not be called");
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 (1)
1221Debug.Assert(!textPointer.IsFrozen, "Can't reposition a frozen pointer!");
src\Framework\System\Windows\Documents\ImmComposition.cs (1)
368Debug.Assert(oldSource == null || newSource == null,
src\Framework\System\Windows\Documents\NullTextContainer.cs (1)
259Debug.Assert(false, "Unexpected call to NullTextContainer.set_TextView!");
src\Framework\System\Windows\Documents\NullTextNavigator.cs (9)
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!");
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\FrameworkElement.cs (7)
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."); 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");
src\Framework\System\Windows\FrameworkElementFactory.cs (3)
714Debug.Assert( treeNodeFO.IsValid || (treeNodeVisual3D != 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 (5)
67Debug.Assert(templatedParent != null, 451Debug.Assert(!_sealed, "call this method before template is sealed"); 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");
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 (18)
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");
src\Framework\System\Windows\Interop\ActiveXHost.cs (21)
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"); 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"); 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"); 1096Debug.Assert(_axInstance != null, "The native control is null");
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\LogicalTreeHelper.cs (1)
449Debug.Assert(parentFE != null || parentFCE != null, "Either parentFE or parentFCE should be non-null");
src\Framework\System\Windows\Markup\Baml2006\Baml2006Reader.cs (1)
2137Debug.Assert(_context.CurrentFrame.XamlType != null, "BAML Xmlns record is only legal between ElementStart and ElementEnd");
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\BamlMapTable.cs (3)
833Debug.Assert(attributeId >= 0, "Known Property Id must be a DependencyProperty."); 1034Debug.Assert(assemblyFullName.Length != 0, "empty assembly"); 1480Debug.Assert(GetHashTableData(stringValue) == null,
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 (9)
1243Debug.Assert(!CurrentContext.CheckFlag(ReaderFlags.NeedToAddToTree), "Failed to add Element to tree before popping stack"); 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"); 2276Debug.Assert(element is DependencyObject, "Guaranteed by PropertyDefinition constructor"); 3494Debug.Assert( CurrentContext.ObjectData == null && CurrentContext.ExpectedType != null, 4292Debug.Assert(!context.CreateUsingTypeConverter, 5060Debug.Assert(false, "The only remaining option is attached property, which is not allowed in xaml for content properties");
src\Framework\System\Windows\Markup\BamlRecords.cs (21)
699Debug.Assert(false,"Assembly, Type and Attribute records are not cached, so don't ask for one."); 724Debug.Assert(false,"Unknown RecordType"); 869set { Debug.Assert (value == -1, "Setting fixed record to an invalid size"); } 878Debug.Assert(false, "Must override RecordType"); 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"); } 2498set { Debug.Assert(value == -1, "Wrong size set for complex prop record"); } 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"); 4952Debug.Assert((propertyMember is MethodInfo) || (propertyMember is PropertyInfo)
src\Framework\System\Windows\Markup\BamlRecordWriter.cs (11)
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"); 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 (2)
143Debug.Assert(null != assemblyName,"assembly name returned from GetBaseElement is null"); 144Debug.Assert(null != typeFullName,"Type name returned from GetBaseElement is null");
src\Framework\System\Windows\Markup\MarkupExtensionParser.cs (1)
1561Debug.Assert(null != info, "No property or method info for field Name");
src\Framework\System\Windows\Markup\Primitives\ElementMarkupObject.cs (3)
961Debug.Assert(typeSerializer != null, "typeSerializer for Enum was null"); 1021Debug.Assert(serializer != null && serializer.CanConvertToString(_object.Instance, _object.Context), 1046Debug.Assert(serializer != null && serializer.CanConvertToString(_object.Instance, _object.Context),
src\Framework\System\Windows\Markup\Primitives\ExtensionSimplifierMarkupObject.cs (2)
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\MarkupWriter.cs (5)
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"); 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\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 (26)
910Debug.Assert(null != attribInfo, "null attribInfo"); 911Debug.Assert(null != currentParentType, "null currentParentType"); 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"); 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\Media\Animation\BeginStoryboard.cs (2)
179Debug.Assert( fe != null || fce != null, "Caller of internal function failed to verify that we have a FE or FCE - we have neither." ); 198Debug.Assert( fe != null, "Invoke needs an object as starting point");
src\Framework\System\Windows\Media\Animation\ControllableStoryboardAction.cs (3)
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, 81Debug.Assert( fe != null, "Invoke needs an object as starting point");
src\Framework\System\Windows\Media\Animation\Generated\ThicknessAnimationUsingKeyFrames.cs (6)
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\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 (8)
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 (6)
298Debug.Assert(!(journalEntry.IsAlive() && journalEntry.JEGroupState.JournalDataStreams != null), 328Debug.Assert(_uncommittedCurrentIndex == _currentEntryIndex, 441Debug.Assert(IsNavigable(target), "target must be navigable"); 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");
src\Framework\System\Windows\Navigation\JournalEntry.cs (1)
307Debug.Assert(!_jeGroupState.JournalDataStreams.HasAnyData,
src\Framework\System\Windows\Navigation\NavigationService.cs (15)
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"); 766Debug.Assert(ChildNavigationServices.Contains(ncChild), "Child NavigationService must already exist"); 829Debug.Assert(fe != null, "INavigatorHost needs to be FrameworkElement"); 1297Debug.Assert(bpu == null || 1327Debug.Assert(navMode == NavigationMode.Refresh, 2121Debug.Assert(PendingNavigationList.Count == 0, 2231Debug.Assert(this.Application != null && 2286Debug.Assert(source == null || 2336Debug.Assert(PendingNavigationList.Count == 0, 2346Debug.Assert(_navigateQueueItem == null, "Previous nav queue item should be cleared by now."); 3345Debug.Assert(navigationMode == NavigationMode.New || 4005Debug.Assert(_navigateQueueItem == null, 4805Debug.Assert(node != null, "Trying to dispose a null Logical Tree Node");
src\Framework\System\Windows\Navigation\NavigationWindow.cs (8)
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\ResourceDictionary.cs (6)
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."); 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"); 1760Debug.Assert(resourceKey != null, "ResourceKey cannot be null");
src\Framework\System\Windows\ResourceDictionaryCollection.cs (1)
14Debug.Assert(owner != null, "ResourceDictionaryCollection's owner cannot be null");
src\Framework\System\Windows\ResourceReferenceExpression.cs (1)
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");
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\StaticResourceExtension.cs (1)
255Debug.Assert(ambientList != null, "IAmbientProvider.GetAllAmbientValues no longer returns List<>, please copy the list");
src\Framework\System\Windows\Style.cs (2)
367Debug.Assert(resourceKey != null, "Argument cannot be null"); 659Debug.Assert(setterBase != null, "Setter collection must contain non-null instances of SetterBase");
src\Framework\System\Windows\StyleHelper.cs (39)
723Debug.Assert(freezable.IsFrozen, "Freezable within a Style or Template should have been frozen by now"); 1133Debug.Assert(action.IsSealed, "TriggerAction should have already been sealed by this point."); 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."); 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), 2065Debug.Assert( feWalkNode != null || fceWalkNode != null, 2138Debug.Assert(feContainer != null || fceContainer != null, 2157Debug.Assert(templatedChildren.Count > 0, 2401Debug.Assert(sender is FrameworkElement || sender is FrameworkContentElement, 2456Debug.Assert(sender is FrameworkElement || sender is FrameworkContentElement, 2490Debug.Assert(templatedParentTemplate != null, "Must have a VisualTree owner"); 2535Debug.Assert(action.ContainingTrigger is EventTrigger, 2626Debug.Assert(child.IsValid, "child should either be an FE or an FCE"); 2978Debug.Assert(value != NotYetApplied, "attempt to retrieve instance value that was never set"); 3499Debug.Assert( oldTemplate == null || oldTemplate is FrameworkTemplate, 3501Debug.Assert( newTemplate == null || newTemplate is FrameworkTemplate, 3503Debug.Assert( (oldTemplate == null || newTemplate == null ) || 4091Debug.Assert(styledChildren != null, "Should reach here only if the template tree has already been created"); 4220Debug.Assert(dp != null, "dp must not be null"); 4352Debug.Assert(candidateTrigger is List<TriggerBase>, "Internal data structure error: The FrugalMap [Style/Template].PropertyTriggersWithActions " + 4453Debug.Assert( triggerBase is MultiDataTrigger, 4489Debug.Assert( triggerBase is MultiTrigger, 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 " + 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 (1)
363Debug.Assert(typeKey != null || resourceKey != null, "typeKey or resourceKey should be non-null");
src\Framework\System\Windows\TemplateContent.cs (1)
649Debug.Assert(iReader != null, "Template's Reader is not a Indexing Reader");
src\Framework\System\Windows\TemplateNameScope.cs (2)
54Debug.Assert(templatedParent == null || (templatedParent is FrameworkElement || templatedParent is FrameworkContentElement), 202Debug.Assert(false, "Should never be trying to unregister via this interface for templates");
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 (1)
59Debug.Assert(d != null, "Must have non-null current node");
src\Framework\System\Windows\TreeWalkHelper.cs (13)
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"); 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\TriggerBase.cs (1)
377Debug.Assert( false,
src\Framework\System\Windows\Window.cs (41)
405Debug.Assert(_threadWindowHandles == null, "_threadWindowHandles must be null before enumerating the thread windows"); 1426Debug.Assert( IsSourceWindowNull == false , "IsSourceWindowNull cannot be true when _showingAsDialog is true"); 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"); 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."); 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\XamlFrame.cs (1)
40Debug.Assert(_depth != -1, "Context Frame is uninitialized");
PresentationFramework.Aero (3)
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.");
PresentationFramework.Classic (21)
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.");
PresentationFramework.Luna (3)
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.");
PresentationFramework.Royale (3)
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.");
System (401)
compmod\microsoft\visualbasic\VBCodeProvider.cs (1)
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 (4)
751Debug.Assert(windowHandle != IntPtr.Zero, "CreateBroadcastWindow failed"); 765Debug.Assert(threadCallbackList != null, "Invoking marshaled callbacks before there are any"); 827Debug.Assert(threadCallbackMessage != 0, "threadCallbackList initialized but threadCallbackMessage not?"); 1484Debug.Assert(false, "Exception occurred while freeing memory: " + 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\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\Container.cs (1)
186Debug.Assert(filteredComponents != null, "Incorrect ContainerFilterService implementation.");
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\design\DesignerTransaction.cs (2)
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 (1)
75System.Diagnostics.Debug.Assert(fileName != null && fileName.Length > 0, "Cannot get local path, fileName is not valid");
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 (1)
54Debug.Assert(context != null, "No context provided!");
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 (14)
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."); 2572Debug.Assert(input != null, "null input."); 2573Debug.Assert( position >= 0, "Position out of range." );
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 (10)
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"); 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 (6)
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"); 931Debug.Assert(component != null, "GetValue must be given a component"); 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 (8)
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"); 816Debug.Assert(objectType != null, "Should have arg-checked before coming in here"); 1679Debug.Assert(_converter != null, "There is no intrinsic setup in the hashtable for the Object type");
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 (15)
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 + "'"); 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"); 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."); 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\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 (1)
50Debug.Assert(pStandardMarshal != null, "Failed to get marshaler for interface '" + riid.ToString() + "', CoGetStandardMarshal returned S_OK");
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 (15)
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\_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\_NetworkingPerfCounters.cs (1)
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\_SecureChannel.cs (1)
1015Debug.Assert(setError == 0, "SetContextAttributes error: " + setError);
net\System\Net\_SSPIWrapper.cs (1)
647Debug.Assert(value is IntPtr, "Type Mismatch");
net\System\Net\_WebProxyDataBuilder.cs (1)
50Debug.Assert( (m_Result.proxyAddress != null || m_Result.proxyHostAddresses != null),
net\System\Net\AuthenticationManager.cs (1)
265Debug.Assert(signature.ToLowerInvariant().Equals(signature, StringComparison.Ordinal),
net\System\Net\Cache\_CacheStreams.cs (1)
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 (1)
791Debug.Assert(m_RequestLifetimeSetter == null, "TrackRequestLifetime called more than once.");
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 (3)
371Debug.Assert(UnsafeNclNativeMethods.HttpApi.ApiVersion == 550Debug.Assert(m_TimeoutManager != null, "Timeout manager is not assigned"); 1992Debug.Assert(context != null, "Null Context");
net\System\Net\HttpListenerRequestUriBuilder.cs (16)
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"); 485Debug.Assert(path != null, "'path' must not be null");
net\System\Net\HttpListenerTimeoutManager.cs (2)
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 (5)
2307Debug.Assert(tracker != null, "All streams returned by HttpWebRequest must implement IRequestLifetimeTracker"); 4495Debug.Assert(result, "StartResponseWait failed."); 4506Debug.Assert(m_ContinueTimer == null, "Continue timer is already set"); 4517Debug.Assert(false, "StartAsync100ContinueTimer failed."); 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 (4)
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");
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 (5)
36Debug.Assert(index == -1, "The index indicates that part of the address was not parsed: " + index); 51Debug.Assert(index == -1 || data[index] == MailBnfHelper.Comma, 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\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\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 (7)
222Debug.Assert(!String.IsNullOrEmpty(offset), 225Debug.Assert(offset != unknownTimeZoneDefaultOffset, 228Debug.Assert(offset.StartsWith("-") || offset.StartsWith("+"), 265Debug.Assert(!String.IsNullOrEmpty(value), 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\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 (4)
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.");
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 (1)
1026Diagnostics.Debug.Assert(false, "ServicePoint; Too many decrements.");
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\WebUtility.cs (3)
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");
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 (7)
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"); 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),
services\io\system\io\FileSystemWatcher.cs (5)
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?");
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\EventLogInternal.cs (2)
1418Debug.Assert(!boolFlags[Flag_registeredAsListener], "StartListening called with boolFlags[Flag_registeredAsListener] true."); 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 (3)
159Debug.Assert(SyntaxCheck.CheckMachineName(machineName), "The machine name should be valid!"); 1407Debug.Assert(haveProcessHandle, "Process.EnsureWatchingForExit called with no process handle"); 1408Debug.Assert(Associated, "Process.EnsureWatchingForExit called with no associated process");
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 (2)
478Debug.Assert((observedAdders + 1) <= (~COMPLETE_ADDING_ON_MASK), "The number of concurrent adders thread excceeded the maximum limit."); 1218Debug.Assert((returnValue >= 0 && returnValue < collections.Length)
sys\system\configuration\ApplicationSettingsBase.cs (1)
631Debug.Assert(provider != null, "Could not determine provider from which settings were loaded");
sys\system\configuration\ClientSettingsStore.cs (2)
76Debug.Assert(settingsGroup != null, "Failed to declare settings group"); 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\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 (7)
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 ||
sys\System\IO\compression\DeflateStream.cs (1)
52Debug.Assert(reader != null, "The IFileFormatReader passed to the internal DeflateStream constructor must be non-null");
sys\System\IO\compression\FastEncoder.cs (3)
40Debug.Assert(InputAvailable(input), "call SetInput before trying to compress!"); 135Debug.Assert(matchLen >= FastEncoderWindow.MinMatch && matchLen <= FastEncoderWindow.MaxMatch, "Illegal currentMatch length!"); 141Debug.Assert(codeLen != 0, "Invalid Match Length!");
sys\System\IO\compression\FastEncoderStatics.cs (1)
220Debug.Assert(length > 0 && length <= 16, "Invalid len");
sys\System\IO\compression\FastEncoderWindow.cs (12)
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!"); 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 (5)
364Debug.Assert(false, "check why we are here!"); 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 (3)
25Debug.Assert(bytesUsed < WindowSize, "Can't add byte when window is full!"); 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");
System.Activities.Presentation (2)
Microsoft.Tools.Common\Microsoft\Activities\Presentation\ExpressionSettingHelper.cs (2)
24Debug.Assert(modelTreeManager != null, "modelTreeManager is null."); 25Debug.Assert(targetFramework != null, "targetFramework is null.");
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 (215)
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\DynamicObject.cs (1)
730Debug.Assert(Restrictions == BindingRestrictions.Empty, "We don't merge, restrictions are always empty");
Microsoft\Scripting\Actions\ExpandoObject.cs (1)
898Debug.Assert(Restrictions == BindingRestrictions.Empty, "We don't merge, restrictions are always empty");
Microsoft\Scripting\Ast\TypeUtils.cs (1)
43Debug.Assert(type != null, "type cannot be null");
Microsoft\Scripting\Compiler\LambdaCompiler.cs (2)
292Debug.Assert(_hasClosureArgument, "must have a Closure argument"); 293Debug.Assert(_method.IsStatic, "must be a static method");
Microsoft\Scripting\Compiler\LambdaCompiler.Expressions.cs (2)
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.");
Microsoft\Scripting\Compiler\LambdaCompiler.Logical.cs (2)
284Debug.Assert(opFalse != null, "factory should check that the method exists"); 411Debug.Assert(opTrue != null, "factory should check that the method exists");
Microsoft\Scripting\Compiler\StackSpiller.cs (6)
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");
Microsoft\Scripting\Utils\ContractUtils.cs (1)
35Debug.Assert(false, "Unreachable");
Microsoft\Win32\SafeHandles\CapiSafeHandles.cs (1)
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 (10)
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"); 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\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 (11)
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 (4)
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"); 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\Pipe.cs (13)
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!"); 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 (1)
79Debug.Assert(false, "ArrayMergeHelper<>.GetEnumerator() is not intended to be used. Call GetResultsAsArray() instead.");
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 (2)
507Debug.Assert(getter != null, "Unknown handle type"); 518Debug.Assert(bufferSize > 0, "bufferSize > 0");
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 (1)
152Debug.Assert(false, "Illegal key size set");
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\RsaCng.cs (1)
111Debug.Assert(value != null, "value != null");
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 (1)
114Debug.Assert(SignatureChain.ChainElements.Count > 0, "SignatureChain.ChainElements.Count > 0");
System\Security\Cryptography\X509Certificates\TimestampInformation.cs (1)
40Debug.Assert(error != SignatureVerificationResult.Valid, "error != SignatureVerificationResult.Valid");
System\Security\Cryptography\X509Certificates\X509Native.cs (15)
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,
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 (4)
632Debug.Assert(_numWriteUpgradeWaiters == 0, "There can be at most one thread with the upgrade lock held."); 860Debug.Assert(_owners > 0, "ReleasingReaderLock: releasing lock and no read lock taken"); 914Debug.Assert((_owners & WRITER_HELD) > 0, "Calling ReleaseWriterLock when no write lock is held"); 1704Debug.Assert(_isLocked != 0, "Exiting spin lock that is not held");
System.Data (2293)
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.");
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 (2)
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");
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\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\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 (51)
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!" ); 1636Debug.Assert( false, "Unvalidated extendedtypecode: " + typeCode ); 1657Debug.Assert((ExtendedClrTypeCode.DataTable != typeCode && 1692Debug.Assert( (ExtendedClrTypeCode.DataTable != typeCode && 1835Debug.Assert( false, "unsupported DbType:" + metaData[i].SqlDbType.ToString() ); 2027Debug.Assert(false, "unsupported DbType:" + metaData[i].SqlDbType.ToString()); 2148Debug.Assert( false, "unsupported DbType:" + metaData[i].SqlDbType.ToString() ); 2309Debug.Assert(false, "unsupported DbType:" + metaData[i].SqlDbType.ToString()); 2381Debug.Assert(t != null, "Unexpected null of udtType on GetUdt_LengthChecked!"); 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" ); 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" ); 2849Debug.Assert( 0 > maxLength || 0 > actualLength || 2855Debug.Assert(length >= 0, "result < 0, actualLength/fieldOffset problem?"); 2859Debug.Assert(length >= 0, "Result < 0, maxlen/fieldoffset problem?"); 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)); 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)); 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 (15)
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");
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 (14)
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"); 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"); 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");
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 (2)
262Debug.Assert(constraint != null, "Attempt to add null constraint to constraint array"); 507Debug.Assert(a1 != null && a2 != null, "Invalid Arguments");
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 (38)
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 (2)
489Debug.Assert(col.Computed, "invalid (non an expression) column in the expression dependent columns"); 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\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 (7)
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 (48)
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"); 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"); 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"); 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"); 6031Debug.Assert(table.rowDiffId == null, "rowDiffId wasn't previously cleared"); 6082Debug.Assert(_targetDS == null, "do not reuse this section"); 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 (1)
557Debug.Assert(_list.Count == tableList.Count, "Both lists should have equal numbers of tables");
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\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 (22)
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"); 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\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 (1)
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 (34)
80Debug.Assert(null != pool, "null pool?"); 102Debug.Assert(null != transaction, "null transaction?"); 145Debug.Assert(null != transaction, "null transaction?"); 146Debug.Assert(null != transactedObject, "null transactedObject?"); 164Debug.Assert(0 > connections.IndexOf(transactedObject), "adding to pool a second time?"); 200Debug.Assert(0 > connections.IndexOf(transactedObject), "adding to pool a second time?"); 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"); 818Debug.Assert(oldConnectionPool._state == State.ShuttingDown, "Old connections pool should be shutting down"); 864Debug.Assert(timerIsNotDisposed, "ErrorCallback timer has been disposed"); 948Debug.Assert ( _transactedConnectionPool != null, "Transacted connection pool was not expected to be null."); 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 (2)
72Debug.Assert(context1 != null, "context1 should not be null."); 73Debug.Assert(context2 != null, "context2 should not be null.");
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\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\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 (23)
21Debug.Assert(column != null, "null column"); 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 (1)
81Debug.Assert(false, "GetDataSources:SNIServerEnumRead returned bad length");
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 (6)
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"); 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");
fx\src\data\System\Data\SqlClient\SqlBuffer.cs (27)
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?"); 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 (37)
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?"); 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 ]"); 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"); 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"); 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 (1)
59Debug.Assert(metadata.metaType.IsPlp, "SqlCachedBuffer call on a non-plp data");
fx\src\data\System\Data\SqlClient\SqlClientEncryptionAlgorithmFactoryList.cs (1)
72Debug.Assert (null != factory, "Null Algorithm Factory class detected");
fx\src\data\System\Data\SqlClient\SqlColumnEncryptionCertificateStoreProvider.cs (8)
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."); 512Debug.Assert(certificate.HasPrivateKey, "Attempting to encrypt with cert without privatekey"); 528Debug.Assert(certificate.HasPrivateKey, "Attempting to decrypt with cert without privatekey"); 544Debug.Assert(certificate.HasPrivateKey, "Attempting to sign with cert without privatekey"); 571Debug.Assert(certificate.HasPrivateKey, "Attempting to sign with cert without privatekey");
fx\src\data\System\Data\SqlClient\SqlColumnEncryptionCngProvider.cs (4)
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.");
fx\src\data\System\Data\SqlClient\SqlColumnEncryptionCspProvider.cs (4)
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.");
fx\src\data\System\Data\SqlClient\SqlCommand.cs (110)
214Debug.Assert(activeConnection != null, "Unexpected null connection argument on SetActiveConnectionAndResult!"); 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"); 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" ); 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"); 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."); 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!"); 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"); 4538Debug.Assert(writeTask == null || async, "Returned task in sync mode"); 4578Debug.Assert(async || null == _stateObj, "non-null state object in RunExecuteReader"); 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"); 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"); 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 (1)
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 (17)
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!"); 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 (95)
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?"); 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"); 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 (1)
145Debug.Assert(null != _currentColumnValuesV3, "Attempting to get variant internal storage type without calling GetValue first");
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 (61)
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"); 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."); 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"); 2720Debug.Assert(serverName != null, "server name should never be null"); 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 (13)
80Debug.Assert (buffer2Index > -1 && buffer2Index < buffer2.Length, "invalid index");// bounds on buffer2Index 154Debug.Assert(serverName != null, @"serverName should not be null in EncryptWithKey."); 161Debug.Assert(md.IsAlgorithmInitialized(), "Encryption Algorithm is not initialized"); 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."); 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\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 (7)
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"); 1630Debug.Assert(false, "UnexpectedSmiEvent: "+eventType.ToString()); // Assert here, because these exceptions will most likely be eaten by the server. 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 (314)
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"); 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?"); 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!"); 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"); 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!"); 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"); 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, 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!"); 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)); 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)); 10294Debug.Assert(_size < 0 || _written <= _size, string.Format("Length of data written exceeds specified length. Written: {0}, specified: {1}", _written, _size)); 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!"); 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)); 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"); 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!"); 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 (16)
202Debug.Assert(_columnEncryptionKeyValues != null, "_columnEncryptionKeyValues should already be initialized."); 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 (106)
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"); 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"); 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"); 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");
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 (17)
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); 179Debug.Assert(!MetaType.GetMetaTypeFromSqlDbType(_metaData.SqlDbType, _metaData.IsMultiValued).IsLong, 197Debug.Assert(!_plpUnknownSent, "A plpUnknown has already been sent before setting length to zero."); 203Debug.Assert(!MetaType.GetMetaTypeFromSqlDbType(_metaData.SqlDbType, _metaData.IsMultiValued).IsLong, 266Debug.Assert(!MetaType.GetMetaTypeFromSqlDbType(_metaData.SqlDbType, _metaData.IsMultiValued).IsLong, 286Debug.Assert(!_plpUnknownSent, "A plpUnknown has already been sent before setting length to zero."); 292Debug.Assert(!MetaType.GetMetaTypeFromSqlDbType(_metaData.SqlDbType, _metaData.IsMultiValued).IsLong, 330Debug.Assert(null != _variantType && SqlDbType.NVarChar == _variantType.SqlDbType, "Invalid variant type"); 412Debug.Assert(SqlDbType.Money == _variantType.SqlDbType, "Invalid variant type"); 507Debug.Assert (0 <= dt.days && dt.days <= UInt16.MaxValue, "Invalid DateTime '" + value + "' for SmallDateTime"); 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); 596Debug.Assert(null == _variantType, "Variant type can only be set once"); 597Debug.Assert(value != null &&
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 (1)
495Debug.Assert(path.Length <= MaxWin32PathLength, "GetFullPathName returns path longer than max expected!");
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 (2)
70Debug.Assert(path != null, "path is null?"); 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 (1)
676Debug.Assert( state == ElementState.Defoliated, "Region is accessed using column, but it's state is FOLIATED" );
fx\src\data\System\NewXml\XmlDataDocument.cs (1)
2770Debug.Assert(tableList[readPos] != null, "Temp Array is not supposed to reach to null");
System.Data.DataSetExtensions (5)
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 (2)
92Debug.Assert(!isDataViewable || table != null, "isDataViewable bug table is null"); 120Debug.Assert(null != enumerableRows, "null enumerableRows");
System\Data\LinqDataView.cs (1)
44Debug.Assert(table != null, "null DataTable");
System.Data.Entity (2545)
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 (9)
155System.Diagnostics.Debug.Assert(sign[0] == '-' || sign[0] == '+', "sign symbol must be + or -"); 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"); 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"); 530Debug.Assert(datetimeParts.Length >= 7, "datetime literal value must have at least 7 parts"); 581Debug.Assert(datetimeParts.Length >= 2, "time literal value must have at least 2 parts");
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\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 (6)
137Debug.Assert(argTypesFlat.Count == rank.Length, "argTypesFlat.Count == rank.Length"); 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 (89)
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 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."); 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."); 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"); 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"); 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"); 3773Debug.Assert(aggregates.Any((aggregate) => String.CompareOrdinal(aggregate.Key, groupAggregateVarRef.VariableName) == 0), 3815Debug.Assert(scopeEntry.EntryKind == ScopeEntryKind.SourceVar, "scopeEntry.EntryKind == ScopeEntryKind.SourceVar"); 3859Debug.Assert( 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 (41)
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"); 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"); 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 (17)
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"); 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 (20)
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"); 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 (13)
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 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 (1)
252Debug.Assert(isRefType, "RefColumnMap is not of RefType?");
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 (1)
146Debug.Assert(nested.Depth == this.Depth + 1, "can only nest depth + 1");
System\Data\Common\Internal\Materialization\Shaper.cs (28)
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"); 304Debug.Assert(associationSet != null, "associationSet should not be null"); 350Debug.Assert(false, "Unexpected sourceMember.RelationshipMultiplicity"); 371Debug.Assert(!targetEntry.IsRelationship, "how IsRelationship?"); 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?"); 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 (12)
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? 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); 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");
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 (1)
84Debug.Assert(null != candidates && 1 < candidates.Length, "must be at least one to pick");
System\Data\Common\Utils\Boolean\Solver.cs (13)
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"); 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");
System\Data\Common\Utils\Boolean\Vertex.cs (4)
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");
System\Data\Common\Utils\Boolean\Visitor.cs (3)
130Debug.Assert(null != expression, "expression must be given"); 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\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 (1)
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 (10)
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"); 446Debug.Assert(parentType != null, "Parent type not Entity Type ??"); 494Debug.Assert(!references.Contains(b), "Dictionary already has a --> b reference"); 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"); 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 (4)
306Debug.Assert(!_isReadOnly, "attempting to modify readonly collection"); 312Debug.Assert(other != null, "other set null"); 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\EntityCommand.cs (5)
555Debug.Assert(null != _commandDefinition, "_commandDefinition cannot be null"); 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 (3)
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");
System\Data\EntityClient\EntityDataReader.cs (1)
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\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 (1)
174Debug.Assert(_typeSubElement != null, "For attributes typeusage should have been resolved");
System\Data\EntityModel\SchemaObjectModel\EntityContainer.cs (4)
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 (1)
120Debug.Assert(
System\Data\EntityModel\SchemaObjectModel\EntityContainerAssociationSetEnd.cs (1)
133Debug.Assert(set != null, "set parameter is null");
System\Data\EntityModel\SchemaObjectModel\EntityContainerEntitySet.cs (2)
184Debug.Assert(Schema.DataModel == SchemaDataModelOption.ProviderDataModel, "We shouldn't see this attribute unless we are parsing ssdl"); 196Debug.Assert(Schema.DataModel == SchemaDataModelOption.ProviderDataModel, "We shouldn't see this attribute unless we are parsing ssdl");
System\Data\EntityModel\SchemaObjectModel\EntityContainerRelationshipSet.cs (2)
53Debug.Assert(value != null, "relationship can never be set to 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 (8)
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"); 706Debug.Assert(false, "RemoveTypeModifier already checks for this");
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 (1)
137Debug.Assert(ReturnTypeList.Count == 1, "returnTypeList should always be non-empty. Multiple ReturnTypes are only possible on FunctionImports.");
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\Parameter.cs (3)
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)); 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\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\RelationshipEndCollection.cs (4)
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");
System\Data\EntityModel\SchemaObjectModel\ReturnType.cs (7)
143Debug.Assert(_typeSubElement != null, "Nested type expected."); 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)); 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");
System\Data\EntityModel\SchemaObjectModel\RowTypeElement.cs (1)
112Debug.Assert(Schema.DataModel == SchemaDataModelOption.ProviderDataModel, "Only DataModel == SchemaDataModelOption.ProviderDataModel is expected");
System\Data\EntityModel\SchemaObjectModel\RowTypePropertyElement.cs (2)
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)); 184Debug.Assert(_typeSubElement != null, "For attributes typeusage should have been resolved");
System\Data\EntityModel\SchemaObjectModel\Schema.cs (13)
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"); 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?"); 878Debug.Assert(type.Namespace != this.Namespace, "Using element is not allowed in the schema of ssdl and provider manifest"); 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 (6)
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)); 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 (5)
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"); 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 (2)
87Debug.Assert(errors.Count != 0, "There must be some error encountered"); 297Debug.Assert(schema.DataModel == _dataModel, "DataModel must match");
System\Data\EntityModel\SchemaObjectModel\StructuredProperty.cs (1)
212Debug.Assert(Schema.SchemaVersion != XmlConstants.EdmVersionForV1,
System\Data\EntityModel\SchemaObjectModel\StructuredType.cs (4)
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));
System\Data\EntityModel\SchemaObjectModel\TypeUsageBuilder.cs (3)
374Debug.Assert(primitiveType.PrimitiveTypeKind == PrimitiveTypeKind.Decimal, "Expected decimal type"); 464Debug.Assert(primitiveType.PrimitiveTypeKind == PrimitiveTypeKind.Binary || 495Debug.Assert(Helper.IsSpatialType(primitiveType), "Expected spatial type");
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 (1)
46Debug.Assert(!(type is SchemaEnumType), "Note that enums should have already been handled.");
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\DefaultObjectMappingItemCollection.cs (22)
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"); 450Debug.Assert((edmType.BuiltInTypeKind == objectType.BuiltInTypeKind), "The BuiltInTypeKind must be same in LoadObjectMapping"); 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"); 695Debug.Assert(objectEnumType != null, "objectEnumType != null"); 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 (35)
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."); 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 (5)
35Debug.Assert(!functionImport.IsComposableAttribute, "!functionImport.IsComposableAttribute"); 36Debug.Assert(!targetFunction.IsComposableAttribute, "!targetFunction.IsComposableAttribute"); 71Debug.Assert(resultSetIndex >= 0, "resultSetIndex >= 0"); 74Debug.Assert(this.ResultMappings.Count == 1, "this.ResultMappings.Count == 1"); 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 (3)
28Debug.Assert(clrType.BuiltInTypeKind == cdmType.BuiltInTypeKind, "BuiltInTypeKind must be the same for both types"); 131Debug.Assert(memberMapping.ClrMember.Name == memberMapping.EdmMember.Name, 136Debug.Assert(!Type.ReferenceEquals(m_memberMapping, EmptyMemberMapping),
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\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 (2)
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");
System\Data\Mapping\StorageMappingItemCollection.cs (20)
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."); 894Debug.Assert(edmItemCollection != null && storeItemCollection != null && errorCollection != null, "The parameters must not be null in CheckForDuplicateItems");
System\Data\Mapping\StorageMappingItemCollection.ViewDictionary.cs (6)
117Debug.Assert(extentMappingViews.Count > 0, "view should be generated at this point"); 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 (27)
129Debug.Assert(m_currentNamespaceUri == StorageMslConstructs.NamespaceUriV3, "Did you add a new Namespace?"); 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"); 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"); 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"); 3271Debug.Assert(clrMemberType != null, "Scalar Types should have associated clr type"); 3597Debug.Assert( 3600Debug.Assert(Helper.IsPrimitiveType(columnMember.TypeUsage.EdmType), "s-space column type must be primitive"); 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 (2)
59Debug.Assert( 62Debug.Assert(Helper.IsPrimitiveType(columnMember.TypeUsage.EdmType), "StorageScalarPropertyMapping must only map primitive types");
System\Data\Mapping\StorageSetMapping.cs (1)
232Debug.Assert(!m_typeSpecificQueryViews.ContainsKey(key), "Query View already present for the given 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 (1)
30Debug.Assert(null != stateEntry, "stateEntry must not be null");
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 (3)
67Debug.Assert(null != setMapping && null != setMapping.ModificationFunctionMappings && 150Debug.Assert(-1 != toOrdinal, "to end of relationship doesn't exist in record"); 335Debug.Assert(2 == parameterBinding.MemberPath.Members.Count, "relationship parameter binding member " +
System\Data\Mapping\Update\Internal\FunctionUpdateCommand.cs (2)
162Debug.Assert(rowsAffectedParameter.Mode == ParameterMode.Out || rowsAffectedParameter.Mode == ParameterMode.InOut, 363Debug.Assert(!object.ReferenceEquals(this, otherCommand), "caller should ensure other command is different");
System\Data\Mapping\Update\Internal\KeyManager.cs (2)
87Debug.Assert(PropagatorResult.NullIdentifier != owner.Identifier, "invalid operation for a " + 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 (10)
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"); 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 (3)
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 &&
System\Data\Mapping\Update\Internal\Propagator.JoinPropagator.JoinPredicateVisitor.cs (1)
93Debug.Assert(leftKeySelectors.Count == rightKeySelectors.Count,
System\Data\Mapping\Update\Internal\RelationshipConstraintValidator.cs (4)
77Debug.Assert(null != (object)stateEntry.EntityKey, "entity state entry must have an entity key"); 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");
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 (1)
118Debug.Assert(constraintFound && null != target && null != source, "relationship set must have at least one constraint");
System\Data\Mapping\Update\Internal\UpdateCompiler.cs (6)
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"); 438Debug.Assert(Helper.IsPrimitiveType(property.TypeUsage.EdmType), "Properties in SSpace should be primitive."); 464Debug.Assert(Nullable.GetUnderlyingType(principalValue.GetType()) == null, "Unexpected nullable type.");
System\Data\Mapping\Update\Internal\UpdateTranslator.cs (11)
347Debug.Assert(BuiltInTypeKind.RefType == role.TypeUsage.EdmType.BuiltInTypeKind, 350Debug.Assert(BuiltInTypeKind.EntityType == endType.ElementType.BuiltInTypeKind, 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 (1)
35Debug.Assert(null != mappingCollection, "mapping collection required");
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 (5)
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");
System\Data\Mapping\ViewGeneration\CellTreeSimplifier.cs (8)
62Debug.Assert(rootNode.OpType == CellTreeOpType.LOJ || rootNode.OpType == CellTreeOpType.IJ || 72Debug.Assert(children.Count > 0, "OpCellTreeNode has no children?"); 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)"); 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");
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\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\QueryRewriter.cs (6)
446Debug.Assert(nonConditionalAttributes.Count > 0, "Must have caught key-only case earlier"); 604Debug.Assert(_context.ViewTarget == ViewTarget.UpdateView, "Used for update views only"); 611Debug.Assert(unionCaseRewriting != null, "No union of rewritings for case statements"); 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");
System\Data\Mapping\ViewGeneration\QueryRewriting\RewritingValidator.cs (3)
70Debug.Assert(complementSQueryTreeForCondition != null, "Rewriting for S-side query is unsatisfiable"); 106Debug.Assert(plainSQueryTreeForCondition != null, "Rewriting for S-side query is unsatisfiable"); 296Debug.Assert(constant is ScalarConstant || constant.IsNull() || constant is NegatedConstant, "Invalid type of constant");
System\Data\Mapping\ViewGeneration\Structures\BoolExpression.cs (1)
426Debug.Assert(domainMap != null, "Member domain map is not set");
System\Data\Mapping\ViewGeneration\Structures\BoolExpressionVisitors.cs (5)
136Debug.Assert(result == isChildFinal, "All children must be final or non-final"); 350Debug.Assert(cqt != null, "AND must have at least one child"); 357Debug.Assert(cqt != null, "OR must have at least one child"); 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 (10)
103Debug.Assert(!m_simplified, "Attempt to modify a simplified case statement"); 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\CellQuery.cs (17)
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"); 600Debug.Assert(slotIndexes.Count == 1, "Expecting the path to be projected only once"); 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 (5)
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"); 253Debug.Assert(Object.ReferenceEquals(this, Instance), "this must be == Instance for NullConstant"); 324Debug.Assert(Object.ReferenceEquals(this, Instance), "this must be == Instance for NullConstant");
System\Data\Mapping\ViewGeneration\Structures\ConstantProjectedSlot.cs (1)
31Debug.Assert(value.IsNotNull() == false, "Cannot store NotNull in a slot - NotNull is only for conditions");
System\Data\Mapping\ViewGeneration\Structures\Domain.cs (8)
139Debug.Assert(Helper.AsPrimitive(type).PrimitiveTypeKind == PrimitiveTypeKind.Boolean, "Only boolean type has discrete domain."); 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 (2)
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 (4)
75Debug.Assert(m_rightFragmentQuery != null, "Unassigned right fragment query"); 133Debug.Assert(cellQuery.NumProjectedSlots + cellQuery.NumBoolVars == totalSlots, 136Debug.Assert(cellQuery.NumProjectedSlots == ProjectedSlotMap.Count, 234Debug.Assert(scalarPropertyMaps.Count() == 1, "Can't Map the same column multiple times in the same end");
System\Data\Mapping\ViewGeneration\Structures\LeftCellWrapper.cs (3)
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\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 (4)
57Debug.Assert(m_domain.Count != 0, "If you want a boolean that evaluates to false, " + 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 (2)
33Debug.Assert(!values.Any(v => v is NegatedConstant), "Negated constant values must not contain another negated constant."); 181Debug.Assert(negatedConstants.Contains(constant), "Negated constant must contain all positive constants");
System\Data\Mapping\ViewGeneration\Structures\OpCellTreeNode.cs (9)
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?"); 266Debug.Assert(totalSlots == child.NumBoolSlots + child.NumProjectedSlots, 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");
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\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\ExtentKey.cs (1)
68Debug.Assert(keyMember != null, "Bogus key member in metadata");
System\Data\Mapping\ViewGeneration\Validation\ForeignConstraint.cs (7)
293Debug.Assert(childEnd == null || parentEnd != childEnd, 626Debug.Assert(context.Extent.Equals(extent), "ViewgenContext extent and expected extent different"); 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!");
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\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 (1)
295Debug.Assert(alignedCells.Count == extentCellsList.Count, "Cell counts disagree");
System\Data\Mapping\ViewGeneration\ViewGenerator.cs (4)
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 (5)
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"); 163Debug.Assert(cells.Count > 0, "There must be at least one cell in the container mapping"); 194Debug.Assert(exception.ErrorLog.Count > 0, "Incorrectly created mapping exception");
System\Data\Metadata\AspProxy.cs (2)
131Debug.Assert(path != null, "path == null"); 157Debug.Assert(miMapPath != null, "Unpexpected missing member in type System.Web.Hosting.HostingEnvironment");
System\Data\Metadata\CacheForPrimitiveTypes.cs (2)
98Debug.Assert(type == null, "type must be null here"); 182Debug.Assert(false, "Unexpected facet");
System\Data\Metadata\Converter.cs (21)
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."); 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, 501Debug.Assert(associationType.ReferentialConstraints.Count == 0, "This must never have been initialized"); 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"); 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\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 (4)
94Debug.Assert(Helper.IsEdmProperty(member) || Helper.IsNavigationProperty(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 (11)
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"); 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 (2)
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");
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 (1)
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 (2)
89Debug.Assert(item.IsReadOnly, "The item is not readonly, it should be by the time it is added to the item collection"); 208Debug.Assert(_itemsCache != null, "check the initialization of the Memoizer");
System\Data\Metadata\Edm\LightweightCodeGenerator.cs (8)
44Debug.Assert(null != getter, "null getter"); 86Debug.Assert(null != setter, "null setter"); 102Debug.Assert(null != getRelatedEnd, "null getRelatedEnd"); 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."); 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 (6)
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"); 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\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 (1)
457System.Diagnostics.Debug.Assert(false, "Unexpected type found in entity data reader");
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 (13)
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"); 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 (1)
417Debug.Assert(false, "Invalid DataSpace specified.");
System\Data\Metadata\MetadataArtifactLoaderCompositeFile.cs (1)
182Debug.Assert(false, "Invalid DataSpace value.");
System\Data\Metadata\MetadataArtifactLoaderCompositeResource.cs (1)
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 (1)
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 (13)
137Debug.Assert(XmlConstants.SchemaVersionLatest == XmlConstants.EdmVersionForV3, "Did you add a new version?"); 242Debug.Assert(collection.DataSpace == DataSpace.OCSpace, "Invalid DataSpace Enum value: " + collection.DataSpace); 400Debug.Assert(null != type, "null type"); 448Debug.Assert(null != type, "null type"); 1001Debug.Assert( 1027Debug.Assert( 1118Debug.Assert( 1143Debug.Assert( 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 || 1476Debug.Assert(null != _itemsSSpace, "_itemsSSpace must not be null");
System\Data\Metadata\ObjectHelper.cs (11)
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 (19)
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"); 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 (39)
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"); 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"); 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 (3)
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");
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 (2)
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?");
System\Data\Metadata\TypeHelpers.cs (9)
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"); 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 (25)
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"); 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"); 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"); 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");
System\Data\Objects\DataClasses\ComplexObject.cs (8)
42Debug.Assert(null != parent, "Attempt to attach to a null parent"); 43Debug.Assert(null != parentPropertyName, "Must provide parentPropertyName in order to attach"); 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 (13)
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."); 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 (9)
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."); 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 (39)
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."); 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"); 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 (4)
433Debug.Assert(leftSpan != null || rightSpan != null, "Span mappings contain null?"); 725Debug.Assert(availableParams != null, "Parameter collection cannot be null"); 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 (3)
112Debug.Assert(null != other, "must not use a null key"); 471Debug.Assert(propertyTranslatorResults.Count > 1, "no properties?"); 472Debug.Assert(propertyTranslatorResults[1] is CollectionTranslatorResult, "not a collection?");
System\Data\Objects\ELinq\MethodCallTranslator.cs (22)
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"); 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"); 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"); 2332Debug.Assert(TypeSemantics.IsScalarType(element.ResultType), "Primitive or enum type expected at this point.");
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\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 (4)
364Debug.Assert(clrMember is PropertyInfo, "Navigation property was not a property; should not be allowed by metadata."); 387Debug.Assert(null != countMethod, "Count() must exist"); 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 (4)
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 (135)
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 || 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"); 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"); 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."); 2909Debug.Assert(_wrappedEntity.Entity != null, "Cannot attach a null entity to the state manager"); 2923Debug.Assert(entityType != null, "EntityType == null"); 2945Debug.Assert(changed != null, "changed object is null"); 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"); 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"); 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"); 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 (1)
46System.Diagnostics.Debug.Assert(_fieldType != null, "FieldDescriptor's CLR type has unexpected value of null.");
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 (21)
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"); 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 (4)
48Debug.Assert(proxyType != null, "proxyType must be non-null"); 81Debug.Assert(entityWrapperField != null, "entityWrapperField does not exist"); 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 (1)
93Debug.Assert(false, "Method on NullEntityWrapper should not be called");
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 (4)
59Debug.Assert(_originalMergeOption != null, "OriginalMergeOption used before being initialized"); 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."); 344Debug.Assert(this.ProcessedEntities != null, "ProcessedEntities should not be null");
System\Data\Objects\ObjectContext.cs (54)
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."); 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!"); 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 (140)
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."); 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."); 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) || 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 (6)
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?"); 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 (9)
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"); 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 (3)
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.");
System\Data\Query\InternalTrees\OpCopier.cs (4)
448Debug.Assert(op.EntitySet == null, "op.EntitySet must be null for the constructor that hasn't been scoped yet."); 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" );
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 (4)
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");
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 (2)
68Debug.Assert(newNode == currentNode, "Liar! This rule should have returned 'true'"); 96Debug.Assert(loopCount < 12, "endless loops?");
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\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 (6)
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.
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 (2)
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 (5)
156Debug.Assert(!first, "if useGeneratedValuesVariable is true, it implies some columns do not have values"); 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\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 (22)
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"); 592Debug.Assert(this.SqlVersion != SqlVersion.Sql8, "DbApplyExpression when translating for SQL Server 2000."); 971Debug.Assert(precision > 0, "Precision must be greater than zero"); 1218Debug.Assert(this.SqlVersion != SqlVersion.Sql8, "DbExceptExpression when translating for SQL Server 2000."); 1567Debug.Assert(this.SqlVersion != SqlVersion.Sql8, "DbIntersectExpression when translating for SQL Server 2000."); 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"); 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"); 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"); 4228Debug.Assert(mappedType != null, "Could not get type usage for primitive type");
System\Data\SqlClient\SqlGen\SqlSelectClauseBuilder.cs (1)
54Debug.Assert(m_top == null, "SqlSelectStatement.Top has already been set");
System\Data\SqlClient\SqlProviderManifest.cs (5)
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"); 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 (5)
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?"); 653Debug.Assert(type.EdmType.BuiltInTypeKind == BuiltInTypeKind.PrimitiveType && 687Debug.Assert(type.EdmType.BuiltInTypeKind == BuiltInTypeKind.PrimitiveType &&
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 (1)
40Debug.Assert(getSqlTypes != null, "Validate SqlTypes assembly delegate before constructing SqlSpatialServiceS");
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 (19)
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?"); 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 (198)
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 (12)
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."); 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 (3)
199Debug.Assert(args.Length > 0, "Formatting utilities must be called with at least one argument"); 245Debug.Assert(e != null, "Unexpected null exception!"); 276Debug.Assert(count != 0, "Empty Error List");
System\Data\Entity\Design\Common\OneToOneMappingSerializer.cs (19)
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)"); 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 (20)
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"); 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");
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 (6)
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"); 494Debug.Assert(csdlNamespaceName != null, "csdlNamespaceName is null");
System\Data\EntityModel\Emitters\CommentEmitter.cs (7)
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");
System\Data\EntityModel\Emitters\EntityContainerEmitter.cs (4)
282Debug.Assert(set != null, "Field is Null"); 308Debug.Assert(set != null, "Property is Null"); 425Debug.Assert(set != null, "Property is Null"); 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 (7)
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))) 603Debug.Assert(types.NonNullable != null && types.Nullable != null, "did you forget to set the types variable?"); 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 (7)
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");
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 (13)
ChangeDirector.cs (1)
285System.Diagnostics.Debug.Assert(item.IsNew || item.IsPossiblyModified, "AutoSyncMembers should only be called for new and modified objects.");
ChangeProcessor.cs (5)
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.");
IdentityManager.cs (1)
173System.Diagnostics.Debug.Assert(this.offset < values.Length, "offset is outside the bounds of the values array");
Mapping\MappingSource.cs (2)
295System.Diagnostics.Debug.Assert(false, "DatabaseMapping has no content"); 461System.Diagnostics.Debug.Assert(false, "Table has no content");
SqlClient\Common\SqlFactory.cs (1)
364System.Diagnostics.Debug.Assert(!targetSqlType.IsRuntimeOnlyType, "Attempted coversion to a runtime type: from = " + expression.SqlType.ToQueryString() + "; to = " + targetSqlType.ToQueryString() + "; source = " + sourceExpression.ToString());
SqlClient\Query\QueryConverter.cs (1)
2715System.Diagnostics.Debug.Assert(this.IdentityMembers == null, "We already have a set of keys -- why are we adding more?");
SqlClient\Query\SqlBinder.cs (1)
520System.Diagnostics.Debug.Assert(false, "Don't know how to apply 'as' to " + target.NodeType);
SqlClient\Query\SqlMethodCallConverter.cs (1)
2209Debug.Assert(baseClrTypeOfExpr == typeof(DateTimeOffset), "'DateTime' property supported only for instances of DateTimeOffset.");
System.Data.Services (1405)
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\EpmSyndicationContentSerializer.cs (1)
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 (21)
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"); 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 (30)
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."); 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 (784)
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 (3)
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"); 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 (1)
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 (45)
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"); 489Debug.Assert(this.batchState == BatchStreamState.EndChangeSet, "bad changeset boundary state"); 517Debug.Assert(this.batchState == BatchStreamState.EndChangeSet, "bad changeset boundary state"); 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"); 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 (103)
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( 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 (13)
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"); 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 (109)
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 (5)
172Debug.Assert(virtualPath.StartsWith(webReferencesRootVirtualPath, StringComparison.OrdinalIgnoreCase), 179Debug.Assert(string.Equals(webReferencesRootVirtualPath, virtualPath, StringComparison.OrdinalIgnoreCase), 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 (6)
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"); 510Debug.Assert(false, item.BuiltInTypeKind.ToString()); 611Debug.Assert(csdlNamespaceName != null, "csdlNamespaceName is null");
System\Data\EntityModel\Emitters\CommentEmitter.cs (7)
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");
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 (4)
408Debug.Assert(GetAccessibilityRank(accessibility) >= 0, "bad accessibility"); 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 (425)
System\Xml\Xsl\IlGen\GenerateHelper.cs (23)
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."); 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."); 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."); 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.");
System\Xml\Xsl\IlGen\IteratorDescriptor.cs (7)
90Debug.Assert(loc.LocalType == itemStorageType || 106Debug.Assert(locIter.LocalType.GetMethod("get_Current").ReturnType == itemStorageType, 120Debug.Assert(methGlobal.ReturnType == itemStorageType || 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 (4)
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."); 224Debug.Assert(!this.isReadOnly, "This OptimizerPatterns instance is read-only.");
System\Xml\Xsl\IlGen\TailCallAnalyzer.cs (1)
36Debug.Assert(XmlILConstructInfo.Read(nd).PushToWriterLast,
System\Xml\Xsl\IlGen\XmlILConstructAnalyzer.cs (16)
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."); 198Debug.Assert(!this.isReadOnly, "This XmlILConstructInfo instance is read-only."); 219Debug.Assert(!this.isReadOnly, "This XmlILConstructInfo instance is read-only."); 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."); 454default: Debug.Assert(false, ndConstr.NodeType + " is not handled by XmlILStateAnalyzer."); break; 997Debug.Assert(nd.NodeType != QilNodeType.NamespaceDecl || !this.nsmgr.HasNamespace(prefix) || this.nsmgr.LookupNamespace(prefix) == ns,
System\Xml\Xsl\IlGen\XmlILModule.cs (4)
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 (5)
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); 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 (38)
70Debug.Assert(this.iterCurr.Storage.Location == ItemLocation.None, "Root expression should have been pushed to the writer."); 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"); 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, 913Debug.Assert(ndBranch.XmlType.IsSingleton, "Conditional must produce a singleton"); 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"); 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"); 1877Debug.Assert(false, "Pattern " + step.NodeType + " should have been handled."); 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"); 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."); 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."); 3198Debug.Assert(ndVal.Child.XmlType.IsNode, "XPathNodeValue node may only be applied to a sequence of Nodes."); 3390Debug.Assert(ndActualArg.XmlType.IsSubtypeOf(xmlTypeFormalArg), "Xml type of actual arg must be a subtype of the Xml type of the formal arg"); 3507Debug.Assert(XmlILConstructInfo.Read(ndCopyOf).PushToWriterFirst, "XsltCopyOf should always be pushed to writer."); 3811Debug.Assert(ndName.XmlType.TypeCode == XmlTypeCode.QName, "Element or attribute name must have QName type."); 4261Debug.Assert(false, "Cannot map QilNodeType " + typ + " to an XPathNodeType"); 4337Debug.Assert(this.iterCurr.Storage.Location == ItemLocation.None || 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 (3)
222Debug.Assert(arg != null, "Argulent shouldn't be null"); 223Debug.Assert(arg.XmlType.TypeCode == XmlTypeCode.Boolean && arg.XmlType.IsSingleton, 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 (1)
175Debug.Assert(false, message);
System\Xml\Xsl\QIL\QilXmlReader.cs (25)
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 (1)
47Debug.Assert(n >= 0, "n must be nonnegative");
System\Xml\Xsl\QIL\WhitespaceRule.cs (1)
72Debug.Assert(this.GetType() == typeof(WhitespaceRule), "Serialization of WhitespaceRule subclasses is not implemented");
System\Xml\Xsl\Runtime\ContentIterators.cs (1)
379Debug.Assert(false, "Invalid IteratorState " + this.state);
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 (1)
27Debug.Assert(this.constrInfo != null, "The early bound object type " + ebType.FullName + " must have a public default constructor");
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\TreeIterators.cs (1)
843Debug.Assert(this.state == IteratorState.NoNext, "Illegal state: " + this.state);
System\Xml\Xsl\Runtime\XmlAttributeCache.cs (6)
147Debug.Assert(value is XmlAtomicValue, "value should always be an XmlAtomicValue, as XmlAttributeCache is only used by XmlQueryOutput"); 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.");
System\Xml\Xsl\Runtime\XmlCollation.cs (2)
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 (2)
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.");
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\XmlQueryContext.cs (2)
155Debug.Assert(dataSource != null, "GetType() below assumes dataSource is not null"); 182Debug.Assert(uriRelative != null, "Relative URI should not be null");
System\Xml\Xsl\Runtime\XmlQueryOutput.cs (33)
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"); 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."); 493Debug.Assert(this.xstate == XmlState.EnumAttrs, "WriteNamespaceDeclaration cannot be called in the " + this.xstate + " state."); 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."); 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."); 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"); 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"); 1215Debug.Assert(false, xstate.ToString() + " is not a valid XmlState.");
System\Xml\Xsl\Runtime\XmlQueryRuntime.cs (12)
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."); 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);
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 (1)
165Debug.Assert(formatVersion != CurrentFormatVersion || dataReader.Read() == -1, "Extra data at the end of the stream");
System\Xml\Xsl\Runtime\XmlSortKey.cs (2)
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");
System\Xml\Xsl\Runtime\XslNumber.cs (5)
28Debug.Assert(isSeparator == (formatString != null), "AssertSeparator"); 231Debug.Assert(item.ValueType == typeof(double), "Item must be either of type int, or double"); 256Debug.Assert(CharUtil.IsDecimalDigitOne(startChar), "Unexpected startChar: " + startChar); 265Debug.Assert(val >= 0 && val == Math.Round(val), "ConvertToArabic operates on non-negative integer numbers only"); 310Debug.Assert(pNewEnd >= result, "Separator cannot be the first character");
System\Xml\Xsl\Runtime\XsltConvert.cs (3)
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.");
System\Xml\Xsl\Runtime\XsltFunctions.cs (1)
282Debug.Assert(itemType == XsltConvert.BooleanType, "Unexpected type of atomic value " + itemType.ToString());
System\Xml\Xsl\Runtime\XsltLibrary.cs (7)
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"); 415Debug.Assert((object)nav1.NameTable == (object)nav2.NameTable, "Ref.Equal cannot be used if navigators have different name tables");
System\Xml\Xsl\SourceLineInfo.cs (3)
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");
System\Xml\Xsl\XmlIlGenerator.cs (1)
321Debug.Assert(methInfo != null, "MethodInfo for global value should have been created previously.");
System\Xml\Xsl\XmlQueryType.cs (10)
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"); 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 (9)
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."); 484Debug.Assert(nameTest != null, "nameTest cannot be null"); 485Debug.Assert(schemaType != null, "schemaType cannot be null"); 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.");
System\Xml\Xsl\XPath\XPathBuilder.cs (9)
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"); 132Debug.Assert(compType == XmlTypeCode.Boolean || left.XmlType.IsSingleton && right.XmlType.IsSingleton, "Both comparison operands must be singletons"); 152Debug.Assert(compType == XmlTypeCode.Boolean || compType == XmlTypeCode.Double || compType == XmlTypeCode.String, "I don't know what to do with RTF here"); 392Debug.Assert(nodeset.NodeType == QilNodeType.DocOrderDistinct, 482Debug.Assert(!args.IsReadOnly, "Writable collection expected");
System\Xml\Xsl\XPath\XPathParser.cs (2)
56Debug.Assert(posInfo.Count == 0, "PushPosInfo() and PopPosInfo() calls have been unbalanced"); 472Debug.Assert(
System\Xml\Xsl\XPath\XPathQilFactory.cs (10)
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"); 158Debug.Assert(IsAnyType(n), "Unexpected expression type: " + n.XmlType.ToString());
System\Xml\Xsl\XPathConvert.cs (4)
1901Debug.Assert(false, "Who's subtracting to negative?"); 2527Debug.Assert(('0' & 0xF) == 0, "We use (char)(d |'0') to convert digit to char"); 2642Debug.Assert(('0' & 0xF) == 0, "We use (ch & 0xF) to convert char to digit"); 2736Debug.Assert(*pchEnd == '\0', "String objects must be zero-terminated");
System\Xml\Xsl\Xslt\Compiler.cs (5)
70Debug.Assert(CompilerResults == null, "Compiler cannot be reused"); 93Debug.Assert(Root == null, "Compiler cannot be reused"); 128Debug.Assert(importPrecedence <= oldNsAlias.ImportPrecedence, "Stylesheets must be processed in the order of decreasing import precedence"); 264Debug.Assert(savedErrorCount == -1, "Nested EnterForwardsCompatible calls"); 270Debug.Assert(savedErrorCount != -1, "ExitForwardsCompatible without EnterForwardsCompatible");
System\Xml\Xsl\Xslt\CompilerScopeManager.cs (7)
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, 346Debug.Assert(LastPredefRecord <= currentRecord && currentRecord <= scope.lastRecord, "MoveNext() either was not called or returned false");
System\Xml\Xsl\Xslt\Focus.cs (7)
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"); 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 (6)
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"); 118Debug.Assert(formalArgs[prevArg] != null, "formalArg must be in the list"); 119Debug.Assert(invokeArgs[prevArg] != null, "This arg should be compiled already");
System\Xml\Xsl\Xslt\KeyMatchBuilder.cs (3)
28Debug.Assert(0 <= depth && depth <= 1, "this shouldn't happen"); 37Debug.Assert(0 <= depth && depth <= 1, "this shouldn't happen"); 96Debug.Assert(content.Child == this.fixup, "Unexpected content node");
System\Xml\Xsl\Xslt\MatcherBuilder.cs (1)
130Debug.Assert(
System\Xml\Xsl\Xslt\OutputScopeManager.cs (1)
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 (18)
215Debug.Assert(!curLoop.IsFocusSet && !funcFocus.IsFocusSet, "Must be compiled using singleton focus"); 377Debug.Assert(IsDebug, "This is debug only logic"); 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"); 564Debug.Assert(tmpl is Template, "Only templates can have explicit arguments"); 566Debug.Assert(arg.DefaultValue == null, "Argument must not be compiled yet"); 647Debug.Assert(result != null, "Result of compilation should not be null"); 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"); 1199Debug.Assert(result == null, "xsl:otherwise must be the last child of xsl:choose"); 1525Debug.Assert(0 < list.Count, "Pattern should have at least one filter"); 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"); 2408Debug.Assert(vars.Count == 0, "Accumulated variables left unclaimed");
System\Xml\Xsl\Xslt\QilGeneratorEnv.cs (2)
28Debug.Assert(args == null || args.Length == 0, "Error message must already be composed in res"); 94Debug.Assert(!args.IsReadOnly, "Writable collection expected");
System\Xml\Xsl\Xslt\QilStrConcatenator.cs (3)
45Debug.Assert(inUse, "Reset() wasn't called"); 50Debug.Assert(inUse, "Reset() wasn't called"); 55Debug.Assert(inUse, "Reset() wasn't called");
System\Xml\Xsl\Xslt\Stylesheet.cs (2)
81Debug.Assert(var.Name.NamespaceUri != null, "Name must be resolved in XsltLoader"); 107Debug.Assert(template.ImportPrecedence <= old.ImportPrecedence, "Global objects are processed in order of decreasing import precedence");
System\Xml\Xsl\Xslt\XPathPatternBuilder.cs (17)
43Debug.Assert(! inTheBuild, "XPathBuilder is buisy!"); 50Debug.Assert(filter.NodeType == QilNodeType.Filter, "XPathPatternBuilder expected to generate list of Filters on top level"); 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"); 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"); 124Debug.Assert(nodeType == XPathNodeType.All && prefix == null && name == null, " // is the only d-o-s axes that we can have in pattern"); 181Debug.Assert(GetLastParent(left) == left, "Left is always single axis and never the step"); 203Debug.Assert(false, "Should not call to this function."); 266Debug.Assert( 272Debug.Assert(name == "key", "Unexpected function"); 273Debug.Assert( 294Debug.Assert(false, prompt); 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.");
System\Xml\Xsl\Xslt\XslAstAnalyzer.cs (10)
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"); 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"); 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");
System\Xml\Xsl\Xslt\XsltInput.cs (16)
79Debug.Assert(tr.Settings == null, "XmlReader created with XmlReader.Create should always expand entities."); 247Debug.Assert(reader.NodeType == XmlNodeType.Attribute, "reader.NodeType == XmlNodeType.Attribute"); 287Debug.Assert(reader.NodeType == XmlNodeType.Text, "Unexpected node type inside attribute value"); 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()"); 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"); 649Debug.Assert(SS, "First we parse xsl:stylesheet element"); 934Debug.Assert(Ref.Equal(atoms.NameTable.Get(nsUri), nsUri), "Namespaces must be atomized");
System\Xml\Xsl\Xslt\XsltLoader.cs (11)
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"); 799Debug.Assert(dummy, "One of the atts should have lineInfo. if both are defualt they can't conflict."); 877Debug.Assert(setName != null, "Required attribute always != 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.");
System\Xml\Xsl\Xslt\XsltQilFactory.cs (5)
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 && (
System\Xml\Xsl\XsltOld\ActionFrame.cs (3)
102Debug.Assert(! this.withParams.Contains(name), "We should check duplicate params at compile time"); 140Debug.Assert(proc.ActionStack.Peek() == this, "the trick we are doing with proc.Current will work only if this is topmost frame"); 309Debug.Assert(index > 0, "MoveNext() wasn't called");
System\Xml\Xsl\XsltOld\Compiler.cs (8)
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"); 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 {"); 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 (1)
658Debug.Assert(false, "Unexpected node type.");
System\Xml\Xsl\XsltOld\DbgCompiler.cs (3)
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");
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\InputScopeManager.cs (7)
54Debug.Assert(this.scopeStack != null, "Push/Pop disbalance"); 67Debug.Assert(this.scopeStack != null, "PushScope wasn't called"); 84Debug.Assert(this.scopeStack != null, "PushScope wasn't called"); 119Debug.Assert(this.scopeStack != null, "PushScope wasn't called"); 127Debug.Assert(this.scopeStack != null, "PushScope wasn't called"); 137Debug.Assert(this.scopeStack != null, "PushScope wasn't called"); 145Debug.Assert(this.scopeStack != null, "PushScope wasn't called");
System\Xml\Xsl\XsltOld\Processor.cs (11)
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"); 746Debug.Assert(StateMachine.StateOnly(stateOutlook) == this.xsm.State, 917Debug.Assert(result != null, "Variable was just calculated and result can't be null"); 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"); 978Debug.Assert(this.Debugger != null, "We don't generate calls this function if ! debugger");
System\Xml\Xsl\XsltOld\ReaderOutput.cs (1)
293Debug.Assert(this.Value.Length != 0, "It whould be Whitespace in this case");
System\Xml\Xsl\XsltOld\SequentialOutput.cs (7)
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"); 583Debug.Assert(0 <= i, "find char wasn't realy find");
System\Xml\Xsl\XsltOld\WriterOutput.cs (1)
50Debug.Assert(false, "XSLT never gives us CDATA");
System\Xml\Xsl\XsltOld\XsltCompileContext.cs (4)
278Debug.Assert( 289Debug.Assert( 613Debug.Assert(false, "unexpected XPath type"); 819Debug.Assert(args.Length <= this.Minargs, "We cheking this on resolve time");
System.Drawing (100)
commonui\System\Drawing\Advanced\Font.cs (7)
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"); 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");
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 (2)
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." );
commonui\System\Drawing\Advanced\Gdiplus.cs (3)
138Debug.Assert(initToken == IntPtr.Zero, "GdiplusInitialization: Initialize should not be called more than once in the same domain!"); 3165Debug.Assert(status != Ok, "Throwing an exception for an 'Ok' return code"); 4405Debug.Assert( lf != null, "lf is null" );
commonui\System\Drawing\Advanced\HatchBrush.cs (1)
68Debug.Assert( nativeBrush != IntPtr.Zero, "Initializing native brush with null." );
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\SafeCustomLineCapHandle.cs (1)
47Debug.Assert(status == SafeNativeMethods.Gdip.Ok, "GDI+ returned an error status: " + status.ToString(CultureInfo.InvariantCulture));
commonui\System\Drawing\Advanced\StringFormat.cs (7)
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 (5)
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"); 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 (2)
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.");
commonui\System\Drawing\BufferedGraphics.cs (1)
104Debug.Assert(bufferedGraphicsSurface != null, "The BufferedGraphicsSurface is null!");
commonui\System\Drawing\BufferedGraphicsContext.cs (1)
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\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 (8)
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."); 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");
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 (1)
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\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\PrinterSettings.cs (3)
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\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 (1)
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.");
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 (1)
192Debug.Assert(entry.handle != handle, "Duplicate handle of type " + name);
misc\GDI\DeviceContext.cs (10)
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()");
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 (3)
67Debug.Assert( dc != null, "null dc!"); 120Debug.Assert( hDc != IntPtr.Zero, "null hDc" ); 164Debug.Assert( g != null, "null Graphics object." );
misc\GDI\WindowsRegion.cs (1)
134Debug.Assert(nativeHandle == IntPtr.Zero, "nativeHandle should be null, we're leaking handle");
System.Messaging (1)
System\Messaging\Message.cs (1)
2232Debug.Assert(bodySize <= bodyArray.Length, "Allocated body array size is bigger than BODY_SIZE property");
System.Runtime.Remoting (23)
channels\core\corechannel.cs (1)
988Debug.Assert(s!=null, "Resource string lookup failed. Resource name was: \""+key+"\"");
metadata\wsdlparser.cs (7)
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"); 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 (52)
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.ServiceModel (1)
System\ServiceModel\Channels\UnsafeNativeMethods.cs (1)
1151System.Diagnostics.Debug.Assert(hModule != IntPtr.Zero, "GetModuleHandle failed. Dll isn't loaded?");
System.ServiceModel.Internals (1)
System\Runtime\AssertHelper.cs (1)
40Debug.Assert(false, message);
System.Transactions (113)
System\Transactions\Enlistment.cs (5)
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."); 338Debug.Assert(false, "ResourceManagerIdentifier called for non durable enlistment");
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 (31)
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" ); 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\TransactionInterop.cs (1)
61System.Diagnostics.Debug.Assert( oletxTx != null, "transaction.Promote returned null instead of throwing." );
System\Transactions\TransactionScope.cs (1)
913Debug.Assert( null != this.dependentTransaction, "null != this.dependentTransaction" );
System\Transactions\TransactionState.cs (37)
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() )); 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." ); 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"); 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 (15)
Routing\ParsedRoute.cs (1)
453Debug.Assert(i == (PathSegments.Count - 1), "If we're processing a catch-all, we should be on the last route segment.");
Routing\RouteParser.cs (5)
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.");
Security\AntiXss\Utf16StringReader.cs (2)
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\DataSourceSelectArguments.cs (1)
202Debug.Assert(unsupportedCapabilities == 0, "unknown capability not supported");
UI\WebControls\AccessDataSource.cs (1)
128Debug.Assert(fileCache != null, "Cache object should be a FileDataSourceCache");
UI\WebControls\MethodParametersDictionary.cs (1)
58Debug.Assert(!InnerDictionary.ContainsKey(key), "The collection was not empty when loading the viewstate");
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");
System.Web.DataVisualization (3)
Common\Annotation\AnnotationBase.cs (1)
3302Debug.Assert(axisName != null, "GetAxisByName: handed a null axis name");
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.Web.DynamicData (6)
DynamicData\DynamicDataManager.cs (1)
191Debug.Assert(baseDataBoundControl != null, "NULL!");
DynamicData\DynamicHyperLink.cs (1)
166Debug.Assert(dataItem != null, "DataItem is 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\Util\Misc.cs (1)
280Debug.Assert(control != null, "control should not be null");
System.Web.Entity (36)
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 (8)
122Debug.Assert(_collectionMode == ManagerMode.None || _collectionMode == mode, "Cannot reset a collection working in a different mode."); 294Debug.Assert(newQueryBuilderCreateMethod != null, "Unable to bind to EntityDataSourceObjectQueryBuilder<T>.Create (static, non-visible) method"); 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.");
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 (1)
100Debug.Assert(this.TypeCode != TypeCode.Empty || this.DbType != DbType.Object, "Need to have TypeCode or DbType to get a ClrType");
System.Web.Entity.Design (42)
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 (17)
78Debug.Assert(entityDataSource != null, "null entityDataSource"); 99Debug.Assert(_owner != null, "expected non-null owner"); 100Debug.Assert(_webApplication != null, "expected non-null web application service"); 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 (1)
35Debug.Assert(designerHost != null, "Did not get DesignerHost service.");
System.Web.Extensions (36)
Compilation\WCFBuildProvider.cs (2)
432Debug.Assert(virtualPath.StartsWith(webReferencesRootVirtualPath, StringComparison.OrdinalIgnoreCase), 439Debug.Assert(string.Equals(webReferencesRootVirtualPath, virtualPath, StringComparison.OrdinalIgnoreCase),
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\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 (3)
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 (3)
169Debug.Assert(assemblyInfo != null, "Assembly info should not be null"); 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.");
Script\Services\WebServiceData.cs (1)
292Debug.Assert(!_clientTypesProcessed, "ProcessClientTypes shouldn't be called after it has already been successfully run.");
UI\PageRequestManager.cs (7)
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."); 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.");
UI\RegisteredScript.cs (1)
40Debug.Assert(
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\ScriptReference.cs (2)
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.");
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 (4)
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"); 467Debug.Assert(Count == 0, "The collection must be empty if this is called");
System.Web.Mobile (173)
Mobile\UrlPath.cs (1)
58Debug.Assert(path[path.Length-1] != '/', "Path should not end with a /");
UI\MobileControls\Adapters\ChtmlCalendarAdapter.cs (2)
572Debug.Assert(false, "Unexpected Secondary UI Mode"); 923Debug.Assert(dateFrom <= dateTo, "Bad Date Range");
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 (4)
74Debug.Assert(itemIndex >= 0, "itemIndex is negative"); 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\WmlCalendarAdapter.cs (2)
554Debug.Assert(false, "Unexpected Secondary UI Mode"); 895Debug.Assert(dateFrom <= dateTo, "Bad Date Range");
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 (2)
509Debug.Assert(false, "Unexpected Secondary UI Mode"); 819Debug.Assert(dateFrom <= dateTo, "Bad Date Range");
UI\MobileControls\Adapters\XhtmlAdapters\XhtmlBasicControlAdapter.cs (5)
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\XhtmlBasicValidationSummaryAdapter.cs (1)
68Debug.Assert(errorMessage != null && errorMessage.Length > 0, "Bad Error Messages");
UI\MobileControls\BaseValidator.cs (2)
221Debug.Assert(isValid, 340Debug.Assert(false, "Should never be called.");
UI\MobileControls\CustomValidator.cs (1)
100Debug.Assert(e != null, "Unexpected null parameter!");
UI\MobileControls\Design\Adapters\DesignerAdapterUtil.cs (2)
263Debug.Assert(control != null, "control is null"); 301Debug.Assert(controlDesigner is MobileControlDesigner ||
UI\MobileControls\Design\AdRotatorDesigner.cs (1)
35Debug.Assert(component is System.Web.UI.MobileControls.AdRotator,
UI\MobileControls\Design\AppliedDeviceFiltersDialog.cs (7)
577Debug.Assert(_tbArgument.Text.Length == 0, 712Debug.Assert( 871Debug.Assert(!InExternalCacheEditMode, 890Debug.Assert(InExternalCacheEditMode, 903Debug.Assert(InExternalCacheEditMode, 917Debug.Assert(InExternalCacheEditMode, 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 (1)
53Debug.Assert(component is System.Web.UI.MobileControls.BaseValidator,
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 (1)
51Debug.Assert(component is System.Web.UI.MobileControls.Command,
UI\MobileControls\Design\Converters\ChoiceConverter.cs (5)
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."); 198Debug.Assert(name != null, "Expected an actual device filter name to match.");
UI\MobileControls\Design\Converters\DataFieldConverter.cs (1)
111Debug.Assert(pd != null, "Cannot get DataMember");
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 (1)
90Debug.Assert(control != null, "Not a control");
UI\MobileControls\Design\DesignerCapabilities.cs (2)
138Debug.Assert(obj != null, 140Debug.Assert(obj is String,
UI\MobileControls\Design\DesignerForm.cs (1)
58Debug.Assert(dialogFont != null, "Did not get a dialog font to use from IUIService");
UI\MobileControls\Design\DeviceSpecificDesigner.cs (5)
123Debug.Assert(host != null, "host is null in DeviceSpecificDesigner"); 142Debug.Assert(component is System.Web.UI.MobileControls.DeviceSpecific, 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");
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 (1)
138Debug.Assert(component is Form,
UI\MobileControls\Design\ImageDesigner.cs (1)
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 (1)
54Debug.Assert(component is System.Web.UI.MobileControls.Label,
UI\MobileControls\Design\LinkDesigner.cs (1)
54Debug.Assert(component is System.Web.UI.MobileControls.Link,
UI\MobileControls\Design\ListComponentEditorPage.cs (1)
119Debug.Assert (component is ObjectList | component is List |
UI\MobileControls\Design\ListDesigner.cs (3)
303Debug.Assert(items != null, "Items is null in LisControl"); 489Debug.Assert(component is System.Web.UI.MobileControls.List, 495Debug.Assert(_list.Items != null, "Items cannot be null.");
UI\MobileControls\Design\ListItemsPage.cs (1)
352Debug.Assert(runtimeItem != null, "runtimeItem is null");
UI\MobileControls\Design\MobileComponentEditorPage.cs (3)
57Debug.Assert(_site != null, "Expected the component to be sited."); 103Debug.Assert(designerHost != null, "Expected a designer host."); 107Debug.Assert(_designer != null, "Expected a designer for the selected component");
UI\MobileControls\Design\MobileContainerDesigner.cs (8)
269Debug.Assert(component is MobileControl, 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"); 594Debug.Assert (obj != null, "null object passed in!");
UI\MobileControls\Design\MobileControlDesigner.cs (2)
442Debug.Assert(component is System.Web.UI.MobileControls.MobileControl, 505Debug.Assert(property != null, "Property is null: " + propertyName);
UI\MobileControls\Design\MobileControlPersister.cs (13)
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!"); 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!"); 969Debug.Assert(textBinding != null, "Did not get a Text databinding from DesignerDataBoundLiteralControl");
UI\MobileControls\Design\MobileTemplatedControlDesigner.cs (2)
402Debug.Assert(teService != null, 679Debug.Assert(component is System.Web.UI.MobileControls.MobileControl ||
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 (1)
77Debug.Assert(component is System.Web.UI.MobileControls.ObjectList,
UI\MobileControls\Design\ObjectListFieldsPage.cs (2)
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 (1)
55Debug.Assert(component is System.Web.UI.MobileControls.PhoneCall,
UI\MobileControls\Design\PropertyOverridesDialog.cs (5)
353Debug.Assert(componentSite != null, "Expected the runtime control to be sited."); 465Debug.Assert(!InExternalCacheEditMode, 484Debug.Assert(InExternalCacheEditMode, 497Debug.Assert(InExternalCacheEditMode, 511Debug.Assert(InExternalCacheEditMode,
UI\MobileControls\Design\PropertyOverridesTypeEditor.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\SelectionListDesigner.cs (2)
271Debug.Assert(items != null, "Items is null in LisControl"); 386Debug.Assert(component is System.Web.UI.MobileControls.SelectionList,
UI\MobileControls\Design\StyleSheetDesigner.cs (7)
147Debug.Assert(component is System.Web.UI.MobileControls.StyleSheet, 208Debug.Assert(teService != null, 283Debug.Assert(ssd != null, "ssd is null in StyleSheetDesigner"); 407Debug.Assert(designer != null, "designer is null in StyleSheetDesigner"); 795Debug.Assert(null != style, "style is null in IDeviceSpecificDesigner.SetDeviceSpecific"); 1070Debug.Assert(Behavior != null, "Behavior is null"); 1125Debug.Assert(null != _styleSheet, "_styleSheet is null");
UI\MobileControls\Design\TemplatingOptionsDialog.cs (1)
249Debug.Assert(null != container, "container is null");
UI\MobileControls\Design\TextBoxDesigner.cs (1)
52Debug.Assert(component is System.Web.UI.MobileControls.TextBox,
UI\MobileControls\Design\TextViewDesigner.cs (1)
48Debug.Assert(component is System.Web.UI.MobileControls.TextView,
UI\MobileControls\Design\Util\EditableTreeList.cs (3)
184Debug.Assert( 196Debug.Assert( 201Debug.Assert(
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\MSHTMLHost.cs (6)
42Debug.Assert(tridentSite != null, 58Debug.Assert(Handle != IntPtr.Zero, 72Debug.Assert(tridentSite != null, 96Debug.Assert((parent != null) && (parent.Handle != IntPtr.Zero), 153Debug.Assert(pViewToActivate != null, 384Debug.Assert(tridentOleObject != null,
UI\MobileControls\Design\Util\TemporaryBitmapFile.cs (2)
32Debug.Assert(bitmap != null, 89Debug.Assert(value != null,
UI\MobileControls\Design\Util\WebConfigManager.cs (2)
268Debug.Assert( 277Debug.Assert(
UI\MobileControls\Design\ValidationSummaryDesigner.cs (1)
52Debug.Assert(component is System.Web.UI.MobileControls.ValidationSummary,
UI\MobileControls\DeviceSpecific.cs (2)
58Debug.Assert(_owner != null, "Owner is null"); 65Debug.Assert((_owner == null || MobilePage == null || MobilePage.DesignMode), "Owner has already been set");
UI\MobileControls\MobileCategoryAttribute.cs (1)
76Debug.Assert(localizedValue != null,
UI\MobileControls\ObjectList.cs (4)
460Debug.Assert(_tableFieldIndices != null, "_tableFieldIndices is null."); 719Debug.Assert (dataSource != null, "dataSource is null"); 1182Debug.Assert (virtualIndex >= 0, "virtualIndex < 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\PagedControl.cs (1)
321Debug.Assert (state == null || state.GetType() == typeof(Pair),
UI\MobileControls\RangeValidator.cs (1)
177Debug.Assert(false, "Should never be called.");
UI\MobileControls\Style.cs (1)
284Debug.Assert(_referredStyle == null ||
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 (13)
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\DynamicDiscoSearcher.cs (1)
55Debug.Assert( s != null, "null element in excluded list" );
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.Windows.Forms (1014)
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 (1)
192Debug.Assert(entry.handle != handle, "Duplicate handle of type " + name);
misc\GDI\DeviceContext.cs (9)
149Debug.Assert(!this.disposed, "Accessing a disposed DC, forcing recreation of HDC - this will generate a Handle leak!"); 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()");
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 (3)
67Debug.Assert( dc != null, "null dc!"); 120Debug.Assert( hDc != IntPtr.Zero, "null hDc" ); 164Debug.Assert( g != null, "null Graphics object." );
misc\GDI\WindowsGraphics2.cs (6)
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");
winforms\Managed\System\Resources\ResXDataNode.cs (1)
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 (1)
314Debug.Assert(fileName != null, "Nothing to output to");
winforms\Managed\System\WinForms\AccessibleObject.cs (9)
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!"); 1556Debug.Assert(child != this, "An accessible object is returning itself as its own child. This can cause Accessibility client applications to hang."); 1904Debug.Assert(parent != this, "An accessible object is returning itself as its own parent. This can cause accessibility clients to hang."); 2407Debug.Assert(acc != null, "SystemIAccessible is null"); 2408Debug.Assert(en != null, "SystemIEnumVariant is null"); 2813Debug.Assert(owner != null, "Cannot create EnumVariantObject with a null owner"); 2818Debug.Assert(owner != null, "Cannot create EnumVariantObject with a null owner");
winforms\Managed\System\WinForms\Application.cs (8)
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."); 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); 2637Debug.Assert(parkingWindows.Count == 1, "parkingWindows count can not be > 1 for legacy OS/target framework versions"); 2916Debug.Assert(threadWindows != null, "OnEnterState recursed, but it's not supposed to be reentrant"); 4196Debug.Assert(UnsafeNativeMethods.GetParent(handle) != Handle, "Always set the handle's parent to someone else before calling UnparkHandle");
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 (50)
1216Debug.Assert(o == null || o is ISelectionService, "service must implement ISelectionService"); 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"); 1624Debug.Assert(!OwnWindow(), "why are we here if we own our window?"); 1680Debug.Assert(NativeMethods.Succeeded(hr), "Failed in UiDeactivate: " + hr.ToString(CultureInfo.InvariantCulture)); 1698Debug.Assert(GetOcState() == OC_LOADED," failed transition"); 1703Debug.Assert(GetOcState() == OC_PASSIVE," failed transition"); 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"); 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..."); 1921Debug.Assert(!axState[fFakingWindow], "if we were visible, we could not have had a fake window..."); 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."); 1963Debug.Assert(!IsHandleCreated, "if we are inplace deactivated we should not have a window."); 2170Debug.Assert(!axState[disposed], "we chould not be asking for the object when we are axState[disposed]..."); 2235Debug.Assert(oldOcxState != null, "we got to have an old state which holds out scribble storage..."); 2348Debug.Assert(storageType != STG_UNKNOWN, "if we are loaded, out storage type must be set!"); 2499Debug.Assert(freezeCount >=0, "invalid freeze count!"); 2588Debug.Assert(instance == null, "instance must be null"); 2594Debug.Assert(instance != null, "w/o an exception being thrown we must have an object..."); 2663Debug.Assert(selectionStyle >= 0 && selectionStyle <= 2, "Invalid selection style"); 2685Debug.Assert((flags & AxFlags.PreventEditMode) == 0, "edit mode should have been disabled"); 2886Debug.Assert(baseProps[i] != null, "Null base prop at location: " + i.ToString(CultureInfo.InvariantCulture)); 2916Debug.Assert(propDesc != null, "Cannot find cached entry for: " + propName); 3008Debug.Assert(dispid != NativeMethods.ActiveX.DISPID_UNKNOWN, "Wrong dispid sent to GetPropertyDescriptorFromDispid"); 3582Debug.Assert(IsHandleCreated, "we got to have a handle to be here..."); 4118Debug.Assert(!host.GetAxState(AxHost.siteProcessedInputKey), "Re-entering UnsafeNativeMethods.IOleControlSite.TranslateAccelerator!!!"); 4654Debug.Assert(instance != null, "must have the ocx"); 4668Debug.Assert(instance != null, "must have the ocx"); 4681Debug.Assert(instance != null, "must have the ocx"); 4689Debug.Assert(instance != null, "must have the ocx"); 5581Debug.Assert(parent.Site == null, "Parent is sited but we could not find IContainer!!!"); 5657Debug.Assert(rval == null || assocContainer == null || (rval == assocContainer), 5819Debug.Assert(f != null, "a control has to be on a ContainerControl..."); 5848Debug.Assert(siteUIActive == null, "Object did not call OnUIDeactivate"); 5852Debug.Assert(f != null, "a control has to be on a ContainerControl..."); 5936Debug.Assert(parent != null, "gotta have it..."); 6002Debug.Assert(ctlInEditMode == null || ctlInEditMode == ctl, "who is exiting edit mode?"); 6690Debug.Assert(storage == null, "but we already have a storage!!!"); 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"); 7432Debug.Assert(cookieItems != null && nameItems != null, "An item array is null"); 7439Debug.Assert(cookieItems.Length == nameItems.Length, "Got uneven names and cookies");
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 (6)
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."); 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 (3)
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");
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 (6)
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"); 1071Debug.Assert(Enabled, "ButtonBase.OnKeyDown should not be called if the button is disabled");
winforms\Managed\System\WinForms\ButtonInternal\ButtonBaseAdapter.cs (1)
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\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 (2)
46Debug.Assert(formats != null, "Null returned from GetFormats"); 69Debug.Assert(formats != null, "Null returned from GetFormats");
winforms\Managed\System\WinForms\ColumnHeader.cs (1)
517Debug.Assert(false, "We should never set the image list");
winforms\Managed\System\WinForms\ComboBox.cs (11)
737Debug.Assert(IsHandleCreated, "Handle should be created at this point"); 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"); 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");
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\COM2AboutBoxPropertyDescriptor.cs (1)
174Debug.Assert(NativeMethods.Succeeded(hr), "Failed to launch about box.");
winforms\Managed\System\WinForms\ComponentModel\COM2Interop\COM2IManagedPerPropertyBrowsingHandler.cs (3)
69Debug.Assert(attrTypeNames.Length == varParams.Length, "Mismatched parameter and attribute name length"); 126Debug.Assert(typeof(Attribute).IsAssignableFrom(t), "Attribute type " + t.FullName + " does not derive from Attribute"); 150Debug.Assert(typeof(Attribute).IsAssignableFrom(t), "Attribute type " + t.FullName + " does not derive from Attribute");
winforms\Managed\System\WinForms\ComponentModel\COM2Interop\COM2IPerPropertyBrowsingHandler.cs (2)
269Debug.Assert(cookieItems != null && nameItems != null, "An item array is null"); 278Debug.Assert(cookieItems.Length == nameItems.Length, "Got uneven names and cookies");
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 (1)
59Debug.Assert(nativeValue is UnsafeNativeMethods.IPicture, "nativevalue is not IPicture");
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 (1)
69Debug.Assert(obj is NativeMethods.IProvidePropertyBuilder, "object is not IProvidePropertyBuilder");
winforms\Managed\System\WinForms\ComponentModel\COM2Interop\COM2TypeInfoProcessor.cs (5)
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."); 342Debug.Assert(typeDesc.unionMember != IntPtr.Zero, "typeDesc doesn't contain an hreftype!"); 348Debug.Assert(typeDesc.unionMember != IntPtr.Zero, "typeDesc doesn't contain an refTypeDesc!"); 679Debug.Assert(funcDesc.lprgelemdescParam != IntPtr.Zero, "ELEMDESC param is null!"); 819Debug.Assert(name != null, "No name for VARDESC member, but GetDocumentation returned S_OK!");
winforms\Managed\System\WinForms\Control.cs (58)
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"); 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."); 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."); 7042Debug.Assert(window != null, "window is null in Control.GetSafeHandle"); 7216Debug.Assert(regionHandle != IntPtr.Zero, "Region wasn't null but HRGN is?"); 7456Debug.Assert(tme.args.Length == 1, 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."); 11169Debug.Assert(layoutSuspendCount > 0, "Unbalanance suspend/resume layout."); 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"); 12535Debug.Assert(!IsHandleCreated, "Don't call this method when handle is created!!"); 13187Debug.Assert(m.LParam != IntPtr.Zero, "m.lparam is null"); 13193Debug.Assert(menuItem != null, "UniqueID is not associated with a menu item"); 14510Debug.Assert(sizeProperty != null && locationProperty != null, "Error retrieving Size/Location properties on Control."); 15095Debug.Assert(control != null, "Why are we returning null controls from a valid index?"); 15326Debug.Assert(ActiveXInstance.EventsFrozen == (bFreeze != 0), "Failed to set EventsFrozen correctly"); 16373Debug.Assert(obj != null, "GetAmbientProperty failed"); 17116Debug.Assert(activeXState[inPlaceVisible], "Failed to set inplacevisible"); 17142Debug.Assert(inPlaceFrame != null, "Setting us to visible should have created the in place frame"); 17360Debug.Assert(converter != null, "No type converter for property '" + props[i].Name + "' on class " + control.GetType().FullName); 17995Debug.Assert(stream != null, "Stream should be non-null, or an exception should have been thrown."); 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"); 18268Debug.Assert(clientSite != null, "How can we setextent before we are sited??"); 18595Debug.Assert(inPlaceFrame != null, "No inplace frame -- how dod we go UI active?"); 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"); 19997Debug.Assert(handle != IntPtr.Zero, "FontHandleWrapper disposed, but still being accessed");
winforms\Managed\System\WinForms\Control.Ime.cs (9)
197Debug.Assert( val >= 0, "Counter underflow." ); 557Debug.Assert( ImeSupported, "This method should not be called from controls that don't support IME input." ); 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" ); 635Debug.Assert( ImeSupported, "ImeModeChanged should not be raised on an Ime-Unaware control." ); 998Debug.Assert( countryTable != null, "countryTable is null" ); 1138Debug.Assert( imeMode != ImeMode.Inherit, "ImeMode.Inherit is an invalid argument to ImeContext.SetImeStatus" ); 1240Debug.Assert( succeeded, "Could not set the IME open status." ); 1245Debug.Assert( succeeded, "Could not release IME context." );
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 (4)
271Debug.Assert(data.Scan0 != IntPtr.Zero, "BitmapData.Scan0 is null; check marshalling"); 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 (2)
597Debug.Assert(lastGoodKnownRow == -1 || lastGoodKnownRow == listposition, "if we have a valid lastGoodKnownRow, then it should equal the position in the list"); 767Debug.Assert(lastGoodKnownRow == -1 || listposition == lastGoodKnownRow, "how did they get out of sync?");
winforms\Managed\System\WinForms\Cursor.cs (1)
90Debug.Assert(stream != null, "couldn't get stream for resource " + resource);
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 (55)
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"); 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?"); 3093Debug.Assert(listManager!= null, "Can't wire up to a null DataSource"); 3102Debug.Assert(listManager != null, "Can't un wire from a null DataSource"); 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?"); 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?"); 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"); 4531Debug.Assert(originalState != null, "how can we get a list changed event from another listmanager/list while not navigating"); 4555Debug.Assert(gridState[GRIDSTATE_isEditing], "Can't abort an edit that is not happening!"); 4885Debug.Assert(myGridTable != null, "Column resizing operations can't be called when myGridTable == null."); 4921Debug.Assert(myGridTable != null, "Column resizing operations can't be called when myGridTable == null."); 5096Debug.Assert(myGridTable != null, "Row resizing operations can't be called when myGridTable == null."); 5127Debug.Assert(myGridTable != null, "Row resizing operations can't be called when myGridTable == null."); 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"); 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"); 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?"); 7080Debug.Assert(row >= firstVisibleRow && row < firstVisibleRow + numVisibleRows, 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)); 7585Debug.Assert(i == DataGridRowsLength - 1, "the location of addNewRow is " + i.ToString(CultureInfo.InvariantCulture) + " and there are " + DataGridRowsLength.ToString(CultureInfo.InvariantCulture) + " rows "); 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"); 9119Debug.Assert(dataGrid.dataGridRows[index].RowNumber == index, "Row number is wrong!");
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 (7)
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"); 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 (8)
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"); 609if (!alignToRight) Debug.Assert(bounds.X == rowHeaderBoundsX, "what's up doc?"); 621if (!alignToRight) Debug.Assert(rowHeaderBounds.Right == expandoBoxX, "what's up doc?"); 897Debug.Assert(owner != null, "DataGridRelationshipAccessibleObject must have a valid owner DataGridRow");
winforms\Managed\System\WinForms\DataGridRow.cs (2)
724Debug.Assert(owner != null, "DataGridRowAccessibleObject must have a valid owner DataGridRow"); 911Debug.Assert(owner != null, "DataGridColumnAccessibleObject must have a valid owner DataGridRow");
winforms\Managed\System\WinForms\DataGridState.cs (1)
157Debug.Assert(owner != null, "DataGridRowAccessibleObject must have a valid owner DataGridRow");
winforms\Managed\System\WinForms\DataGridTable.cs (7)
523Debug.Assert(this.GridLineStyle == DataGridLineStyle.Solid || this.GridLineStyle == DataGridLineStyle.None, "are there any other styles?"); 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 (2)
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\DataGridViewBand.cs (1)
663Debug.Assert(value == DataGridViewTriState.False, "TriState only supports NotSet, True, False");
winforms\Managed\System\WinForms\DataGridViewButtonCell.cs (2)
867Debug.Assert(this.FlatStyle == FlatStyle.Popup, "FlatStyle.Popup is the last flat style"); 979Debug.Assert(this.FlatStyle == FlatStyle.Popup, "FlatStyle.Popup is the last flat style");
winforms\Managed\System\WinForms\DataGridViewCell.cs (4)
1213Debug.Assert(this is DataGridViewColumnHeaderCell, "if the row index == -1 and we have an owning column this should be a column header cell"); 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"); 5052Debug.Assert(dataGridView.CurrentCell == dataGridViewCell, "the result of selecting the cell should have made this cell the current cell");
winforms\Managed\System\WinForms\DataGridViewCheckBoxCell.cs (1)
1621Debug.Assert(valBounds.Width < checkBoxSize.Width || valBounds.Height < checkBoxSize.Height, "the bounds are empty");
winforms\Managed\System\WinForms\DataGridViewComboBoxCell.cs (1)
911Debug.Assert(sender == this.DataSource, "How can we get dispose notification from anything other than our DataSource?");
winforms\Managed\System\WinForms\DataGridViewDataConnection.cs (15)
259Debug.Assert(this.currencyManager.AllowAdd, "why did we call AddNew on the currency manager when the currency manager does not allow new rows?"); 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"); 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?"); 852Debug.Assert(this.owner.NewRowIndex != -1, "the NewRowIndex is -1 only when AllowUserToAddRows is false"); 913Debug.Assert(this.owner.AllowUserToAddRowsInternal, "how did we start an add new row transaction if the dataGridView control has AllowUserToAddRows == false?"); 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\DataGridViewEditingControl.cs (1)
81Debug.Assert(ownerControl is IDataGridViewEditingControl, "ownerControl must implement IDataGridViewEditingControl");
winforms\Managed\System\WinForms\DataGridViewImageCell.cs (1)
742Debug.Assert(cellStyle.Alignment == DataGridViewContentAlignment.NotSet, "this is the only alignment left");
winforms\Managed\System\WinForms\DataGridViewMethods.cs (17)
3638Debug.Assert(columnIndex >= 0 && columnIndex < this.Columns.Count, "Invalid columnIndex: " + columnIndex ); 4695Debug.Assert(numVisibleScrollingCols <= visibleScrollingColumnsTmp, "the number of displayed columns can only grow"); 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"); 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"); 9202Debug.Assert(y >= data.Y-1 && y < data.Bottom, "y must be inside the vertical bounds of the data area."); 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"); 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"); 19515Debug.Assert(this.Columns[i].IsDataBound, "two columns w/ the same DataPropertyName should be DataBound at the same time");
winforms\Managed\System\WinForms\DataGridViewRow.cs (1)
2498Debug.Assert(false, "we should have found already the selected cell");
winforms\Managed\System\WinForms\DataGridViewRowCollection.cs (2)
1020Debug.Assert(false, "we should have found the row already"); 2711Debug.Assert(i >= left && j <= right, "(i>=left && j<=right) Sort failed - Is your IComparer bogus?");
winforms\Managed\System\WinForms\DataGridViewRowHeaderCell.cs (1)
1344Debug.Assert(this.Owner.DataGridView.RowHeadersVisible, "if the rows are not visible how did you get the row headers acc obj?");
winforms\Managed\System\WinForms\DataGridViewTopLeftHeaderCell.cs (1)
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\DataGridViewUtilities.cs (1)
434Debug.Assert(cellStyle.Alignment == DataGridViewContentAlignment.NotSet, "this is the only alignment left");
winforms\Managed\System\WinForms\DataObject.cs (27)
77Debug.Assert(innerData != null, "You must have an innerData on all DataObjects"); 92Debug.Assert(innerData != null, "You must have an innerData on all DataObjects"); 105Debug.Assert(innerData != null, "You must have an innerData on all DataObjects"); 124Debug.Assert(innerData != null, "You must have an innerData on all DataObjects"); 134Debug.Assert(innerData != null, "You must have an innerData on all DataObjects"); 185Debug.Assert(innerData != null, "You must have an innerData on all DataObjects"); 206Debug.Assert(format != null, "Must specify a format type"); 221Debug.Assert(format != null, "Must specify a format type"); 238Debug.Assert(innerData != null, "You must have an innerData on all DataObjects"); 268Debug.Assert(innerData != null, "You must have an innerData on all DataObjects"); 1171Debug.Assert(innerData != null, "You must have an innerData on all DataObjects"); 1182Debug.Assert(innerData != null, "You must have an innerData on all DataObjects"); 1194Debug.Assert(innerData != null, "You must have an innerData on all DataObjects"); 1205Debug.Assert(innerData != null, "You must have an innerData on all DataObjects"); 1534Debug.Assert(innerData != null, "You must have an innerData on all DataObjects"); 1579Debug.Assert(innerData != null, "You must have an innerData on all DataObjects"); 1985Debug.Assert(innerData != null, "You must have an innerData on all DataObjects"); 2038Debug.Assert(innerData != null, "You must have an innerData on all DataObjects"); 2207Debug.Assert(format != null, "Null format passed in"); 2211Debug.Assert(data != null, "data must be non-null"); 2217Debug.Assert(formats != null, "Null returned from GetFormats"); 2219Debug.Assert(formats[i] != null, "Null format inside of formats at index " + i.ToString(CultureInfo.InvariantCulture)); 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!!!"); 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] + "'");
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 (4)
420Debug.Assert((newPage >= 0) && (newPage < pageSites.Length), 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\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 (1)
68Debug.Assert(pDataObj != null, "OleDragEnter didn't give us a valid data object.");
winforms\Managed\System\WinForms\ErrorProvider.cs (5)
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?");
winforms\Managed\System\WinForms\FileDialog.cs (2)
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\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 (34)
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]"); 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"); 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"); 6501Debug.Assert(IsHandleCreated, "shouldn't call when handle == 0"); 6527Debug.Assert( IsMdiContainer, "Not an MDI container!" ); 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!");
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\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 (11)
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"); 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\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 (18)
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 246Debug.Assert(GetAnchorInfo(element) != null, "AnchorInfo should be initialized before LayoutAnchorControls()."); 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?"); 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."); 539Debug.Assert(!HasCachedBounds(element.Container), 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 (23)
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."); 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."); 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 (28)
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."); 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 (70)
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"); 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"); 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"); 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 (11)
96set { Debug.Assert(false, "We should never set the image list"); } 507Debug.Assert(this.group == value, "BUG: group member variable wasn't updated!"); 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 (21)
166Debug.Assert(maskedTextProvider != null, "Initializing from a null MaskProvider ref."); 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." ); 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\Menu.cs (1)
185Debug.Assert(true, "Should never get called");
winforms\Managed\System\WinForms\MenuItem.cs (6)
1078Debug.Assert(!this.created, "base.ItemsChanged should have wiped out our handles"); 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\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 (12)
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"); 497Debug.Assert(wndProcFlags == 0x00, "Re-entrancy into IsDebuggerInstalled()"); 590Debug.Assert(handle != IntPtr.Zero, "handle is 0"); 614Debug.Assert(defWindowProc != IntPtr.Zero, "defWindowProc is 0"); 630Debug.Assert(defWindowProc != windowProcPtr, "Uh oh! Subclassed ourselves!!!"); 839Debug.Assert(previousWindow != this, "Looping in our linked list"); 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\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\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 (18)
1409Debug.Assert(selectedViewTab < viewTabs.Length && selectedViewTab >= 0, "Invalid tab selection!"); 1846Debug.Assert(viewTabs[i] != null, "Null item in tab array!"); 1919Debug.Assert(viewTabs != null, "Tab array destroyed!"); 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"); 4070Debug.Assert(viewTabs != null && viewTabs.Length > 0, "Holy Moly! We don't have any tabs left!"); 4083Debug.Assert(viewTabs != null, "Tab array destroyed!"); 4249Debug.Assert(viewTabButtons != null, "No view tab buttons to select!"); 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"); 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 (13)
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?"); 1181Debug.Assert(!Disposed, "Why are we creating children after we are disposed?"); 1535Debug.Assert(tab != null, "No current tab!"); 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");
winforms\Managed\System\WinForms\PropertyGridInternal\GridErrorDlg.cs (1)
381Debug.Assert(ownerItem != null, "AccessibleObject owner cannot be null");
winforms\Managed\System\WinForms\PropertyGridInternal\GridToolTip.cs (1)
125Debug.Assert(index != -1, "Failed to find control in tooltip array");
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 (2)
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\PropertyDescriptorGridEntry.cs (1)
463Debug.Assert(propInfo != null, "Can't create propEntry because of null prop info");
winforms\Managed\System\WinForms\PropertyGridInternal\PropertyGridView.cs (9)
1043Debug.Assert(ctl != null, "Null control passed to CommonEditorUse"); 3326Debug.Assert(this.cumulativeVerticalWheelDelta > -NativeMethods.WHEEL_DELTA, "cumulativeVerticalWheelDelta is too small"); 3327Debug.Assert(this.cumulativeVerticalWheelDelta < NativeMethods.WHEEL_DELTA, "cumulativeVerticalWheelDelta is too big"); 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); 5734Debug.Assert(ice != null, "How do we have a link without the InstanceCreationEditor?"); 7160Debug.Assert(mouseHookHandle != IntPtr.Zero, "Failed to install mouse hook"); 7235Debug.Assert(thisProcessID != 0, "Didn't get our process id!");
winforms\Managed\System\WinForms\PropertyGridInternal\SingleSelectRootGridEntry.cs (1)
44Debug.Assert(value != null,"Can't browse a null object!");
winforms\Managed\System\WinForms\PropertyStore.cs (10)
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."); 788Debug.Assert(index == 0, "LocateObjectEntry should have given us a zero index."); 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 (8)
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"); 3022Debug.Assert(data != null, "StreamIn passed a null stream"); 3135Debug.Assert(data != null, "StreamOut passed a null stream"); 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?"); 3791Debug.Assert(pLockBytes != null, "pLockBytes is NULL!"); 3796Debug.Assert(storage != null, "storage is NULL!");
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\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 (8)
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");
winforms\Managed\System\WinForms\TextBoxBase.cs (1)
2058Debug.Assert(IsHandleCreated, "Don't call this method until the handle is created.");
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 (5)
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?");
winforms\Managed\System\WinForms\ToolStripComboBox.cs (1)
654Debug.Assert(toolStripComboBox != null, "Why are we here and not a toolstrip combo?");
winforms\Managed\System\WinForms\ToolStripDropDown.cs (3)
1968Debug.Assert(reason != ToolStripDropDownCloseReason.ItemClicked, 2110Debug.Assert(countDropDownItemsAssignedTo > 0, "dropdown assignment underflow"); 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\ToolStripDropTargetManager.cs (1)
229Debug.Assert(false, "Why is lastDropTarget null?");
winforms\Managed\System\WinForms\ToolStripItem.cs (11)
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?"); 2961Debug.Assert(deltaTicks >= 0, "why are deltaticks less than zero? thats some mighty fast clicking"); 3549Debug.Assert(state[stateSelected], "calling notify selection change changed the selection state of this item"); 3893Debug.Assert((toPointType == ToolStripPointType.ToolStripCoords), "why are we here! - investigate"); 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"); 4583set { Debug.Assert(false, "We should never set the image list"); }
winforms\Managed\System\WinForms\ToolStripManager.cs (5)
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?"); 845Debug.Assert(!InMenuMode, "How did we get here if we're already in menu mode?"); 1420Debug.Assert(messageHookHandle != IntPtr.Zero, "Failed to install mouse hook");
winforms\Managed\System\WinForms\ToolStripMenuItem.cs (3)
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");
winforms\Managed\System\WinForms\ToolStripPanel.cs (1)
1266Debug.Assert(RowsInternal.Count <= Controls.Count, "How did the number of rows get larger than the number of controls?");
winforms\Managed\System\WinForms\ToolStripPanelCell.cs (1)
69Debug.Assert(cachedBounds.X >= 0 && cachedBounds.Y >= 0, "cached bounds are outside of the client area, investigate");
winforms\Managed\System\WinForms\ToolStripPanelRow.cs (2)
1188Debug.Assert(cell != null, "Dont expect cell to be null here, what's going on?"); 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\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\UnsafeNativeMethods.cs (2)
1150Debug.Assert(false, "GetSystemMetricsForDpi() is not available on this OS"); 1184Debug.Assert(false, "SystemParametersInfoForDpi() is not available on this OS");
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 (21)
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"); 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"); 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");
winforms\Managed\System\WinForms\WebBrowserContainer.cs (5)
51Debug.Assert(parent != null, "gotta have it..."); 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 (1)
168Debug.Assert(!this.Host.GetAXHostState(WebBrowserHelper.siteProcessedInputKey), "Re-entering UnsafeNativeMethods.IOleControlSite.TranslateAccelerator!!!");
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\WindowsFormsSynchronizationContext.cs (4)
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 (3)
Common\Annotation\AnnotationBase.cs (1)
3302Debug.Assert(axisName != null, "GetAxisByName: handed a null axis name");
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 (39)
Common\CompModHelpers.cs (1)
998Debug.Assert(false, "Invalid argument type. 'output' must either be string or TextWriter.");
ConstrainedGroup.cs (3)
227Debug.Assert(currentActivity == addedActivity.Parent, "Attempting to add wrong activity to CAG"); 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");
Delay.cs (2)
325Debug.Assert(timers != null, "TimerEventSubscriptionCollection on root activity should never be null, but it was"); 358Debug.Assert(timers != null, "TimerEventSubscriptionCollection on root activity should never be null, but it was");
EventHandlers.cs (1)
323Debug.Assert(!handlers.IsScopeCompleted, "Only notified of scope body completion once");
Listen.cs (1)
134Debug.Assert(addedActivity is EventDrivenActivity, "Listen only contains EventDriven activities");
LocalService\CorrelationResolver.cs (1)
203Debug.Assert(false, "locationPath points to something other than a Field/Property");
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 (3)
466System.Diagnostics.Debug.Assert(methods[m].MemberType == MemberTypes.Method, "expect methods only"); 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\RuleValidation.cs (15)
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"); 3078Debug.Assert(numCandidates > 0, "expected at least one candidate"); 3826Debug.Assert(!type.IsPointer && !type.IsByRef, 3860Debug.Assert((!type.IsGenericType || type.IsGenericTypeDefinition) && !type.HasElementType,
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 (2)
524Debug.Assert(StateMachineHelpers.IsLeafState(state), 532Debug.Assert(StateMachineHelpers.IsLeafState(state),
StateMachineHelpers.cs (1)
163Debug.Assert(state != null, "StateMachineHelpers.GetCurrentState: only valid to call this method from a State executor or a contained EventDriven");
Task.cs (1)
842Debug.Assert(false, "Child State Info not Found for the RunID");
WebServiceReceive.cs (1)
666Debug.Assert(webserviceInput.InterfaceType != null, "Interface type should not be null");
System.Workflow.ComponentModel (58)
AuthoringOM\Activity.cs (1)
588Debug.Assert(lockCountOnStatusChange > 0, "lock count on status change should be > 0");
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\Design\ActivityDesigner.cs (1)
463Debug.Assert(error != null, "someone inserted a null or no 'ValidationError' type error in errors collection.");
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\Connector.cs (1)
2704Debug.Assert(!(p != this.point1 && p != this.point2), "wrong extension requested");
AuthoringOM\Design\DesignerHelpers.cs (6)
958Debug.Assert(false, msg); 966Debug.Assert(false, msg); 974Debug.Assert(false, msg); 982Debug.Assert(false, msg); 990Debug.Assert(false, msg); 1132Debug.Assert(false, msg);
AuthoringOM\Design\DesignerResources.cs (1)
237System.Diagnostics.Debug.Assert(str != null, string.Format(culture, "String resource {0} not found.", new object[] { resID }));
AuthoringOM\Design\Dialogs\ThemeConfigurationDialog.cs (1)
661Debug.Assert(false, string.Format(CultureInfo.CurrentCulture, "Could not load type '{0}'", stockTypeName));
AuthoringOM\Design\DocumentOutline.cs (1)
31Debug.Assert(serviceProvider != null, "Creating WorkflowOutline without service host");
AuthoringOM\Design\PropertyDescriptors.cs (1)
944Debug.Assert(false, "SetValue should not be called on readonly property!");
AuthoringOM\Design\ReferenceService.cs (3)
77Debug.Assert(cs != null, "Reference service relies on IComponentChangeService"); 329Debug.Assert(trailingName != null, "Expected a trailing name"); 330Debug.Assert(reference != null, "Expected a reference");
AuthoringOM\Design\Themes.cs (1)
309Debug.Assert(false, "Install directory key is missing!");
AuthoringOM\Design\WorkflowView.cs (2)
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 (2)
242Debug.Assert(result, "ApplyTo failed"); 546Debug.Assert(result, "ApplyTo Failed");
AuthoringOM\Serializer\ActivityMarkupSerializer.cs (1)
136System.Diagnostics.Debug.Assert(startLine + 1 == lineNumber && startColumn + 1 == linePosition, "Error getting (line, column)!");
AuthoringOM\Serializer\ActivitySurrogate.cs (1)
237Debug.Assert(result, "ApplyTo failed");
AuthoringOM\Serializer\DependencyObjectCodeDomSerializer.cs (1)
188Debug.Assert(indexOfDot != -1, "Wrong property name in DesignTimeTypeNames hashtable.");
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\WorkflowMarkupSerializer.cs (10)
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."); 2642Debug.Assert((PropertyInfo)serializationManager.Context.Current == property, "Serializer did not remove an object it pushed into stack.");
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 (1)
996Debug.Assert(false, "Invalid argument type. 'output' must either be string or TextWriter.");
System.Workflow.Runtime (90)
AmbientEnvironment.cs (1)
189System.Diagnostics.Debug.Assert(instanceId != Guid.Empty, "IsInServiceThread expects valid guid.");
DebugEngine\DebugController.cs (1)
515Debug.Assert(this.controllerConduit != null, "Failed to create Controller Conduit");
DebugEngine\DebugControllerThread.cs (1)
135Debug.Assert(expressionEvaluationFrame != null, "Failed to create Expression Evaluation Frame.");
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 (1)
328System.Diagnostics.Debug.Assert(false, "Unknown performance counter operation.");
RTTrackingProfile.cs (4)
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");
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 (10)
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 (14)
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"); 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");
WorkflowInstance.cs (1)
61Debug.Assert(value.WorkflowStatus == WorkflowStatus.Completed || value.WorkflowStatus == WorkflowStatus.Terminated,
WorkflowQueuingService.cs (2)
474Debug.Assert(mergeItem.Value.Transactional, "Queue inside a transactional context is not transactional!"); 532Debug.Assert(this.rootQueuingService == null, "MarkQueueDirty should be done at root");
WorkflowRuntime.cs (3)
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"); 1582Debug.Assert(threadData != null, "unexpected call to EventContext::Dispose method");
WorkflowStateRollbackService.cs (2)
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");
System.Xml (178)
parent\parent\parent\parent\InternalApis\NDP_Common\inc\Win8Helpers.cs (1)
59Debug.Assert(hModule != IntPtr.Zero, "GetModuleHandle failed. Dll isn't loaded?");
System\Xml\BinaryXml\XmlBinaryReader.cs (8)
1762Debug.Assert(this.mark <= this.end, "Mark should never be past End"); 1763Debug.Assert(this.mark <= this.pos, "Mark should never be after Pos"); 2417Debug.Assert(this.stringValue == null, "this.stringValue == null"); 2418Debug.Assert(this.token == BinXmlToken.CData, "this.token == BinXmlToken.CData"); 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");
System\Xml\BitStack.cs (2)
49Debug.Assert(this.curr != 0x1, "Stack empty"); 68Debug.Assert(this.curr != 0x1, "Stack empty");
System\Xml\Cache\XPathDocumentBuilder.cs (5)
290Debug.Assert(this.idxParent != 0, "ID attribute must have an element parent"); 496Debug.Assert(prefix.Equals("xml"), "xmlns:xml namespace declaration should always be present in the list."); 634Debug.Assert(this.lineInfo.HasLineInfo(), "HasLineInfo should have been checked before this."); 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.");
System\Xml\Cache\XPathNode.cs (10)
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."); 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); 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 (23)
69Debug.Assert(pageNode != null && idxNode != 0, "Cannot pass null argument(s)"); 86Debug.Assert(pageNode != null && idxNode != 0, "Cannot pass null argument(s)"); 104Debug.Assert(pageNode != null && idxNode != 0, "Cannot pass null argument(s)"); 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)"); 179Debug.Assert(pageNode != null && idxNode != 0, "Cannot pass null argument(s)"); 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)"); 300Debug.Assert(pageNode != null && idxNode != 0, "Cannot pass null argument(s)"); 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\Core\SecureStringHasher.cs (1)
85Debug.Assert(false, "Randomized hashing is not supported.");
System\Xml\Core\XmlEventCache.cs (3)
238Debug.Assert(false, "Unknown event: " + page[idxEvent].EventType); 244Debug.Assert(false, "Unknown event should be added to end of event sequence."); 297Debug.Assert(false, "Unknown event should be added to end of event sequence.");
System\Xml\Core\XmlTextReaderImpl.cs (31)
777Debug.Assert( baseUriStr == string.Empty, "BaseURI can come either from XmlParserContext or from the constructor argument, not from both" ); 1148Debug.Assert(false,"Invalid InitInputType"); 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." ); 2062Debug.Assert( v1Compat, "XmlTextReaderImpl.ReadChars cannot be called on reader created via XmlReader.Create." ); 2096Debug.Assert( v1Compat, "XmlTextReaderImpl.ReadBase64 cannot be called on reader created via XmlReader.Create." ); 2126Debug.Assert( v1Compat, "XmlTextReaderImpl.ReadBinHex cannot be called on reader created via XmlReader.Create." ); 2806Debug.Assert( false, "Unhandled DtdProcessing enumeration value." ); 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, 3233Debug.Assert( false, "We should get an exception again." ); 4213Debug.Assert( false, "We should never get to this point." ); 4854Debug.Assert( false, "We should never get to this point." ); 6366Debug.Assert( false, "We should never get to this point." ); 6452Debug.Assert( false, "We should never get to this point." ); 7168Debug.Assert( xmlResolver.SupportsType( uri, typeof( Stream ) ), "Stream must always be a supported type in XmlResolver" ); 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!" ); 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." ); 8058Debug.Assert( context.NameTable == null || context.NameTable == nt, "This check should have been done in XmlParserContext constructor." ); 8148Debug.Assert( curNode.type == XmlNodeType.Whitespace && newNodeType == XmlNodeType.SignificantWhitespace, "Incorrect node type change!" );
System\Xml\Core\XmlTextReaderImplAsync.cs (7)
69Debug.Assert(false, "Invalid InitInputType"); 950Debug.Assert( false, "Unhandled DtdProcessing enumeration value." ); 2077Debug.Assert(false, "We should never get to this point."); 2641Debug.Assert( false, "We should never get to this point." ); 4423Debug.Assert( false, "We should never get to this point." ); 4509Debug.Assert( false, "We should never get to this point." ); 4812Debug.Assert( xmlResolver.SupportsType( uri, typeof( Stream ) ), "Stream must always be a supported type in XmlResolver" );
System\Xml\Core\XmlTextReaderImplHelpers.cs (2)
425Debug.Assert( valueStartPos >= 0 || this.value != null, "Value not ready." ); 622Debug.Assert( false, "We should never get to this point." );
System\Xml\Core\XmlTextWriter.cs (2)
1197Debug.Assert (declared == true, "Unexpected situation!!"); 1207Debug.Assert(false, "Should have never come here");
System\Xml\Core\XmlWellFormedWriter.cs (4)
303Debug.Assert(false, "Expected currentState <= State.Error "); 1348Debug.Assert(false, "State.Attribute == currentState || State.RootLevelAttr == currentState"); 1706Debug.Assert(false, "We should not get to this point."); 1730Debug.Assert(false, "We should never get to this point. State = " + state);
System\Xml\Core\XmlWellFormedWriterAsync.cs (1)
1149Debug.Assert(false, "We should not get to this point.");
System\Xml\Core\XmlWellFormedWriterHelpers.cs (1)
333Debug.Assert(false, "Unexpected ItemType value.");
System\Xml\Core\XmlWellFormedWriterHelpersAsync.cs (1)
87Debug.Assert(false, "Unexpected ItemType value.");
System\Xml\Core\XmlWriterSettings.cs (4)
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\Dom\DocumentXPathNavigator.cs (3)
1080Debug.Assert( node1 != node2, "Should be handled by ComparePosition()" ); 1534Debug.Assert(node != null, "Undefined navigator position"); 1535Debug.Assert(node == document || node.OwnerDocument == document, "Navigator switched documents");
System\Xml\Dom\XmlNode.cs (1)
692Debug.Assert( true, "shouldn't have fall through here." );
System\Xml\Schema\DtdParser.cs (1)
3263Debug.Assert( false, "This is an unexpected error that should have been handled in the ScanXXX methods." );
System\Xml\Schema\Inference\Infer.cs (4)
277Debug.Assert(this.rootSchema != null, "rootSchema is null"); 500Debug.Assert(targetNS == null || targetNS.Length > 0 , "targetns for schema is empty"); 1722Debug.Assert(false, "Expected type not matched"); 2360Debug.Assert(false, "Expected date, time or dateTime");
System\Xml\Schema\XmlAtomicValue.cs (8)
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\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\XmlSchemaObjectTable.cs (3)
23Debug.Assert(!table.ContainsKey(name), "XmlSchemaObjectTable.Add: entry already exists"); 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\XmlValueConverter.cs (7)
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");
System\Xml\Schema\XsdBuilder.cs (2)
931Debug.Assert(false, "State is " + state); 1054Debug.Assert(false, "State is " + state);
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\Serialization\CodeGenerator.cs (3)
133System.Diagnostics.Debug.Assert(false, msg); 1058Debug.Assert(false, "Char is not a valid schema primitive and should be treated as int in DataContract"); 1130Debug.Assert(false, "UnknownConstantType");
System\Xml\XmlException.cs (1)
299Debug.Assert(e != null, "Unexpected null exception");
System\Xml\XmlQualifiedName.cs (1)
180Debug.Assert(false, "Randomized hashing is not supported.");
System\Xml\XPath\Internal\BooleanFunctions.cs (1)
60Debug.Assert(result is XPathNavigator, "Unknown value type");
System\Xml\XPath\Internal\CompiledXPathExpr.cs (1)
42Debug.Assert(query != null, "In case of error in XPath we create ErrorXPathExpression");
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\LogicalExpr.cs (2)
213Debug.Assert( op == Operator.Op.EQ || op == Operator.Op.NE, 309Debug.Assert( op == Operator.Op.EQ || op == Operator.Op.NE,
System\Xml\XPath\Internal\NamespaceQuery.cs (1)
54Debug.Assert(e.LocalName.Length == 0, "Only xmlns='' can have empty string as a value");
System\Xml\XPath\Internal\PrecedingQuery.cs (1)
77Debug.Assert(qyInput.Advance() == null, "we read all qyInput.Advance() already");
System\Xml\XPath\Internal\PrecedingSibling.cs (1)
63Debug.Assert(test, "We just moved to parent, how we can not have first child?");
System\Xml\XPath\Internal\Query.cs (8)
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 (3)
23Debug.Assert(qyInput != null, "Sort Query needs an input query tree to work on"); 51Debug.Assert(numSorts > 0, "Why was the sort query created?"); 181Debug.Assert(x != null && y != null, "Oops!! what happened?");
System\Xml\XPath\Internal\StringFunctions.cs (1)
23Debug.Assert(argList != null, "Use 'new Query[]{}' instead.");
System\Xml\XPath\Internal\XPathMultyIterator.cs (2)
136Debug.Assert(position != 0, "MoveNext() wasn't called"); 137Debug.Assert(firstNotEmpty < arr.Length, "MoveNext() returned false");
System\Xml\XPath\Internal\XPathParser.cs (1)
442 Debug.Assert(opnd != null, "IsPrimaryExpr() was true. We should recognize this lex.");
System\Xml\XPath\XPathDocument.cs (1)
169Debug.Assert((object) this.nameTable.Get(string.Empty) == (object) string.Empty, "NameTable must contain atomized string.Empty");
System\Xml\XPath\XPathNavigator.cs (3)
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" );
System\Xml\XPath\XPathNavigatorReader.cs (1)
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.Linq (12)
System\Xml\Linq\XLinq.cs (12)
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"); 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 (28)
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 (4)
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 (5)
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"); 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");
UIAutomationClientsideProviders (69)
MS\Internal\AutomationProxies\Accessible.cs (5)
158Debug.Assert(acc != null, "null IAccessible"); 715Debug.Assert( false, "Need to handle Accessible.accFocus case!" ); 968System.Diagnostics.Debug.Assert(false, "Call to AccessibleChildren() returned E_INVALIDARG."); 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\MSAANativeProvider.cs (1)
65Debug.Assert(acc != null, "acc");
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 (14)
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."); 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.");
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\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 (1)
76Debug.Assert (idChild == 0, "Invalid Child Id, idChild != 0");
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");
WindowsBase (223)
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 (1)
46Debug.Assert(!(property is DependencyObjectPropertyDescriptor), "Wrapping a DP in a DP");
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\FreezableDefaultValueFactory.cs (7)
39Debug.Assert(defaultValue != null, 41Debug.Assert(defaultValue.CanFreeze, 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\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 (5)
565Debug.Assert(!match, "Must only be called when there is no match"); 593Debug.Assert(blockCount > 0, 605Debug.Assert( newPosition == _prefixLengthSize + firstBlockOffset, 692Debug.Assert(blockSize > 1, "GetBlockNo recieved blockSize parameter value <= 1"); 693Debug.Assert(index >= 0 , "GetBlockNo recieved index parameter value < 0");
Base\MS\Internal\IO\Packaging\CompressStream.cs (10)
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, 637Debug.Assert(bytesToSeek > 0, "Logic Error - bytesToSeek should be positive"); 731Debug.Assert(false, "Illegal state for CompressStream - logic error"); break; 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\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\PartManifestEntry.cs (1)
51Debug.Assert(_owningPartUri != null, "Logic error: OwningPart is null on a non-Relationship entry");
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 (1)
784Debug.Assert(SignaturePart.GetStream().Length == 0, "Logic Error: Can't sign when signature already exists");
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\ZipIOBlockManager.cs (12)
197Debug.Assert(!_openStreaming, "Not legal in Streaming mode"); 280Debug.Assert(!_openStreaming, "Not legal in Streaming mode"); 319Debug.Assert(!_openStreaming, "Not legal in Streaming mode"); 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), 355Debug.Assert(!_openStreaming, "Not legal in Streaming mode"); 873Debug.Assert(!_openStreaming, "Not legal in Streaming mode"); 1077Debug.Assert(!_openStreaming, "Not legal in Streaming mode"); 1132Debug.Assert(!_openStreaming, "Not legal in Streaming mode"); 1158Debug.Assert(!_openStreaming, "Not legal in Streaming mode"); 1171Debug.Assert(!_openStreaming, "Not legal in Streaming mode");
Base\MS\Internal\IO\Zip\ZipIOCentralDirectoryBlock.cs (1)
379Debug.Assert(h1 != null && h2 != null, "HeaderFileOffsetComparer: Comparing the wrong data types");
Base\MS\Internal\IO\Zip\ZipIOCentralDirectoryFileHeader.cs (1)
406Debug.Assert(_versionNeededToExtract <= fileBlock.VersionNeededToExtract, "Should never be making this smaller");
Base\MS\Internal\IO\Zip\ZipIOLocalFileBlock.cs (8)
106Debug.Assert(!_blockManager.Streaming, "Not legal in Streaming mode"); 125Debug.Assert(_blockManager.Streaming, "Only legal in Streaming mode"); 184Debug.Assert(!_blockManager.Streaming, "Not legal in Streaming mode"); 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), 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\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\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 (9)
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"); 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 (1)
899Debug.Assert(
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 (3)
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 (2)
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 (9)
459Debug.Assert((partName.Length - file.Length) > 0, 517Debug.Assert((path.Length - partNameWithoutExtension.Length - _relationshipPartExtensionName.Length - 1) > 0, 523Debug.Assert((path.Length - _relationshipPartSegmentName.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");
Base\System\IO\Packaging\ZipPackage.cs (6)
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"); 1390Debug.Assert(!reader.IsEmptyElement, "This method should only be called it the Relationship Element is not empty");
Base\System\Windows\DependencyObject.cs (35)
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"); 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"); 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 (3)
178Debug.Assert(hasExpressionMarker == (value == DependencyObject.ExpressionInAlternativeStore), "hasExpressionMarker flag must match value"); 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"); 505Debug.Assert(BaseValueSourceInternal == BaseValueSourceInternal.Local, "This can happen only on an entry already having a local value");
Base\System\Windows\Freezable.cs (9)
64Debug.Assert(!Freezable_Frozen 975Debug.Assert(!(sourceValue is Expression && sourceValue is Freezable), 1042Debug.Assert(owner != null && child != 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\PropertyMetadata.cs (2)
138Debug.Assert(owner != null && property != null, 173Debug.Assert(!owner.IsSealed,
Base\System\Windows\Threading\Dispatcher.cs (1)
1952Debug.Assert(isSentinel, "this ctor is only for creating a 'sentinel' dispatcher");
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\IO\Packaging\PackagingUtilities.cs (2)
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\TokenizerHelper.cs (1)
201Debug.Assert(!Char.IsWhiteSpace(currentChar),"Token started on Whitespace");
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\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 (4)
CommandLine\ArgumentsParser.cs (1)
138Debug.Assert(config != null, "config is null");
CommandLine\OptionUsage.cs (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");
WsatUI (2)
Configuration\MsdtcWrapper.cs (1)
205System.Diagnostics.Debug.Assert(controller != null,
Configuration\RegistryExceptionHelper.cs (1)
52System.Diagnostics.Debug.Assert(false, "registryHive is not supported");