717 references to Fx
System.ServiceModel.Primitives (717)
Internals\System\Runtime\ActionItem.cs (24)
22Fx.Assert(callback != null, "A null callback was passed for Schedule!"); 24Fx.Trace.IsEnd2EndActivityTracingEnabled) 36Fx.Assert(callback != null, "A null callback was passed for Schedule!"); 38Fx.Trace.IsEnd2EndActivityTracingEnabled) 56throw Fx.Exception.AsError(new InvalidOperationException(InternalSR.ActionItemIsAlreadyScheduled)); 67throw Fx.Exception.AsError(new InvalidOperationException(InternalSR.ActionItemIsAlreadyScheduled)); 76Fx.Assert(callback != null, "Cannot schedule a null callback"); 82Fx.Assert(callback != null, "Cannot schedule a null callback"); 153Fx.Assert(callback != null, "Shouldn't instantiate an object to wrap a null callback"); 161if (Fx.Trace.IsEnd2EndActivityTracingEnabled) 164if (TraceCore.ActionItemScheduledIsEnabled(Fx.Trace)) 166TraceCore.ActionItemScheduled(Fx.Trace, _eventTraceActivity); 173Fx.Assert(callback != null, "Shouldn't instantiate an object to wrap a null callback"); 181if (Fx.Trace.IsEnd2EndActivityTracingEnabled) 184if (TraceCore.ActionItemScheduledIsEnabled(Fx.Trace)) 186TraceCore.ActionItemScheduled(Fx.Trace, _eventTraceActivity); 193Fx.Assert(_asyncCallback == null, "Can't call Invoke on async ActionItem"); 194if (_flowLegacyActivityId || Fx.Trace.IsEnd2EndActivityTracingEnabled) 206Fx.Assert(_callback == null, "Can't call InvokeAsync on sync ActionItem"); 207if (_flowLegacyActivityId || Fx.Trace.IsEnd2EndActivityTracingEnabled) 243if (TraceCore.ActionItemCallbackInvokedIsEnabled(Fx.Trace)) 245TraceCore.ActionItemCallbackInvoked(Fx.Trace, _eventTraceActivity); 287if (TraceCore.ActionItemCallbackInvokedIsEnabled(Fx.Trace)) 289TraceCore.ActionItemCallbackInvoked(Fx.Trace, _eventTraceActivity);
Internals\System\Runtime\AsyncLock.cs (3)
85Fx.Assert(_nextSemaphore == _asyncLock._currentSemaphore.Value, "_nextSemaphore was expected to by the current semaphore"); 112Fx.Assert(_nextSemaphore == _asyncLock._currentSemaphore.Value, "_nextSemaphore was expected to by the current semaphore"); 140Fx.Assert("Shouldn't be returning semaphore with a count != 1");
Internals\System\Runtime\AsyncResult.cs (20)
11[Fx.Tag.SynchronizationPrimitive(Fx.Tag.BlocksUsing.ManualResetEvent, SupportsAsync = true, ReleaseMethod = "Complete")] 21[Fx.Tag.SynchronizationObject] 24[Fx.Tag.SynchronizationObject(Blocking = false)] 93throw Fx.Exception.AsError(new InvalidOperationException(InternalSR.AsyncResultCompletedTwice(GetType()))); 108if (Fx.IsFatal(exception)) 120Fx.Assert(_manualResetEvent == null, "No ManualResetEvent should be created for a synchronous AsyncResult."); 150if (Fx.IsFatal(e)) 155throw Fx.Exception.AsError(new CallbackException(InternalSR.AsyncCallbackThrewException, e)); 170throw Fx.Exception.AsError(new InvalidOperationException(InternalSR.InvalidNullAsyncResult)); 197if (Fx.IsFatal(e)) 239AsyncResult.s_asyncCompletionWrapperCallback = Fx.ThunkCallback(new AsyncCallback(AsyncCompletionWrapperCallback)); 267throw Fx.Exception.AsError(new InvalidOperationException(InternalSR.InvalidNullAsyncResult)); 300throw Fx.Exception.AsError(new InvalidOperationException(InternalSR.InvalidAsyncResultImplementation(result.GetType()))); 312throw Fx.Exception.AsError(new InvalidOperationException(message)); 315[Fx.Tag.Blocking(Conditional = "!asyncResult.isCompleted")] 321throw Fx.Exception.ArgumentNull("result"); 328throw Fx.Exception.Argument("result", InternalSR.InvalidAsyncResult); 333throw Fx.Exception.AsError(new InvalidOperationException(InternalSR.AsyncResultAlreadyEnded)); 351throw Fx.Exception.AsError(asyncResult._exception);
Internals\System\Runtime\BufferedOutputStream.cs (24)
12[Fx.Tag.Cache(typeof(byte), Fx.Tag.CacheAttrition.None, Scope = Fx.Tag.Strings.ExternallyManaged, 13SizeLimit = Fx.Tag.Strings.ExternallyManaged)] 15[Fx.Tag.Queue(typeof(byte), SizeLimit = "BufferedOutputStream(maxSize)", 83throw Fx.Exception.AsError(new NotSupportedException(InternalSR.SeekNotSupported)); 87throw Fx.Exception.AsError(new NotSupportedException(InternalSR.SeekNotSupported)); 98Fx.Assert(!_initialized, "Clear must be called before re-initializing stream"); 139throw Fx.Exception.AsError(new NotSupportedException(InternalSR.ReadNotSupported)); 144throw Fx.Exception.AsError(new NotSupportedException(InternalSR.ReadNotSupported)); 186throw Fx.Exception.AsError(new NotSupportedException(InternalSR.ReadNotSupported)); 191throw Fx.Exception.AsError(new NotSupportedException(InternalSR.ReadNotSupported)); 196throw Fx.Exception.AsError(new NotSupportedException(InternalSR.SeekNotSupported)); 201throw Fx.Exception.AsError(new NotSupportedException(InternalSR.SeekNotSupported)); 213Fx.Assert(_initialized, "No data to return from uninitialized stream"); 214Fx.Assert(!_bufferReturned, "ToArray cannot be called more than once"); 259Fx.Assert(_initialized, "Cannot write to uninitialized stream"); 260Fx.Assert(!_bufferReturned, "Cannot write to stream once ToArray has been called."); 264throw Fx.Exception.ArgumentOutOfRange("size", size, InternalSR.ValueMustBeNonNegative); 269throw Fx.Exception.AsError(CreateQuotaExceededException(_maxSizeQuota)); 275throw Fx.Exception.AsError(CreateQuotaExceededException(_maxSizeQuota)); 304Fx.Assert(_initialized, "Cannot write to uninitialized stream"); 305Fx.Assert(!_bufferReturned, "Cannot write to stream once ToArray has been called."); 309throw Fx.Exception.AsError(CreateQuotaExceededException(_maxSize));
Internals\System\Runtime\CallbackException.cs (3)
18Fx.Assert(innerException != null, "CallbackException requires an inner exception."); 19Fx.Assert(!Fx.IsFatal(innerException), "CallbackException can't be used to wrap fatal exceptions.");
Internals\System\Runtime\CompletedAsyncResult.cs (6)
17[Fx.Tag.GuaranteeNonBlocking] 20Fx.AssertAndThrowFatal(result.IsCompleted, "CompletedAsyncResult was not completed!"); 36[Fx.Tag.GuaranteeNonBlocking] 39Fx.AssertAndThrowFatal(result.IsCompleted, "CompletedAsyncResult<T> was not completed!"); 58[Fx.Tag.GuaranteeNonBlocking] 61Fx.AssertAndThrowFatal(result.IsCompleted, "CompletedAsyncResult<T> was not completed!");
Internals\System\Runtime\Diagnostics\EtwDiagnosticTrace.cs (1)
365Fx.Assert(sb != null, "'sb' MUST NOT be NULL.");
Internals\System\Runtime\Diagnostics\EventDescriptor.cs (4)
43throw Fx.Exception.ArgumentOutOfRange("id", id, InternalSR.ValueMustBeNonNegative); 48throw Fx.Exception.ArgumentOutOfRange("id", id, string.Empty); 60throw Fx.Exception.ArgumentOutOfRange("task", task, InternalSR.ValueMustBeNonNegative); 65throw Fx.Exception.ArgumentOutOfRange("task", task, string.Empty);
Internals\System\Runtime\ExceptionTrace.cs (6)
24Fx.Assert(diagnosticTrace != null, "'diagnosticTrace' MUST NOT be NULL."); 140Fx.Assert(targetInvocationException != null, "targetInvocationException cannot be null."); 144if (Fx.IsFatal(targetInvocationException)) 184Fx.Assert(aggregateException != null, "aggregateException cannot be null."); 188if (Fx.IsFatal(aggregateException)) 223Fx.Assert(innerExceptions.Count > 0, "InnerException.Count is known to be > 0 here.");
Internals\System\Runtime\FatalException.cs (2)
19Fx.Assert(innerException == null || !Fx.IsFatal(innerException), "FatalException can't be used to wrap fatal exceptions.");
Internals\System\Runtime\Fx.cs (25)
88return Fx.s_asynchronousThreadExceptionHandler; 92Fx.s_asynchronousThreadExceptionHandler = value; 122Fx.Assert(description); 138Fx.Assert(description); 159Fx.Assert(description); 168Fx.Exception.TraceFailFast(failFastMessage); 242if (!Fx.s_breakOnExceptionTypesRetrieved) 245if (TryGetDebugSwitch(Fx.BreakOnExceptionTypesName, out value)) 257Fx.s_breakOnExceptionTypesCache = types.ToArray(); 261Fx.s_breakOnExceptionTypesRetrieved = true; 263return Fx.s_breakOnExceptionTypesCache; 304Fx.Assert(callback != null, "Trying to create a ThunkCallback with a null callback method"); 381throw Fx.Exception.AsError( 395Fx.Exception.TraceUnhandledException(exception); 414Fx.Assert("Null exception in HandleAtThreadBase."); 422ExceptionHandler handler = Fx.AsynchronousThreadExceptionHandler; 450UpdateLevel(Fx.Trace); 486if (!Fx.HandleAtThreadBase(exception)) 625ElementType = elementType ?? throw Fx.Exception.ArgumentNull("elementType"); 653ElementType = elementType ?? throw Fx.Exception.ArgumentNull("elementType"); 676throw Fx.Exception.ArgumentNullOrEmpty("limit"); 810throw Fx.Exception.ArgumentNullOrEmpty("diagnosis"); 813ExceptionType = exceptionType ?? throw Fx.Exception.ArgumentNull("exceptionType"); 948if (!Fx.HandleAtThreadBase(exception)) 981if (!Fx.HandleAtThreadBase(exception))
Internals\System\Runtime\InputQueue.cs (17)
37Fx.Assert(asyncCallbackGenerator != null, "use default ctor if you don't have a generator"); 147throw Fx.Exception.AsError(new TimeoutException(InternalSR.TimeoutInputQueueDequeue(timeout))); 159throw Fx.Exception.AsError(new TimeoutException(InternalSR.TimeoutInputQueueDequeue(timeout))); 347throw Fx.Exception.AsError(new TimeoutException()); 381Fx.Assert(exception != null, "EnqueueAndDispatch: exception parameter should not be null"); 387Fx.Assert(item != null, "EnqueueAndDispatch: item parameter should not be null"); 393Fx.Assert(item != null, "EnqueueWithoutDispatch: item parameter should not be null"); 399Fx.Assert(exception != null, "EnqueueWithoutDispatch: exception parameter should not be null"); 676Fx.Assert(state != null, "InputQueue.OnInvokeDequeuedCallback: (state != null)"); 805Fx.Assert(reader != null, "InputQueue.RemoveReader: (reader != null)"); 884throw Fx.Exception.AsError(Exception); 1030Fx.AssertAndThrow(ItemCount != _pendingCount, "ItemQueue does not contain any available items"); 1047Fx.AssertAndThrow(_pendingCount != 0, "ItemQueue does not contain any pending items"); 1053Fx.AssertAndThrow(ItemCount != 0, "ItemQueue does not contain any items"); 1096Fx.Assert(_item == null, "InputQueue.WaitQueueReader.Set: (this.item == null)"); 1097Fx.Assert(_exception == null, "InputQueue.WaitQueueReader.Set: (this.exception == null)"); 1136throw Fx.Exception.AsError(_exception);
Internals\System\Runtime\InternalBufferManager.cs (13)
33Fx.Assert(maxBufferPoolSize > 0 && maxBufferSize >= 0, "bad params, caller should verify"); 117if (TraceCore.BufferPoolChangeQuotaIsEnabled(Fx.Trace)) 119TraceCore.BufferPoolChangeQuota(Fx.Trace, bufferPool.BufferSize, delta); 212Fx.Assert(buffer != null, "caller must verify"); 220throw Fx.Exception.Argument("buffer", InternalSR.BufferIsNotRightSizeForBufferManager); 232Fx.Assert(bufferSize >= 0, "caller must ensure a non-negative argument"); 255if (TraceCore.BufferPoolAllocationIsEnabled(Fx.Trace)) 257TraceCore.BufferPoolAllocation(Fx.Trace, bufferPool.BufferSize); 260returnValue = Fx.AllocateByteArray(bufferPool.BufferSize); 265if (TraceCore.BufferPoolAllocationIsEnabled(Fx.Trace)) 267TraceCore.BufferPoolAllocation(Fx.Trace, bufferSize); 270returnValue = Fx.AllocateByteArray(bufferSize); 512return Fx.AllocateByteArray(bufferSize);
Internals\System\Runtime\IOThreadScheduler.cs (8)
108throw Fx.Exception.ArgumentNull(nameof(callback)); 128throw Fx.Exception.ArgumentNull(nameof(callback)); 155throw Fx.AssertAndThrowFatal("Head/Tail overflow!"); 446Fx.ThunkCallback(new IOCompletionCallback(IOCallback)), null); 491Fx.Assert(iots != null, "Overlapped completed without a scheduler."); 522Fx.Assert(_scheduler == null, "Post called on an overlapped that is already posted."); 523Fx.Assert(iots != null, "Post called with a null scheduler."); 545throw Fx.AssertAndThrowFatal("Cleanup called on an overlapped that is in-flight.");
Internals\System\Runtime\IOThreadTimer.cs (6)
399Fx.Assert(count > 0, "Should have at least one timer in our queue."); 414Fx.Assert(index > 0, ""); 415Fx.Assert(index <= count, ""); 445Fx.Assert(timer.index == 0, "Timer should not have an index."); 498Fx.Assert(index > 0, ""); 499Fx.Assert(index <= count, "");
Internals\System\Runtime\MruCache.cs (6)
53Fx.Assert(lowWatermark < highWatermark, ""); 54Fx.Assert(lowWatermark >= 0, ""); 82Fx.Assert(null != key, ""); 144if (Fx.IsFatal(e)) 160Fx.Assert(null != key, ""); 226Fx.Assert(refCount >= 0, "Ref count shouldn't go below zero");
Internals\System\Runtime\ScheduleActionItemAsyncResult.cs (1)
35if (Fx.IsFatal(ex))
Internals\System\Runtime\SignalGate.cs (7)
10[Fx.Tag.SynchronizationPrimitive(Fx.Tag.BlocksUsing.NonBlocking)] 13[Fx.Tag.SynchronizationObject(Blocking = false, Kind = Fx.Tag.SynchronizationKind.InterlockedNoSpin)] 86throw Fx.Exception.AsError(new InvalidOperationException(InternalSR.InvalidSemaphoreExit)); 97[Fx.Tag.SynchronizationPrimitive(Fx.Tag.BlocksUsing.NonBlocking)]
Internals\System\Runtime\SynchronizedPool.cs (3)
11[Fx.Tag.SynchronizationObject(Blocking = false)] 336[Fx.Tag.SecurityNote(Critical = "Asserts in order to get the processor count from the environment", Safe = "This data isn't actually protected so it's ok to leak")] 343[Fx.Tag.SynchronizationObject(Blocking = false)]
Internals\System\Runtime\TaskHelpers.cs (9)
24throw Fx.Exception.AsError<TException>(task.Exception); 252Fx.Assert(task.IsCompleted || !IOThreadScheduler.IsRunningOnIOThread, "Waiting on an IO Thread might cause problems"); 266Fx.Assert(!IOThreadScheduler.IsRunningOnIOThread, "Waiting on an IO Thread might cause problems"); 278Fx.Assert(task.IsCompleted || !IOThreadScheduler.IsRunningOnIOThread, "Waiting on an IO Thread might cause problems"); 288Fx.Assert(!IOThreadScheduler.IsRunningOnIOThread, "Waiting on an IO Thread might cause problems"); 308Fx.Assert(!IOThreadScheduler.IsRunningOnIOThread, "Waiting on an IO Thread might cause problems"); 335if (Fx.IsFatal(ex) || exceptionConverter == null) 345throw Fx.Exception.AsError(new TimeoutException(InternalSR.TaskTimedOutError(timeout))); 398Fx.Assert(Thread.CurrentThread.IsThreadPoolThread, "We should be running on the thread pool");
Internals\System\Runtime\Ticks.cs (1)
14[Fx.Tag.SecurityNote(Miscellaneous = "Why isn't the SuppressUnmanagedCodeSecurity attribute working in this case?")]
Internals\System\Runtime\TimeoutHelper.cs (2)
190throw Fx.Exception.ArgumentOutOfRange(argumentName, timeout, InternalSR.TimeoutMustBeNonNegative(argumentName, timeout)); 203throw Fx.Exception.ArgumentOutOfRange(argumentName, timeout, InternalSR.TimeoutMustBePositive(argumentName, timeout));
Internals\System\Runtime\UrlUtility.cs (3)
39throw Fx.Exception.ArgumentNull("query"); 44throw Fx.Exception.ArgumentNull("encoding"); 370Fx.Assert(n < 0x10, "n < 0x10");
Internals\System\Text\BinHexEncoding.cs (4)
31Fx.Assert(s_char2val[ch] == ch - '0', ""); 36Fx.Assert(s_char2val[ch] == ch - 'A' + 10, ""); 41Fx.Assert(s_char2val[ch] == ch - 'a' + 10, ""); 94Fx.Assert(pch + 2 <= pchMax, "");
Internals\System\Xml\XmlMtomReader.cs (2)
551if (Fx.IsFatal(e)) 1851Fx.Assert(content != null, "");
SMDiagnostics\DiagnosticUtility.cs (1)
104Fx.Assert(message);
SMDiagnostics\System\ServiceModel\Diagnostics\ExceptionUtility.cs (2)
44return fatal ? Fx.AssertAndThrowFatal("Fatal InternalException should never be thrown.") : Fx.AssertAndThrow("InternalException should never be thrown.");
System\IdentityModel\Psha1DerivedKeyGenerator.cs (2)
51_seed = Fx.AllocateByteArray(checked(label.Length + seed.Length)); 61_buffer = Fx.AllocateByteArray(checked(_hmac.HashSize / 8 + _seed.Length));
System\IdentityModel\SecurityUtils.cs (1)
81byte[] copy = Fx.AllocateByteArray(len);
System\IdentityModel\Selectors\SecurityTokenProvider.cs (4)
65throw Fx.Exception.AsError(new SecurityTokenException(SRP.Format(SRP.TokenProviderUnableToGetToken, this))); 144throw Fx.Exception.ArgumentNull(nameof(tokenToBeRenewed)); 150throw Fx.Exception.AsError(new SecurityTokenException(SRP.Format(SRP.TokenProviderUnableToRenewToken, this))); 217throw Fx.Exception.ArgumentNull(nameof(token));
System\IdentityModel\Selectors\SecurityTokenRequirement.cs (3)
123throw Fx.Exception.ArgumentOutOfRange("value", value, SRP.ValueMustBeNonNegative); 151throw Fx.Exception.Argument(propertyName, string.Format(SRP.SecurityTokenRequirementDoesNotContainProperty, propertyName)); 166throw Fx.Exception.Argument(propertyName, string.Format(SRP.SecurityTokenRequirementHasInvalidTypeForProperty, propertyName, dictionaryValue.GetType(), typeof(TValue)));
System\IdentityModel\Tokens\KeyInfoSerializer.cs (3)
200if (Fx.IsFatal(e)) 253if (Fx.IsFatal(e)) 297if (Fx.IsFatal(e))
System\IdentityModel\Tokens\SecurityKeyType.cs (1)
31throw Fx.Exception.AsError(new InvalidEnumArgumentException("value", (int)value,
System\IdentityModel\Tokens\SecurityKeyUsage.cs (1)
29throw Fx.Exception.AsError(new InvalidEnumArgumentException("value", (int)value,
System\IdentityModel\Tokens\UserNameSecurityToken.cs (2)
26throw Fx.Exception.ArgumentNull(nameof(userName)); 31throw Fx.Exception.Argument(nameof(userName), SRP.UserNameCannotBeEmpty);
System\ServiceModel\ActionMismatchAddressingException.cs (1)
31Fx.Assert(messageVersion.Addressing == AddressingVersion.WSAddressing10, "");
System\ServiceModel\ChannelFactory.cs (2)
172Fx.Assert(State == CommunicationState.Created || State == CommunicationState.Opening, ""); 181Fx.Assert(State == CommunicationState.Created || State == CommunicationState.Opening, "");
System\ServiceModel\ChannelFactoryRefCache.cs (1)
30Fx.Assert(_refCount >= 0, "RefCount should not be less than zero.");
System\ServiceModel\Channels\AddressHeader.cs (3)
346Fx.Assert(reader.NodeType == XmlNodeType.Element, ""); 349Fx.Assert(_name != null, ""); 350Fx.Assert(_ns != null, "");
System\ServiceModel\Channels\Addressing.cs (7)
95Fx.Assert(reader.IsStartElement(XD.AddressingDictionary.Action, addressingVersion.DictionaryNamespace), ""); 227Fx.Assert(reader.IsStartElement(XD.AddressingDictionary.From, addressingVersion.DictionaryNamespace), ""); 321Fx.Assert(reader.IsStartElement(XD.AddressingDictionary.FaultTo, version.DictionaryNamespace), ""); 466Fx.Assert(reader.IsStartElement(XD.AddressingDictionary.To, version.DictionaryNamespace), ""); 662Fx.Assert(reader.IsStartElement(XD.AddressingDictionary.ReplyTo, version.DictionaryNamespace), ""); 741Fx.Assert(reader.IsStartElement(XD.AddressingDictionary.MessageId, version.DictionaryNamespace), ""); 883Fx.Assert(reader.IsStartElement(addressingDictionary.RelatesTo, version.DictionaryNamespace), "");
System\ServiceModel\Channels\BinaryMessageEncoder.cs (4)
1615if (Fx.IsFatal(e)) 1628if (Fx.IsFatal(e)) 1647if (Fx.IsFatal(e)) 1668if (Fx.IsFatal(e))
System\ServiceModel\Channels\BindingElement.cs (1)
51Fx.Assert(true, "Should not be called unless this binding element is used in one of the standard bindings. In which case, please re-implement the IsMatch() method.");
System\ServiceModel\Channels\ChannelReliableSession.cs (7)
356throw Fx.AssertAndThrow("Unknown version."); 399throw Fx.AssertAndThrow("This method must be called from a fault thread."); 565Fx.Assert("This channel type is not supported"); 604throw Fx.AssertAndThrow("The client reliable channel must set the polling handler prior to opening the client reliable session."); 658throw Fx.AssertAndThrow("Unknown polling mode."); 778throw Fx.AssertAndThrow("Reliable messaging version not supported."); 816throw Fx.AssertAndThrow("Can't resume polling if pollingMode != PollingMode.NotPolling");
System\ServiceModel\Channels\ClientReliableChannelBinder.cs (5)
107throw Fx.AssertAndThrow("ClientReliableChannelBinder supports creation of IDuplexChannel, IDuplexSessionChannel, IRequestChannel, and IRequestSessionChannel only."); 133throw Fx.AssertAndThrow("The derived class does not support the OnRequest operation."); 184if (Fx.IsFatal(e)) 408throw Fx.AssertAndThrow("The method GetInputMessages() cannot be called when the binder is in the Created state."); 413throw Fx.AssertAndThrow("The method GetInputMessages() cannot be called when the binder is in the Opening state.");
System\ServiceModel\Channels\ClientReliableDuplexSessionChannel.cs (6)
521throw Fx.AssertAndThrow("Fault must be UnknownSequence fault."); 526throw Fx.AssertAndThrow("In wsrm11, if we start getting UnknownSequence, terminateRequestor cannot be null."); 859if (Fx.IsFatal(e)) 969if (Fx.IsFatal(e)) 1004throw Fx.AssertAndThrow("Reliable messaging version not supported."); 1245if (Fx.IsFatal(e))
System\ServiceModel\Channels\CloseCollectionAsyncResult.cs (3)
16private static AsyncCallback s_nestedCallback = Fx.ThunkCallback(new AsyncCallback(Callback)); 42if (Fx.IsFatal(e)) 68if (Fx.IsFatal(e))
System\ServiceModel\Channels\CloseSequence.cs (1)
26Fx.Assert("Argument reader cannot be null.");
System\ServiceModel\Channels\CloseSequenceResponse.cs (1)
24Fx.Assert("Argument reader cannot be null.");
System\ServiceModel\Channels\CommunicationObject.cs (17)
115Fx.Assert("Inconsistent usage of ThisLock and AsyncLock"); 299throw Fx.AssertAndThrow("CommunicationObject.BeginClose: Unknown CommunicationState"); 395throw Fx.AssertAndThrow("DoneReceivingInCurrentState: Unknown CommunicationObject.state"); 452Fx.Assert(currentState == CommunicationState.Closing || currentState == CommunicationState.Closed || currentState == CommunicationState.Faulted, 486throw Fx.AssertAndThrow("GetTerminalException: Invalid CommunicationObject.state"); 606if (Fx.IsFatal(exception)) 640if (Fx.IsFatal(exception)) 671if (Fx.IsFatal(exception)) 705if (Fx.IsFatal(exception)) 729if (Fx.IsFatal(exception)) 764throw Fx.AssertAndThrow("ThrowIfFaulted: Unknown CommunicationObject.state"); 813throw Fx.AssertAndThrow("ThrowIfClosed: Unknown CommunicationObject.state"); 847throw Fx.AssertAndThrow("ThrowIfDisposed: Unknown CommunicationObject.state"); 876throw Fx.AssertAndThrow("ThrowIfClosedOrOpened: Unknown CommunicationObject.state"); 905throw Fx.AssertAndThrow("ThrowIfDisposedOrImmutable: Unknown CommunicationObject.state"); 934throw Fx.AssertAndThrow("ThrowIfDisposedOrNotOpen: Unknown CommunicationObject.state"); 971throw Fx.AssertAndThrow("ThrowIfClosedOrNotOpen: Unknown CommunicationObject.state");
System\ServiceModel\Channels\CreateSequence.cs (1)
42Fx.Assert("Argument reader cannot be null.");
System\ServiceModel\Channels\CreateSequenceResponse.cs (1)
41Fx.Assert("Argument reader cannot be null.");
System\ServiceModel\Channels\DeliveryStrategy.cs (1)
19throw Fx.AssertAndThrow("Argument quota must be positive.");
System\ServiceModel\Channels\EncoderHelpers.cs (1)
59Fx.Assert("invalid quota type.");
System\ServiceModel\Channels\LayeredChannel.cs (1)
19Fx.Assert(innerChannel != null, "innerChannel cannot be null");
System\ServiceModel\Channels\LifetimeManager.cs (3)
179throw Fx.AssertAndThrow("LifetimeManager.DecrementBusyCount: (this.busyCount > 0)"); 212Fx.Assert(State == LifetimeState.Opened, "LifetimeManager.IncrementBusyCount: (this.State == LifetimeState.Opened)"); 219Fx.Assert(State == LifetimeState.Opened, "LifetimeManager.IncrementBusyCountWithoutLock: (this.State == LifetimeState.Opened)");
System\ServiceModel\Channels\Message.cs (16)
105Fx.Assert(SRP.InvalidMessageState); 372Fx.Assert(SRP.InvalidMessageState); 605Fx.Assert(SRP.InvalidMessageState); 758Fx.Assert(SRP.InvalidMessageState); 852Fx.Assert("Message.WriteSharedHeaderPrefixes: (prefixString.Length == 1) -- IMessageHeaderWithSharedNamespace must use a single lowercase letter prefix."); 859Fx.Assert("Message.WriteSharedHeaderPrefixes: (prefixIndex >= 0 && prefixIndex < 26) -- IMessageHeaderWithSharedNamespace must use a single lowercase letter prefix."); 881Fx.Assert(message != null, "message should never be null"); 1153if (Fx.IsFatal(e)) 1170if (Fx.IsFatal(e)) 1433if (Fx.IsFatal(e)) 1447if (Fx.IsFatal(e)) 1467if (Fx.IsFatal(e)) 1761if (Fx.IsFatal(e)) 1775if (Fx.IsFatal(e)) 1795if (Fx.IsFatal(e)) 1817if (Fx.IsFatal(e))
System\ServiceModel\Channels\MessageHeader.cs (2)
565Fx.Assert(_name != null, ""); 566Fx.Assert(_ns != null, "");
System\ServiceModel\Channels\MessageHeaders.cs (4)
1326Fx.Assert(reader.IsStartElement(XD.MessageDictionary.Header, envelopeVersion.DictionaryNamespace), ""); 1483Fx.Assert(MessageVersion.Addressing.DictionaryNamespace != null, "non-None Addressing requires a non-null DictionaryNamespace"); 1930Fx.Assert(HeaderType == HeaderType.WriteableHeader || HeaderType == HeaderType.ReadableHeader, ""); 1941Fx.Assert(HeaderType == HeaderType.ReadableHeader, "");
System\ServiceModel\Channels\MessageProperties.cs (1)
770Fx.Assert("");
System\ServiceModel\Channels\MessageVersion.cs (2)
165Fx.Assert("Invalid (null) messageVersion value"); 170Fx.Assert("Invalid (null) addressing value");
System\ServiceModel\Channels\MethodCall.cs (1)
65Fx.Assert((inPos - 1) != (inCount), $"Incorrect number of arguments put into _inArgs array, expected {inCount} and copied {inPos - 1}");
System\ServiceModel\Channels\MtomMessageEncoder.cs (1)
59Fx.Assert("Invalid MessageVersion");
System\ServiceModel\Channels\OpenCollectionAsyncResult.cs (2)
16private static AsyncCallback s_nestedCallback = Fx.ThunkCallback(new AsyncCallback(Callback)); 66if (Fx.IsFatal(e))
System\ServiceModel\Channels\ReliableChannelBinder.cs (46)
41throw Fx.AssertAndThrow("ReliableChannelBinder was implemented with only 2 default masking modes, None and All."); 266if (Fx.IsFatal(e)) 286throw Fx.AssertAndThrow("MustCloseChannel is false when there is no receive loop and this method is called when there is a receive loop."); 291_onCloseChannelComplete = Fx.ThunkCallback(new AsyncCallback(OnCloseChannelComplete)); 305if (Fx.IsFatal(e)) 325throw Fx.AssertAndThrow("The binder should not detect the inner channel's faults until after the binder is opened."); 380throw Fx.AssertAndThrow("Caller is attempting to get a terminal exception in a non-terminal state."); 470if (Fx.IsFatal(e)) 546throw Fx.AssertAndThrow("The derived class does not support the Send operation."); 551throw Fx.AssertAndThrow("The derived class does not support the TryReceive operation."); 569if (Fx.IsFatal(e)) 649if (Fx.IsFatal(e)) 675throw Fx.AssertAndThrow("Messaging operations cannot be called when the binder is in the Created state."); 680throw Fx.AssertAndThrow("Messaging operations cannot be called when the binder is in the Opening state."); 720throw Fx.AssertAndThrow("Caller cannot transition to the Closed state from a non-terminal state."); 783if (Fx.IsFatal(e)) 862Fx.Assert("Argument binder cannot be null."); 934throw Fx.AssertAndThrow("It is only valid to abort the current channel when masking faults"); 966throw Fx.AssertAndThrow("Argument waiter cannot be null."); 1015throw Fx.AssertAndThrow("The caller may only invoke this EnsureChannel during the CreateSequence negotiation. ChannelOpening and ChannelClosing are invalid states during this phase of the negotiation."); 1065throw Fx.AssertAndThrow("This method may only be called in the NoChannel state."); 1158throw Fx.AssertAndThrow("Argument waiter cannot be null."); 1172throw Fx.AssertAndThrow("Caller must ensure that field currentChannel is set before opening the channel."); 1179throw Fx.AssertAndThrow("This method may only be called in the ChannelOpening state."); 1232throw Fx.AssertAndThrow("The state must be set to ChannelOpening before the caller attempts to open the channel."); 1253throw Fx.AssertAndThrow("Caller must ensure that OnReadEof is called before ReturnChannel."); 1260throw Fx.AssertAndThrow("Since count is positive, the only valid states are ChannelOpened and ChannelClosing."); 1319throw Fx.AssertAndThrow("Method ReturnChannel() can only be called after TryGetChannel or EndTryGetChannel returns a channel."); 1329throw Fx.AssertAndThrow("ChannelOpened and ChannelClosing are the only 2 valid states when count is positive."); 1399throw Fx.AssertAndThrow("SetChannel is only valid in the NoChannel and ChannelOpening states"); 1404throw Fx.AssertAndThrow("SetChannel is only valid when masking faults"); 1461throw Fx.AssertAndThrow("Abort is the only operation that can race with Open."); 1563throw Fx.AssertAndThrow("Field currentChannel cannot be null in the ChannelOpened state."); 1592throw Fx.AssertAndThrow("The state must be NoChannel."); 1659throw Fx.AssertAndThrow("This operation expects that the synchronizer has been opened."); 1671throw Fx.AssertAndThrow("The WaitForPendingOperations operation may only be invoked once."); 1725throw Fx.AssertAndThrow("This waiter must wait for a channel thus argument channel must be null."); 1764throw Fx.AssertAndThrow("This waiter must wait for a channel thus the caller cannot attempt to get a channel."); 1773_channel = channel ?? throw Fx.AssertAndThrow("Argument channel cannot be null. Caller must call Fault or Close instead."); 1846throw Fx.AssertAndThrow("User of IWaiter called both Set and Fault or Close."); 1922throw Fx.AssertAndThrow("This request context is designed to catch exceptions. Thus it cannot be used if the caller expects no exception handling."); 1925_innerContext = innerContext ?? throw Fx.AssertAndThrow("Argument innerContext cannot be null."); 1948if (Fx.IsFatal(e)) 1981if (Fx.IsFatal(e)) 2041if (Fx.IsFatal(e)) 2115if (Fx.IsFatal(e))
System\ServiceModel\Channels\ReliableInputConnection.cs (1)
160throw Fx.AssertAndThrow("Last can only be set once.");
System\ServiceModel\Channels\ReliableMessagingHelpers.cs (31)
92throw Fx.AssertAndThrow("Exit can only be called after Enter."); 99Fx.AssertAndThrow(!_tcs.Task.IsCompleted, "TCS should not have already been completed"); 125throw Fx.AssertAndThrow("Argument callback cannot be null."); 135throw Fx.AssertAndThrow("Argument callback cannot be null."); 287throw Fx.AssertAndThrow("Argument communicationObject cannot be null."); 308throw Fx.AssertAndThrow("Argument communicationObject cannot be null."); 329Fx.Assert("Caller is attempting to retrieve an exception from a null communicationObject."); 544if (Fx.IsFatal(e)) 654if (Fx.IsFatal(e)) 940if (Fx.IsFatal(e) || !HandleException(e, lastIteration)) 979throw Fx.AssertAndThrow("Initialize messageId only once."); 1070throw Fx.AssertAndThrow("Not Supported."); 1099throw Fx.AssertAndThrow("Not Supported."); 1246throw Fx.AssertAndThrow("Reliable messaging version not supported."); 1286throw Fx.AssertAndThrow("Reliable messaging version not supported."); 1302throw Fx.AssertAndThrow("Reliable messaging version not supported."); 1318throw Fx.AssertAndThrow("Reliable messaging version not supported."); 1335throw Fx.AssertAndThrow("Reliable messaging version not supported."); 1351throw Fx.AssertAndThrow("Reliable messaging version not supported."); 1367throw Fx.AssertAndThrow("Reliable messaging version not supported."); 1389throw Fx.AssertAndThrow("Reliable messaging version not supported."); 1406throw Fx.AssertAndThrow("Reliable messaging version not supported."); 1428throw Fx.AssertAndThrow("Reliable messaging version not supported."); 1440throw Fx.AssertAndThrow("Reliable messaging version not supported."); 1567throw Fx.AssertAndThrow("Element not supported."); 1655throw Fx.AssertAndThrow("Element not supported."); 1702throw Fx.AssertAndThrow("WS-ReliableMessaging 1.1 required."); 1806throw Fx.AssertAndThrow("Unsupported version."); 1833throw Fx.AssertAndThrow("Unsupported version."); 1899throw Fx.AssertAndThrow("Unsupported version."); 2169throw Fx.AssertAndThrow("Method is meant for CloseSequence or TerminateSequence only.");
System\ServiceModel\Channels\ReliableOutputConnection.cs (5)
88throw Fx.AssertAndThrow("Unsupported version."); 144throw Fx.AssertAndThrow("The isLast overload does not take a state."); 169if (!Fx.IsFatal(e)) 227throw Fx.AssertAndThrow("Argument transferred must be a valid sequence number or 0 for protocol messages."); 329if (Fx.IsFatal(e))
System\ServiceModel\Channels\ReliableOutputSessionChannel.cs (8)
391throw Fx.AssertAndThrow("Argument reply cannot be null."); 545throw Fx.AssertAndThrow("Fault must be UnknownSequence fault."); 550throw Fx.AssertAndThrow("In wsrm11, if we start getting UnknownSequence, terminateRequestor cannot be null."); 597throw Fx.AssertAndThrow("Reliable messaging version not supported."); 669if (Fx.IsFatal(e)) 746if (Fx.IsFatal(e)) 783if (Fx.IsFatal(e)) 844if (Fx.IsFatal(e))
System\ServiceModel\Channels\ReliableRequestSessionChannel.cs (9)
309if (Fx.IsFatal(e)) 414throw Fx.AssertAndThrow("Argument reply cannot be null."); 423throw Fx.AssertAndThrow("Close does not exist in Feb2005."); 466throw Fx.AssertAndThrow("Reliable messaging version not supported."); 490throw Fx.AssertAndThrow("Fault must be UnknownSequence fault."); 495throw Fx.AssertAndThrow("If we start getting UnknownSequence, terminateRequestor cannot be null."); 718Fx.Assert(_tcs?.Task == null || !_tcs.Task.IsCompleted, "Task should be null or not already be completed"); 732Fx.Assert(_tcs?.Task == null || !_tcs.Task.IsCompleted, "Task should be null or not already be completed"); 757Fx.Assert(_tcs?.Task == null || !_tcs.Task.IsCompleted, "Task should be null or not already be completed");
System\ServiceModel\Channels\ReliableSessionBindingElement.cs (1)
274throw Fx.AssertAndThrow("Reliable messaging version not supported.");
System\ServiceModel\Channels\RequestContextBase.cs (2)
51Fx.Assert(_requestMessageException == null, "Cannot have both a requestMessage and a requestException."); 57Fx.Assert(_requestMessage == null, "Cannot have both a requestMessage and a requestException.");
System\ServiceModel\Channels\RequestReplyCorrelator.cs (1)
66Fx.Assert(request != null, "request cannot be null");
System\ServiceModel\Channels\SecurityChannelFactory.cs (1)
51Fx.Assert(SessionMode == true, "SessionClientSettings can only be used if SessionMode == true");
System\ServiceModel\Channels\SequenceRange.cs (2)
22throw Fx.AssertAndThrow("Argument lower cannot be negative."); 27throw Fx.AssertAndThrow("Argument upper cannot be less than argument lower.");
System\ServiceModel\Channels\ServiceChannel.cs (13)
668Fx.Assert(channel != null, "'channel' MUST NOT be NULL."); 669Fx.Assert(operation != null, "'operation' MUST NOT be NULL."); 828throw Fx.AssertAndThrowFatal("ServiceChannel.DecrementActivity: (updatedActivityCount >= 0)"); 1691private static AsyncCallback s_ensureInteractiveInitCallback = Fx.ThunkCallback(EnsureInteractiveInitCallback); 1692private static AsyncCallback s_ensureOpenCallback = Fx.ThunkCallback(EnsureOpenCallback); 1693private static AsyncCallback s_sendCallback = Fx.ThunkCallback(SendCallback); 1750if (Fx.IsFatal(e) || completedSynchronously) 1779if (Fx.IsFatal(e) || completedSynchronously) 1815if (Fx.IsFatal(e) || completedSynchronously) 1854if (Fx.IsFatal(e)) 1911if (Fx.IsFatal(e)) 1973Fx.Assert("non-MaxValue timeout for displaying interactive initialization UI"); 2327private static TimerCallback s_timeoutCallback = new TimerCallback(Fx.ThunkCallback<object>(TimeoutCallback));
System\ServiceModel\Channels\ServiceChannelProxy.cs (1)
156Fx.Assert("Invalid proxy method type");
System\ServiceModel\Channels\TerminateSequence.cs (1)
34Fx.Assert("Argument reader cannot be null.");
System\ServiceModel\Channels\TerminateSequenceResponse.cs (1)
29Fx.Assert("Argument reader cannot be null.");
System\ServiceModel\Channels\TimeoutStream.cs (4)
59Fx.Assert(!cancellationToken.CanBeCanceled, "cancellationToken shouldn't be cancellable"); 69Fx.Assert(!cancellationToken.CanBeCanceled, "cancellationToken shouldn't be cancellable"); 102Fx.Assert(!cancellationToken.CanBeCanceled, "cancellationToken shouldn't be cancellable"); 112Fx.Assert(!cancellationToken.CanBeCanceled, "cancellationToken shouldn't be cancellable");
System\ServiceModel\Channels\TransmissionStrategy.cs (17)
37throw Fx.AssertAndThrow("The caller is not allowed to get an invalid SequenceNumber."); 84throw Fx.AssertAndThrow("Argument maxWindow size must be positive."); 185throw Fx.AssertAndThrow("Last message supported only in February 2005."); 243throw Fx.AssertAndThrow("The reliable channel must throw prior to the call to Close() if there are outstanding send or request operations."); 322if (Fx.IsFatal(e)) 363throw Fx.AssertAndThrow("The caller is not allowed to remove a message attempt when there are no message attempts."); 396throw Fx.AssertAndThrow("SetLast supported only in 1.1."); 403throw Fx.AssertAndThrow("Cannot set last more than once."); 421throw Fx.AssertAndThrow("Can't add more than one last message."); 540throw Fx.AssertAndThrow("Argument transferred must be a valid sequence number."); 864throw Fx.AssertAndThrow("The caller is not allowed to add messages beyond the sliding window's maximum size."); 875throw Fx.AssertAndThrow("Argument index must be less than Count."); 880throw Fx.AssertAndThrow("Argument index must be positive."); 926throw Fx.AssertAndThrow("Argument beginIndex cannot be negative."); 931throw Fx.AssertAndThrow("Argument endIndex cannot be greater than Count."); 936throw Fx.AssertAndThrow("Argument endIndex cannot be less than argument beginIndex."); 962Fx.Assert("Cannot remove more messages than the window's Count.");
System\ServiceModel\Channels\TransportSecurityHelpers.cs (1)
218Fx.Assert("unknown authentication level");
System\ServiceModel\Channels\WsrmFault.cs (6)
107throw Fx.AssertAndThrow("Exception message must not be accessed unless set."); 146throw Fx.AssertAndThrow("Unsupported MessageVersion."); 161throw Fx.AssertAndThrow("Exception message must not be accessed unless set."); 171throw Fx.AssertAndThrow("Reliable messaging version must not be accessed unless set."); 183throw Fx.AssertAndThrow("Reliable messaging version cannot be set to null."); 188throw Fx.AssertAndThrow("Reliable messaging version must not be set twice.");
System\ServiceModel\Channels\WsrmMessageInfo.cs (2)
47throw Fx.AssertAndThrow("FaultException can only be set once."); 72throw Fx.AssertAndThrow("FaultReply can only be set once.");
System\ServiceModel\ClientBase.cs (9)
51private static AsyncCallback s_onAsyncCallCompleted = Fx.ThunkCallback(new AsyncCallback(OnAsyncCallCompleted)); 631Fx.Assert(_channelFactoryRef == null, "The channelFactory should have never been assigned"); 632Fx.Assert(_canShareFactory, "GetChannelFactoryFromCache can be called only when canShareFactory is true"); 666Fx.Assert(endpointTrait != null, "The endpointTrait should not be null when the factory can be shared."); 726Fx.Assert(_canShareFactory, "This should be called only when this proxy can share ChannelFactory."); 727Fx.Assert(_channelFactoryRef.ChannelFactory.State == CommunicationState.Opened, 819if (Fx.IsFatal(e)) 848if (Fx.IsFatal(e)) 943Fx.Assert(retArgs.Length == inArgs.Length, "retArgs.Length should be equal to inArgs.Length");
System\ServiceModel\Description\DispatcherBuilder.cs (2)
207throw Fx.AssertAndThrowFatal("DispatcherBuilder.BindOperations: ((proxy == null) != (dispatch == null))"); 225Fx.Assert(proxyOperation != null, "");
System\ServiceModel\Description\ServiceReflector.cs (3)
150Fx.Assert("Too Many Names"); 211Fx.Assert(null != localName, ""); 513if (Fx.IsFatal(e))
System\ServiceModel\Description\TypedMessageConverter.cs (1)
105Fx.Assert(message.Headers != null, "");
System\ServiceModel\Description\TypeLoader.cs (9)
158Fx.Assert(contractType != null, ""); 165Fx.Assert(contractType != null, ""); 166Fx.Assert(serviceType != null, ""); 173Fx.Assert(contractType != null, ""); 174Fx.Assert(serviceType != null, ""); 175Fx.Assert(serviceImplementation != null, ""); 508Fx.Assert("Invalid state. No exception for canHaveBehaviors = false"); 674Fx.Assert(NamingHelper.IsValidNCName(operationName), "operationName value has to be a valid NCName."); 694Fx.Assert("bad contract inheritance");
System\ServiceModel\Description\XmlSerializerOperationBehavior.cs (7)
49Fx.Assert(reflector != null, ""); 276Fx.Assert(parent != null, ""); 277Fx.Assert(operation != null, ""); 278Fx.Assert(attr != null, ""); 395bool skipVerifyXsdElementName = Fx.IsUap && GeneratedXmlSerializers.IsInitialized; 788if (Fx.IsUap) 1244if (Fx.IsUap && GeneratedXmlSerializers.IsInitialized)
System\ServiceModel\Diagnostics\ActivityIdHeader.cs (3)
55if (Fx.IsFatal(e)) 84correlationId = Fx.CreateGuid(reader.GetAttribute("CorrelationId", null)); 93if (Fx.IsFatal(e))
System\ServiceModel\Diagnostics\TraceAsyncResult.cs (1)
42Fx.Assert(thisPtr.CallbackActivity != null, "this shouldn't be hooked up if we don't have a CallbackActivity");
System\ServiceModel\Diagnostics\TraceUtility.cs (4)
43if (Fx.IsFatal(e)) 59if (Fx.IsFatal(e)) 373return Fx.ThunkCallback(new AsyncCallback(ExecuteUserCode)); 446if (Fx.IsFatal(e))
System\ServiceModel\Dispatcher\BufferedReceiveBinder.cs (3)
15private static AsyncCallback s_tryReceiveCallback = Fx.ThunkCallback(new AsyncCallback(TryReceiveCallback)); 196if (Fx.IsFatal(exception)) 238if (Fx.IsFatal(exception))
System\ServiceModel\Dispatcher\ChannelDispatcher.cs (1)
329if (Fx.IsFatal(e))
System\ServiceModel\Dispatcher\ChannelHandler.cs (23)
28private static AsyncCallback s_onAsyncReplyComplete = Fx.ThunkCallback(new AsyncCallback(ChannelHandler.OnAsyncReplyComplete)); 29private static AsyncCallback s_onAsyncReceiveComplete = Fx.ThunkCallback(new AsyncCallback(ChannelHandler.OnAsyncReceiveComplete)); 104Fx.Assert((_idleManager != null) == (Binder.HasSession && _listener.ChannelDispatcher.DefaultCommunicationTimeouts.ReceiveTimeout != TimeSpan.MaxValue), "idle manager is present only when there is a session with a finite receive timeout"); 151Fx.Assert(bufferedBinder != null, "ChannelHandler.Binder is not a BufferedReceiveBinder"); 244Fx.Assert("System.ServiceModel.Dispatcher.ChannelHandler.Dispatch(): (channel == null || dispatchBehavior == null)"); 254Fx.Assert("ChannelHandler.Dispatch (operation == null)"); 299if (Fx.IsFatal(e)) 513Fx.Assert(SRP.SFxNonExceptionThrown); 556if (Fx.IsFatal(e1)) 580if (Fx.IsFatal(e2)) 592if (Fx.IsFatal(e3)) 615if (Fx.IsFatal(e4)) 698Fx.Assert("ChannelHandler.HandleRequest: this.requestInfo.RequestContext != null"); 776if (Fx.IsFatal(e)) 897if (Fx.IsFatal(e)) 957if (Fx.IsFatal(e)) 992if (Fx.IsFatal(e)) 1041if (Fx.IsFatal(e)) 1055if (Fx.IsFatal(e)) 1069if (Fx.IsFatal(e)) 1094if (Fx.IsFatal(e)) 1176if (Fx.IsFatal(e)) 1211if (Fx.IsFatal(e))
System\ServiceModel\Dispatcher\ClientRuntime.cs (2)
74Fx.Assert(shared.IsOnServer, "Server constructor called on client?"); 80Fx.Assert(!_shared.IsOnServer, "Client constructor called on server?");
System\ServiceModel\Dispatcher\ConcurrencyBehavior.cs (2)
193Fx.Assert("ConcurrencyBehavior resumed more than once for same call."); 198if (Fx.IsFatal(e))
System\ServiceModel\Dispatcher\DispatchOperationRuntime.cs (1)
14private static AsyncCallback s_invokeCallback = Fx.ThunkCallback(DispatchOperationRuntime.InvokeCallback);
System\ServiceModel\Dispatcher\DispatchRuntime.cs (2)
38Fx.Assert(!shared.IsOnServer, "Client constructor called on server?"); 385if (Fx.IsFatal(ex))
System\ServiceModel\Dispatcher\DuplexChannelBinder.cs (26)
32Fx.Assert(channel != null, "caller must verify"); 33Fx.Assert(correlator != null, "caller must verify"); 69Fx.Assert("DuplexChannelBinder.ChannelHandler: (channelHandler != null)"); 77Fx.Assert("DuplexChannelBinder.ChannelHandler: (channelHandler == null)"); 370IAsyncResult result = _channel.BeginSend(message, timeout, Fx.ThunkCallback(new AsyncCallback(SendCallback)), duplexRequest); 556Fx.Assert(request != null, "request cannot be null"); 563Fx.Assert(request != null, "request cannot be null"); 606Fx.Assert("DuplexChannelBinder.RequestCallback: (duplexRequest != null)"); 680s_onSend = Fx.ThunkCallback(new AsyncCallback(OnSend)); 714if (Fx.IsFatal(exception)) 753Fx.Assert(_requestCorrelatorKey == null, "RequestCorrelatorKey is already set for this request"); 857Fx.Assert(_requestCorrelatorKey == null, "RequestCorrelatorKey is already set for this request"); 944if (Fx.IsFatal(e)) 1171s_receiveAsyncCallback = Fx.ThunkCallback(new AsyncCallback(ReceiveAsyncCallback)); 1182if (Fx.IsFatal(e)) 1233if (Fx.IsFatal(e)) 1276s_closeInnerChannelCallback = Fx.ThunkCallback(new AsyncCallback(CloseInnerChannelCallback)); 1282if (Fx.IsFatal(e)) 1322if (Fx.IsFatal(e)) 1537Fx.Assert(_backgroundCloseData == null, "can't try twice"); 1551Fx.Assert(_backgroundCloseData != null, "Only callable from background close"); 1570Fx.Assert(_backgroundCloseData != null, "Need to check background close first"); 1572Fx.Assert(dummy == null, "we should get an exception or null"); 1577Fx.Assert(_backgroundCloseData != null, "Need to check background close first"); 1583Fx.Assert(_backgroundCloseData != null, "Need to check background close first"); 1585Fx.Assert(dummy == null, "we should get an exception or null");
System\ServiceModel\Dispatcher\ErrorBehavior.cs (2)
59Fx.Assert("System.ServiceModel.Dispatcher.ErrorBehavior.ProvideMessageFaultCore(): (this.messageVersion != rpc.RequestVersion)"); 206if (Fx.IsFatal(e))
System\ServiceModel\Dispatcher\ErrorHandlingReceiver.cs (4)
30if (Fx.IsFatal(e)) 87if (Fx.IsFatal(e)) 123if (Fx.IsFatal(e)) 170if (Fx.IsFatal(e))
System\ServiceModel\Dispatcher\FaultFormatter.cs (1)
209Fx.Assert(serializer != null, "");
System\ServiceModel\Dispatcher\ImmutableClientRuntime.cs (7)
88if (Fx.IsFatal(e)) 117if (Fx.IsFatal(e)) 155if (Fx.IsFatal(e)) 203if (Fx.IsFatal(e)) 235private static AsyncCallback s_callback = Fx.ThunkCallback(new AsyncCallback(DisplayInitializationUIAsyncResult.Callback)); 265if (Fx.IsFatal(e)) 323if (Fx.IsFatal(e))
System\ServiceModel\Dispatcher\ImmutableDispatchRuntime.cs (21)
39private static AsyncCallback s_onReplyCompleted = Fx.ThunkCallback(new AsyncCallback(OnReplyCompletedCallback)); 117if (Fx.IsFatal(e)) 162if (Fx.IsFatal(e)) 206if (Fx.IsFatal(e)) 246if (Fx.IsFatal(e)) 290if (Fx.IsFatal(e)) 382if (Fx.IsFatal(e)) 416if (Fx.IsFatal(e)) 579if (Fx.IsFatal(e)) 648if (Fx.IsFatal(e)) 679if (Fx.IsFatal(e)) 712if (Fx.IsFatal(e)) 762Fx.Assert( 792if (Fx.IsFatal(e)) 836if (Fx.IsFatal(e)) 854if (Fx.IsFatal(e)) 868if (Fx.IsFatal(e)) 885if (Fx.IsFatal(e)) 890Fx.Assert("Exceptions should be caught by callee"); 904if (Fx.IsFatal(e)) 920if (Fx.IsFatal(e))
System\ServiceModel\Dispatcher\InputChannelBinder.cs (1)
20Fx.Assert("InputChannelBinder.InputChannelBinder: (channel != null)");
System\ServiceModel\Dispatcher\InstanceBehavior.cs (1)
36if (Fx.IsFatal(e))
System\ServiceModel\Dispatcher\ListenerHandler.cs (5)
27Fx.Assert("ListenerHandler.ctor: (this.listenerBinder != null)"); 34Fx.Assert("ListenerHandler.ctor: (this.channelDispatcher != null)"); 160if (Fx.IsFatal(e)) 189if (Fx.IsFatal(e)) 258if (Fx.IsFatal(e))
System\ServiceModel\Dispatcher\MessageRpc.cs (13)
65Fx.Assert((operationContext != null), "System.ServiceModel.Dispatcher.MessageRpc.MessageRpc(), operationContext == null"); 66Fx.Assert(channelHandler != null, "System.ServiceModel.Dispatcher.MessageRpc.MessageRpc(), channelHandler == null"); 163if (Fx.IsFatal(e)) 209if (Fx.IsFatal(e)) 228if (Fx.IsFatal(e)) 247if (Fx.IsFatal(e)) 266if (Fx.IsFatal(e)) 313if (Fx.IsFatal(e2)) 350if (Fx.IsFatal(e)) 377if (Fx.IsFatal(e)) 435if (Fx.IsFatal(e)) 464if (Fx.IsFatal(e)) 522Fx.Assert("MessageRpc.Wrapper.Wrapper: (rpc.NextProcessor != null)");
System\ServiceModel\Dispatcher\OperationFormatter.cs (1)
784Fx.Assert(!_onBeginWriteBodyContentsCalled, "OnBeginWriteBodyContents has already been called");
System\ServiceModel\Dispatcher\OutputChannelBinder.cs (1)
20Fx.Assert("OutputChannelBinder.OutputChannelBinder: (channel != null)");
System\ServiceModel\Dispatcher\PrimitiveOperationFormatter.cs (1)
372Fx.Assert(bodyDescription != null, "");
System\ServiceModel\Dispatcher\ProxyOperationRuntime.cs (2)
166if (Fx.IsFatal(e)) 204if (Fx.IsFatal(e))
System\ServiceModel\Dispatcher\ReplyChannelBinder.cs (1)
20Fx.Assert("ReplyChannelBinder.ReplyChannelBinder: (channel != null)");
System\ServiceModel\Dispatcher\RequestChannelBinder.cs (1)
19Fx.Assert("RequestChannelBinder.RequestChannelBinder: (channel != null)");
System\ServiceModel\Dispatcher\StreamFormatter.cs (1)
389if (Fx.IsFatal(ex))
System\ServiceModel\Dispatcher\TaskMethodInvoker.cs (4)
78Fx.Assert(invokeTask.Exception != null, "Task.IsFaulted guarantees non-null exception."); 83Fx.Assert(invokeTask.IsCompleted, "Task.Result is expected to be completed"); 86Fx.Assert(task != null, "Returned object is expected to be a non-null Task"); 89Fx.Assert(task.Exception != null, "Task.IsFaulted guarantees non-null exception.");
System\ServiceModel\Dispatcher\TerminatingOperationBehavior.cs (1)
14private static TimerCallback s_abortChannelTimerCallback = new TimerCallback(Fx.ThunkCallback<object>(AbortChannel));
System\ServiceModel\Dispatcher\ThreadBehavior.cs (3)
94Fx.Assert(instanceContext != null, "instanceContext is null !"); 110Fx.Assert(syncContext != null, "syncContext is null !?"); 132Fx.Assert("IOThreadScheduler called back twice");
System\ServiceModel\EndpointAddress.cs (3)
482Fx.Assert(reader.Name == DummyName, "EndpointAddress: Expected dummy element not found"); 1252Fx.Assert(reader.Name == EndpointAddress.DummyName, "EndpointAddressBuilder: Expected dummy element not found"); 1286Fx.Assert(reader.Name == EndpointAddress.DummyName, "EndpointAddressBuilder: Expected dummy element not found");
System\ServiceModel\FaultException.cs (1)
302Fx.Assert(code == null, "FaultException.FaultCodeData.GetObjectData: (code != null)");
System\ServiceModel\OperationContext.cs (1)
335if (Fx.IsFatal(e))
System\ServiceModel\ProgrammaticEndpointTrait.cs (6)
54Fx.Assert(_remoteAddress != null, "remoteAddress should not be null."); 58Fx.Assert(_binding != null, "binding should not be null."); 74Fx.Assert(_remoteAddress != null, "remoteAddress should not be null."); 75Fx.Assert(_binding != null, "binding should not be null."); 82Fx.Assert(_remoteAddress != null, "remoteAddress should not be null."); 83Fx.Assert(_binding != null, "binding should not be null.");
System\ServiceModel\Security\ChannelProtectionRequirements.cs (1)
265Fx.Assert("Only body return values are supported currently");
System\ServiceModel\Security\InitiatorSessionSymmetricTransportSecurityProtocol.cs (1)
25Fx.Assert("This protocol can only be used at the initiator.");
System\ServiceModel\Security\IssuanceTokenProviderBase.cs (2)
98Fx.Assert(TimeSpan.Parse(defaultClientMaxTokenCachingTimeString, CultureInfo.InvariantCulture) == TimeSpan.MaxValue, "TimeSpan value not correct"); 509if (Fx.IsFatal(e))
System\ServiceModel\Security\ReceiveSecurityHeader.cs (6)
322Fx.Assert(ReaderQuotas != null, "Reader quotas must be set before processing"); 630Fx.Assert((position == AppendPosition) == (decryptedBuffer == null), "inconsistent position, decryptedBuffer parameters"); 631Fx.Assert((position == AppendPosition) == (encryptionToken == null), "inconsistent position, encryptionToken parameters"); 813Fx.Assert(header.Name == Name && header.Namespace == Namespace && header.Actor == Actor, "security header index mismatch"); 882Fx.Assert(""); 889Fx.Assert(_enforce, "OrderTracker should have 'enforce' set to true.");
System\ServiceModel\Security\ReceiveSecurityHeaderElementManager.cs (8)
69Fx.Assert(0 <= index && index < Count, ""); 75Fx.Assert(0 <= index && index < Count, "index out of range"); 81Fx.Assert(0 <= index && index < Count, "index out of range"); 87Fx.Assert(0 <= index && index < Count, "index out of range"); 114Fx.Assert(0 <= index && index < Count, "index out of range"); 123Fx.Assert(0 <= index && index < Count, "index out of range"); 124Fx.Assert(_elements[index]._elementCategory == ReceiveSecurityHeaderElementCategory.EncryptedData, "Replaced item must be EncryptedData"); 140Fx.Assert(id != null, "Uniqueness should only be tested for non-empty ids");
System\ServiceModel\Security\RequestSecurityTokenResponse.cs (1)
546byte[] result = Fx.AllocateByteArray(_authenticator.Length);
System\ServiceModel\Security\SecurityAppliedMessage.cs (1)
34Fx.Assert(!(messageToProcess is SecurityAppliedMessage), "SecurityAppliedMessage should not be wrapped");
System\ServiceModel\Security\SecurityProtocol.cs (5)
164if (!isOptional || Fx.IsFatal(e)) 190if (!isOptional || Fx.IsFatal(e)) 216if (!isOptional || Fx.IsFatal(e)) 242if (!isOptional || Fx.IsFatal(e)) 580Fx.Assert("Unknown token attachment mode " + supportingTokens[i].SecurityTokenAttachmentMode.ToString());
System\ServiceModel\Security\SecuritySessionClientSettings.cs (5)
446Fx.Assert("Security protocol must be IInitiatorSecuritySessionProtocol."); 880if ((e is CommunicationException) || (e is TimeoutException) || (Fx.IsFatal(e)) || !ShouldWrapException(e)) 1668ActionItem.Schedule(Fx.ThunkCallback<object>(state => 1676if (Fx.IsFatal(e)) 1806if (Fx.IsFatal(e))
System\ServiceModel\Security\SecuritySessionSecurityTokenProvider.cs (2)
538if (Fx.IsFatal(e)) 555byte[] result = Fx.AllocateByteArray(entropySize / 8);
System\ServiceModel\Security\SecurityTimestamp.cs (3)
32Fx.Assert(creationTimeUtc.Kind == DateTimeKind.Utc, "creation time must be in UTC"); 33Fx.Assert(expiryTimeUtc.Kind == DateTimeKind.Utc, "expiry time must be in UTC"); 133Fx.Assert(n == 0, "Overflow in encoding timestamp field");
System\ServiceModel\Security\SecurityUtils.cs (4)
109Fx.Assert("unknown token impersonation level"); 240throw Fx.AssertAndThrow("target should not be null - expecting an EndpointAddress"); 812byte[] copy = Fx.AllocateByteArray(buffer.Length); 1109if (Fx.IsFatal(e))
System\ServiceModel\Security\SecurityVerifiedMessage.cs (2)
507Fx.Assert(openCharIndex > 0, ""); 509byte[] splicedBuffer = Fx.AllocateByteArray(checked(middle.Length + wrapperLength - 1));
System\ServiceModel\Security\TimeBoundedCache.cs (6)
294Fx.Assert("Cache write lock is not held."); 331Fx.Assert(item.ExpirationTime == DateTime.MaxValue || item.ExpirationTime.Kind == DateTimeKind.Utc, ""); 356Fx.Assert("Cache write lock is not held."); 373Fx.Assert("Cache write lock is not held."); 463Fx.Assert(item1.ExpirationTime.Kind == item2.ExpirationTime.Kind, ""); 486Fx.Assert(expirationTime == DateTime.MaxValue || expirationTime.Kind == DateTimeKind.Utc, "");
System\ServiceModel\Security\Tokens\DerivedKeySecurityToken.cs (1)
45Fx.Assert(nonce.Length == minNonceLength, "Returned random bytes for nonce is not the expected length");
System\ServiceModel\Security\TransportSecurityProtocol.cs (1)
86if (Fx.IsFatal(e))
System\ServiceModel\Security\WSSecureConversation.cs (1)
412Fx.Assert(reader.NodeType == XmlNodeType.Element, "");
System\ServiceModel\Security\WSSecurityOneDotZeroSendSecurityHeader.cs (4)
164Fx.Assert(canonicalBuffer != null, "Canonical buffer cannot be null."); 208Fx.Assert(canonicalBuffer != null, "Canonical buffer cannot be null."); 280Fx.Assert("Invalid MessagePartProtectionMode"); 350Fx.Assert("Invalid MessagePartProtectionMode");
System\ServiceModel\Security\WSSecurityTokenSerializer.cs (1)
180if (Fx.IsFatal(e))
System\ServiceModel\Security\WSTrust.cs (2)
855if (Fx.IsFatal(e)) 865if (Fx.IsFatal(e))
System\ServiceModel\Security\X509ServiceCertificateAuthentication.cs (1)
156Fx.Assert(_customCertificateValidator == null, "");
System\ServiceModel\ServiceChannelManager.cs (3)
77Fx.Assert(_activityWaiter == null, "ServiceChannelManager.CloseInput: (_activityWaiter == null)"); 111Fx.Assert(_activityWaiter == null, "ServiceChannelManager.CloseInput: (this.activityWaiter == null)"); 143Fx.Assert(ActivityCount > 0, "ServiceChannelManager.DecrementActivityCount: (this.activityCount > 0)");
System\ServiceModel\ServiceEndpointTrait.cs (3)
46Fx.Assert(_serviceEndpoint != null, "endpoint should not be null."); 62Fx.Assert(_serviceEndpoint != null, "endpoint should not be null."); 68Fx.Assert(_serviceEndpoint != null, "endpoint should not be null.");
System\ServiceModel\SynchronizedKeyedCollection.cs (1)
280Fx.Assert("key shouldn't be null!");
System\ServiceModel\XmlBuffer.cs (1)
68Fx.Assert(_bufferState == BufferState.Reading, "Buffer size shuold only be retrieved during Reading state");
System\ServiceModel\XmlUtil.cs (1)
108Fx.Assert(j > i, "Logic error in XmlUtil.Trim().");