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\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\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\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,
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\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\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\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\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\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\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\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\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\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\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\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\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\Primitives\DataGridCellsPresenter.cs (1)
355Debug.Assert(
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\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\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\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\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\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\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\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\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\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\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");
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\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\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\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");
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\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");
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");
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\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\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);
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\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\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\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\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\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\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\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\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\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\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\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\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\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\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\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\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\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\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\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\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\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\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\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\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\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\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\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\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\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\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\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\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\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\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\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\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\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\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\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\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");
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\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\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\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\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\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\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\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\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\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\EntityContainerAssociationSet.cs (1)
120Debug.Assert(
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\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\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\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\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\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\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\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\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\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\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\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\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\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\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\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\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\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\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\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\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\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\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\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\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\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\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\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\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\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\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\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\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\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\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\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\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?");
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");
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.");