538 references to Fx
System.ServiceModel.Internals (538)
System\Runtime\ActionItem.cs (39)
14[Fx.Tag.SecurityNote(Critical = "Stores the security context, used later in binding back into")] 41[Fx.Tag.SecurityNote(Critical = "Calls into critical method ScheduleCallback", 46Fx.Assert(callback != null, "A null callback was passed for Schedule!"); 50Fx.Trace.IsEnd2EndActivityTracingEnabled) 60[Fx.Tag.SecurityNote(Critical = "Called after applying the user context on the stack or (potentially) " + 65[Fx.Tag.SecurityNote(Critical = "Access critical field context and critical property " + 75throw Fx.Exception.AsError(new InvalidOperationException(InternalSR.ActionItemIsAlreadyScheduled)); 92[Fx.Tag.SecurityNote(Critical = "Access critical field context and critical property " + 100throw Fx.Exception.ArgumentNull("context"); 104throw Fx.Exception.AsError(new InvalidOperationException(InternalSR.ActionItemIsAlreadyScheduled)); 111[Fx.Tag.SecurityNote(Critical = "Access critical property CallbackHelper.InvokeWithoutContextCallback, " + 118throw Fx.Exception.AsError(new InvalidOperationException(InternalSR.ActionItemIsAlreadyScheduled)); 125[Fx.Tag.SecurityNote(Critical = "Calls into critical methods IOThreadScheduler.ScheduleCallbackNoFlow, " + 130Fx.Assert(callback != null, "Cannot schedule a null callback"); 141[Fx.Tag.SecurityNote(Critical = "Extract the security context stored and reset the critical field")] 145Fx.Assert(this.context != null, "Cannot bind to a null context; context should have been set by now"); 146Fx.Assert(this.isScheduled, "Context is extracted only while the object is scheduled"); 152[Fx.Tag.SecurityNote(Critical = "Calls into critical static method ScheduleCallback")] 162[Fx.Tag.SecurityNote(Critical = "Stores a delegate to a critical method")] 164[Fx.Tag.SecurityNote(Critical = "Stores a delegate to a critical method")] 166[Fx.Tag.SecurityNote(Critical = "Stores a delegate to a critical method")] 168[Fx.Tag.SecurityNote(Critical = "Provides access to a critical field; Initialize it with " + 182[Fx.Tag.SecurityNote(Critical = "Provides access to a critical field; Initialize it with " + 195[Fx.Tag.SecurityNote(Critical = "Provides access to a critical field; Initialize it with " + 208[Fx.Tag.SecurityNote(Critical = "Called by the scheduler without any user context on the stack")] 215[Fx.Tag.SecurityNote(Critical = "Called by the scheduler without any user context on the stack")] 221[Fx.Tag.SecurityNote(Critical = "Called after applying the user context on the stack")] 231[Fx.Tag.SecurityNote(Critical = "Stores a delegate that will be called later, at a particular context")] 234[Fx.Tag.SecurityNote(Critical = "Stores an object that will be passed to the delegate that will be " + 243[Fx.Tag.SecurityNote(Critical = "Access critical fields callback and state", 248Fx.Assert(callback != null, "Shouldn't instantiate an object to wrap a null callback"); 257if (Fx.Trace.IsEnd2EndActivityTracingEnabled) 260if (TraceCore.ActionItemScheduledIsEnabled(Fx.Trace)) 262TraceCore.ActionItemScheduled(Fx.Trace, this.eventTraceActivity); 268[Fx.Tag.SecurityNote(Critical = "Implements a the critical abstract ActionItem.Invoke method, " + 273if (this.flowLegacyActivityId || Fx.Trace.IsEnd2EndActivityTracingEnabled) 283[Fx.Tag.SecurityNote(Critical = "Implements a the critical abstract Trace method, " + 313if (TraceCore.ActionItemCallbackInvokedIsEnabled(Fx.Trace)) 315TraceCore.ActionItemCallbackInvoked(Fx.Trace, this.eventTraceActivity);
System\Runtime\AsyncEventArgs.cs (5)
9[Fx.Tag.SynchronizationPrimitive(Fx.Tag.BlocksUsing.NonBlocking, SupportsAsync = true, ReleaseMethod = "Complete")] 40throw Fx.Exception.AsError(new InvalidOperationException(InternalSR.AsyncEventArgsCompletionPending(GetType()))); 53throw Fx.Exception.AsError(new InvalidOperationException(InternalSR.AsyncEventArgsCompletedTwice(GetType()))); 93throw Fx.Exception.ArgumentNull("callback");
System\Runtime\AsyncResult.cs (20)
13[Fx.Tag.SynchronizationPrimitive(Fx.Tag.BlocksUsing.ManualResetEvent, SupportsAsync = true, ReleaseMethod = "Complete")] 27[Fx.Tag.SynchronizationObject] 30[Fx.Tag.SynchronizationObject(Blocking = false)] 125throw Fx.Exception.AsError(new InvalidOperationException(InternalSR.AsyncResultCompletedTwice(GetType()))); 147if (Fx.IsFatal(exception)) 159Fx.Assert(this.manualResetEvent == null, "No ManualResetEvent should be created for a synchronous AsyncResult."); 191if (Fx.IsFatal(e)) 196throw Fx.Exception.AsError(new CallbackException(InternalSR.AsyncCallbackThrewException, e)); 212throw Fx.Exception.AsError(new InvalidOperationException(InternalSR.InvalidNullAsyncResult)); 239if (Fx.IsFatal(e)) 281AsyncResult.asyncCompletionWrapperCallback = Fx.ThunkCallback(new AsyncCallback(AsyncCompletionWrapperCallback)); 309throw Fx.Exception.AsError(new InvalidOperationException(InternalSR.InvalidNullAsyncResult)); 342throw Fx.Exception.AsError(new InvalidOperationException(InternalSR.InvalidAsyncResultImplementation(result.GetType()))); 354throw Fx.Exception.AsError(new InvalidOperationException(message)); 357[Fx.Tag.Blocking(Conditional = "!asyncResult.isCompleted")] 363throw Fx.Exception.ArgumentNull("result"); 370throw Fx.Exception.Argument("result", InternalSR.InvalidAsyncResult); 375throw Fx.Exception.AsError(new InvalidOperationException(InternalSR.AsyncResultAlreadyEnded)); 406throw Fx.Exception.AsError(asyncResult.exception);
System\Runtime\AsyncWaitHandle.cs (11)
11[Fx.Tag.SynchronizationPrimitive(Fx.Tag.BlocksUsing.MonitorWait, SupportsAsync = true, ReleaseMethod = "Set")] 20[Fx.Tag.SynchronizationObject(Kind = Fx.Tag.SynchronizationKind.MonitorWait)] 97[Fx.Tag.Blocking] 214[Fx.Tag.SecurityNote(Critical = "Store the delegate to be invoked")] 217[Fx.Tag.SecurityNote(Critical = "Stores the state object to be passed to the callback")] 223[Fx.Tag.SecurityNote(Critical = "Access critical members", Safe = "Doesn't leak information")] 244[Fx.Tag.SecurityNote(Critical = "Calls into critical method Schedule", Safe = "Invokes the given delegate under the current context")] 251[Fx.Tag.SecurityNote(Critical = "Overriding an inherited critical method, access critical members")] 263throw Fx.Exception.AsError(new InvalidOperationException(InternalSR.MustCancelOldTimer));
System\Runtime\BufferedOutputStream.cs (24)
13[Fx.Tag.Cache(typeof(byte), Fx.Tag.CacheAttrition.None, Scope = Fx.Tag.Strings.ExternallyManaged, 14SizeLimit = Fx.Tag.Strings.ExternallyManaged)] 17[Fx.Tag.Queue(typeof(byte), SizeLimit = "BufferedOutputStream(maxSize)", 84throw Fx.Exception.AsError(new NotSupportedException(InternalSR.SeekNotSupported)); 88throw Fx.Exception.AsError(new NotSupportedException(InternalSR.SeekNotSupported)); 99Fx.Assert(!this.initialized, "Clear must be called before re-initializing stream"); 140throw Fx.Exception.AsError(new NotSupportedException(InternalSR.ReadNotSupported)); 145throw Fx.Exception.AsError(new NotSupportedException(InternalSR.ReadNotSupported)); 187throw Fx.Exception.AsError(new NotSupportedException(InternalSR.ReadNotSupported)); 192throw Fx.Exception.AsError(new NotSupportedException(InternalSR.ReadNotSupported)); 197throw Fx.Exception.AsError(new NotSupportedException(InternalSR.SeekNotSupported)); 202throw Fx.Exception.AsError(new NotSupportedException(InternalSR.SeekNotSupported)); 214Fx.Assert(this.initialized, "No data to return from uninitialized stream"); 215Fx.Assert(!this.bufferReturned, "ToArray cannot be called more than once"); 260Fx.Assert(this.initialized, "Cannot write to uninitialized stream"); 261Fx.Assert(!this.bufferReturned, "Cannot write to stream once ToArray has been called."); 265throw Fx.Exception.ArgumentOutOfRange("size", size, InternalSR.ValueMustBeNonNegative); 270throw Fx.Exception.AsError(CreateQuotaExceededException(this.maxSizeQuota)); 276throw Fx.Exception.AsError(CreateQuotaExceededException(this.maxSizeQuota)); 305Fx.Assert(this.initialized, "Cannot write to uninitialized stream"); 306Fx.Assert(!this.bufferReturned, "Cannot write to stream once ToArray has been called."); 310throw Fx.Exception.AsError(CreateQuotaExceededException(this.maxSize));
System\Runtime\CallbackException.cs (3)
21Fx.Assert(innerException != null, "CallbackException requires an inner exception."); 22Fx.Assert(!Fx.IsFatal(innerException), "CallbackException can't be used to wrap fatal exceptions.");
System\Runtime\Collections\HopperCache.cs (6)
63Fx.Assert(hopperSize > 0, "HopperCache hopperSize must be positive."); 76Fx.Assert(key != null, "HopperCache key cannot be null."); 77Fx.Assert(value != null, "HopperCache value cannot be null."); 85Fx.Assert(this.strongHopper.Count <= this.hopperSize * 2, 113Fx.Assert(key != null, "Can't look up a null key."); 176Fx.Assert(this.outstandingHopper.Count <= this.hopperSize,
System\Runtime\Collections\NullableKeyDictionary.cs (8)
60throw Fx.Exception.AsError(new KeyNotFoundException()); 88throw Fx.Exception.Argument("key", InternalSR.NullKeyAlreadyPresent); 250throw Fx.Exception.AsError(new NotSupportedException(InternalSR.KeyCollectionUpdatesNotAllowed)); 255throw Fx.Exception.AsError(new NotSupportedException(InternalSR.KeyCollectionUpdatesNotAllowed)); 274throw Fx.Exception.AsError(new NotSupportedException(InternalSR.KeyCollectionUpdatesNotAllowed)); 325throw Fx.Exception.AsError(new NotSupportedException(InternalSR.ValueCollectionUpdatesNotAllowed)); 330throw Fx.Exception.AsError(new NotSupportedException(InternalSR.ValueCollectionUpdatesNotAllowed)); 350throw Fx.Exception.AsError(new NotSupportedException(InternalSR.ValueCollectionUpdatesNotAllowed));
System\Runtime\Collections\ObjectCache.cs (15)
39Fx.Assert(settings != null, "caller must use a valid settings object"); 75Fx.Assert(key != null, "caller must validate parameters"); 76Fx.Assert(value != null, "caller must validate parameters"); 99Fx.Assert(key != null, "caller must validate parameters"); 118Fx.Assert(createdObject != null, "initializer delegate must always give us a valid object"); 168Fx.Assert(removedFromItems, "we should always find the key"); 203Fx.Assert(!item.Equals(default(T)), "item should never be null"); 407Fx.Assert(this.parent.cacheItems.ContainsValue(this), "should have a valid value"); 408Fx.Assert(this.Value != null, "should have a valid value"); 428Fx.Assert(this.referenceCount == 1, "reference count should have never increased"); 458Fx.Assert(this.referenceCount >= 0, "cannot take the item marked for disposal"); 464Fx.Assert(this.referenceCount > 0, "can only release an item that has references"); 471Fx.Assert(this.referenceCount == 0, "we should only dispose items without references"); 482Fx.Assert(localDisposeItemCallback == null, "shouldn't have both this.disposeItemCallback and this.parent"); 502Fx.Assert(this.referenceCount == -1, "we should only dispose items that have had LockedDispose called on them");
System\Runtime\Collections\ObjectCacheSettings.cs (4)
48Fx.Assert(value >= 0, "caller should validate cache limit is non-negative"); 61Fx.Assert(value >= TimeSpan.Zero, "caller should validate cache limit is non-negative"); 74Fx.Assert(value >= TimeSpan.Zero, "caller should validate cache limit is non-negative"); 87Fx.Assert(value >= 0, "caller should validate purge frequency is non-negative");
System\Runtime\Collections\OrderedDictionary.cs (10)
58throw Fx.Exception.ArgumentNull("key"); 67throw Fx.Exception.AsError(new KeyNotFoundException(InternalSR.KeyNotFoundInDictionary)); 74throw Fx.Exception.ArgumentNull("key"); 128throw Fx.Exception.ArgumentNull("key"); 155throw Fx.Exception.ArgumentNull("key"); 165throw Fx.Exception.ArgumentNull("array"); 170throw Fx.Exception.AsError(new ArgumentOutOfRangeException("arrayIndex")); 175throw Fx.Exception.Argument("array", InternalSR.BadCopyToArray); 216throw Fx.Exception.ArgumentNull("key"); 234throw Fx.Exception.ArgumentNull("key");
System\Runtime\CompletedAsyncResult.cs (6)
19[Fx.Tag.GuaranteeNonBlocking] 22Fx.AssertAndThrowFatal(result.IsCompleted, "CompletedAsyncResult was not completed!"); 38[Fx.Tag.GuaranteeNonBlocking] 41Fx.AssertAndThrowFatal(result.IsCompleted, "CompletedAsyncResult<T> was not completed!"); 60[Fx.Tag.GuaranteeNonBlocking] 63Fx.AssertAndThrowFatal(result.IsCompleted, "CompletedAsyncResult<T> was not completed!");
System\Runtime\Diagnostics\DiagnosticEventProvider.cs (16)
25[Fx.Tag.SecurityNote(Critical = "Calling Unsafe code; usage of UnsafeNativeMethods.EtwEnableCallback")] 202[Fx.Tag.SecurityNote(Critical = "Calling Unsafe code; usage of EventDescriptor, which is protected by a LinkDemand")] 391[Fx.Tag.SecurityNote(Critical = "Calling Unsafe code; usage of EventDescriptor, which is protected by a LinkDemand")] 399throw Fx.Exception.AsError(new ArgumentNullException("eventMessage")); 438[Fx.Tag.SecurityNote(Critical = "Accesses security critical code WriteMessageEvent")] 451[Fx.Tag.SecurityNote(Critical = "Calling Unsafe code; usage of EventDescriptor, which is protected by a LinkDemand")] 527throw Fx.Exception.AsError(new ArgumentOutOfRangeException("eventPayload", 566throw Fx.Exception.AsError(new ArgumentOutOfRangeException("eventPayload", 644[Fx.Tag.SecurityNote(Critical = "Calling Unsafe code; usage of EventDescriptor, which is protected by a LinkDemand")] 700[Fx.Tag.SecurityNote(Critical = "Calling Unsafe code; usage of EventDescriptor, which is protected by a LinkDemand")] 730[Fx.Tag.SecurityNote(Critical = "Calling Unsafe code; usage of EventDescriptor, which is protected by a LinkDemand")] 737Fx.Assert(false, "eventTraceActivity should not be null for WriteTransferEvent"); 754throw Fx.Exception.AsError(new ArgumentOutOfRangeException("eventPayload", 793throw Fx.Exception.AsError(new ArgumentOutOfRangeException("eventPayload", 863[Fx.Tag.SecurityNote(Critical = "Calling Unsafe code; usage of EventDescriptor, which is protected by a LinkDemand")] 869throw Fx.Exception.ArgumentNull("eventTraceActivity");
System\Runtime\Diagnostics\DiagnosticTraceBase.cs (17)
36[Fx.Tag.SecurityNote(Critical = "This determines the event source name.")] 51[Fx.Tag.SecurityNote(Critical = "Critical because we are invoking TraceSource.Listeners which has a Link Demand for UnmanagedCode permission.", 75[Fx.Tag.SecurityNote(Critical = "Critical because we are invoking TraceSource.Listeners which has a Link Demand for UnmanagedCode permission.", 136[Fx.Tag.SecurityNote(Critical = "Critical because we are invoking TraceSource.Listeners and SourceSwitch.Level which have Link Demands for UnmanagedCode permission.")] 156[Fx.Tag.SecurityNote(Critical = "Critical because we are invoking SetLevel.")] 178[Fx.Tag.SecurityNote(Critical = "Critical because we are invoking SetLevelTheadSafe.")] 188[Fx.Tag.SecurityNote(Critical = "Access critical eventSourceName field", 196[Fx.Tag.SecurityNote(Critical = "This determines the event source name.")] 214[Fx.Tag.SecurityNote(Critical = "Satisfies a LinkDemand for 'PermissionSetAttribute' on type 'Process' when calling method GetCurrentProcess", 230[Fx.Tag.SecurityNote(Critical = "Satisfies a LinkDemand for 'PermissionSetAttribute' on type 'Process' when calling method GetCurrentProcess", 294[Fx.Tag.SecurityNote(Critical = "Sets global event handlers for the AppDomain", 433[Fx.Tag.SecurityNote(Critical = "Calls unsafe methods, UnsafeCreateEventLogger and UnsafeLogEvent.", 467if (Fx.IsFatal(eventLoggerException)) 488if (Fx.IsFatal(exception)) 509[Fx.Tag.SecurityNote(Critical = "gets the CorrelationManager, which does a LinkDemand for UnmanagedCode", 520[Fx.Tag.SecurityNote(Critical = "gets the CorrelationManager, which does a LinkDemand for UnmanagedCode", 569Fx.Assert(s == type.ToString(), "Return value should equal the name of the enum");
System\Runtime\Diagnostics\EtwDiagnosticTrace.cs (34)
36[Fx.Tag.SecurityNote(Critical = "provider Id to create EtwProvider, which is SecurityCritical")] 43[Fx.Tag.SecurityNote(Critical = "Stores object created by a critical c'tor")] 47[Fx.Tag.SecurityNote(Critical = "Usage of EventDescriptor, which is protected by a LinkDemand")] 52[Fx.Tag.SecurityNote(Critical = "setting critical field defaultEtwProviderId")] 65[Fx.Tag.SecurityNote(Critical = "Access critical etwProvider, eventSourceName field")] 78if (Fx.IsFatal(exception)) 96if (Fx.IsFatal(exception)) 120[Fx.Tag.SecurityNote(Critical = "reading critical field defaultEtwProviderId", Safe = "Doesn't leak info\\resources")] 128[Fx.Tag.SecurityNote(Critical = "setting critical field defaultEtwProviderId")] 140[Fx.Tag.SecurityNote(Critical = "Exposes the critical etwProvider field")] 150[Fx.Tag.SecurityNote(Critical = "Access critical etwProvider field", 161[Fx.Tag.SecurityNote(Critical = "Access critical etwProvider field", 169[Fx.Tag.SecurityNote(Critical = "Access critical etwProvider field", 180[Fx.Tag.SecurityNote(Critical = "Access critical etwProvider field", 191[Fx.Tag.SecurityNote(Critical = "Access critical etwProvider field", 200[Fx.Tag.SecurityNote(Critical = "Accesses the security critical etwProvider field", Safe = "Doesn't leak info\\resources")] 217[Fx.Tag.SecurityNote(Critical = "Access critical etwProvider field", 225[Fx.Tag.SecurityNote(Critical = "Usage of EventDescriptor, which is protected by a LinkDemand", 237[Fx.Tag.SecurityNote(Critical = "Usage of EventDescriptor, which is protected by a LinkDemand")] 257[Fx.Tag.SecurityNote(Critical = "Access critical transferEventDescriptor field, as well as other critical methods", 281if (Fx.IsFatal(e)) 291[Fx.Tag.SecurityNote(Critical = "Usage of EventDescriptor, which is protected by a LinkDemand")] 318if (Fx.IsFatal(exception)) 328[Fx.Tag.SecurityNote(Critical = "Usage of EventDescriptor, which is protected by a LinkDemand")] 378[Fx.Tag.SecurityNote(Critical = "Usage of EventDescriptor, which is protected by a LinkDemand")] 510[Fx.Tag.SecurityNote(Critical = "Usage of EventDescriptor, which is protected by a LinkDemand", 518[Fx.Tag.SecurityNote(Critical = "Usage of EventDescriptor, which is protected by a LinkDemand", 537[Fx.Tag.SecurityNote(Critical = "Access the critical Listeners property", 550[Fx.Tag.SecurityNote(Critical = "Sets this.etwProvider and calls EtwProvider constructor, which are Security Critical")] 575[Fx.Tag.SecurityNote(Critical = "Usage of EventDescriptor, which is protected by a LinkDemand")] 626if (Fx.IsFatal(exception)) 636[Fx.Tag.SecurityNote(Critical = "Access critical etwProvider field", 652if (Fx.IsFatal(exception)) 968Fx.Assert(sb != null, "'sb' MUST NOT be NULL.");
System\Runtime\Diagnostics\EtwProvider.cs (29)
22[Fx.Tag.SecurityNote(Critical = "Calling the base critical c'tor")] 62[Fx.Tag.SecurityNote(Critical = "Calling Unsafe code; usage of EventDescriptor, which is protected by a LinkDemand")] 93[Fx.Tag.SecurityNote(Critical = "Calling Unsafe code; usage of EventDescriptor, which is protected by a LinkDemand")] 121[Fx.Tag.SecurityNote(Critical = "Calling Unsafe code; usage of EventDescriptor, which is protected by a LinkDemand")] 149[Fx.Tag.SecurityNote(Critical = "Calling Unsafe code; usage of EventDescriptor, which is protected by a LinkDemand")] 181[Fx.Tag.SecurityNote(Critical = "Calling Unsafe code; usage of EventDescriptor, which is protected by a LinkDemand")] 217[Fx.Tag.SecurityNote(Critical = "Calling Unsafe code; usage of EventDescriptor, which is protected by a LinkDemand")] 258[Fx.Tag.SecurityNote(Critical = "Calling Unsafe code; usage of EventDescriptor, which is protected by a LinkDemand")] 303[Fx.Tag.SecurityNote(Critical = "Calling Unsafe code; usage of EventDescriptor, which is protected by a LinkDemand")] 353[Fx.Tag.SecurityNote(Critical = "Calling Unsafe code; usage of EventDescriptor, which is protected by a LinkDemand")] 407[Fx.Tag.SecurityNote(Critical = "Calling Unsafe code; usage of EventDescriptor, which is protected by a LinkDemand")] 465[Fx.Tag.SecurityNote(Critical = "Calling Unsafe code; usage of EventDescriptor, which is protected by a LinkDemand")] 527[Fx.Tag.SecurityNote(Critical = "Calling Unsafe code; usage of EventDescriptor, which is protected by a LinkDemand")] 593[Fx.Tag.SecurityNote(Critical = "Calling Unsafe code; usage of EventDescriptor, which is protected by a LinkDemand")] 663[Fx.Tag.SecurityNote(Critical = "Calling Unsafe code; usage of EventDescriptor, which is protected by a LinkDemand")] 737[Fx.Tag.SecurityNote(Critical = "Calling Unsafe code; usage of EventDescriptor, which is protected by a LinkDemand")] 757[Fx.Tag.SecurityNote(Critical = "Calling Unsafe code; usage of EventDescriptor, which is protected by a LinkDemand")] 780[Fx.Tag.SecurityNote(Critical = "Calling Unsafe code; usage of EventDescriptor, which is protected by a LinkDemand")] 806[Fx.Tag.SecurityNote(Critical = "Calling Unsafe code; usage of EventDescriptor, which is protected by a LinkDemand")] 826[Fx.Tag.SecurityNote(Critical = "Calling Unsafe code; usage of EventDescriptor, which is protected by a LinkDemand")] 849[Fx.Tag.SecurityNote(Critical = "Calling Unsafe code; usage of EventDescriptor, which is protected by a LinkDemand")] 876[Fx.Tag.SecurityNote(Critical = "Calling Unsafe code; usage of EventDescriptor, which is protected by a LinkDemand")] 957[Fx.Tag.SecurityNote(Critical = "Calling Unsafe code; usage of EventDescriptor, which is protected by a LinkDemand")] 1047[Fx.Tag.SecurityNote(Critical = "Calling Unsafe code; usage of EventDescriptor, which is protected by a LinkDemand")] 1102[Fx.Tag.SecurityNote(Critical = "Calling Unsafe code; usage of EventDescriptor, which is protected by a LinkDemand")] 1165[Fx.Tag.SecurityNote(Critical = "Calling Unsafe code; usage of EventDescriptor, which is protected by a LinkDemand")] 1236[Fx.Tag.SecurityNote(Critical = "Calling Unsafe code; usage of EventDescriptor, which is protected by a LinkDemand")] 1311[Fx.Tag.SecurityNote(Critical = "Calling Unsafe code; usage of EventDescriptor, which is protected by a LinkDemand")] 1383[Fx.Tag.SecurityNote(Critical = "Calling Unsafe code; usage of EventDescriptor, which is protected by a LinkDemand")]
System\Runtime\Diagnostics\EventDescriptor.cs (4)
40throw Fx.Exception.ArgumentOutOfRange("id", id, InternalSR.ValueMustBeNonNegative); 45throw Fx.Exception.ArgumentOutOfRange("id", id, string.Empty); 57throw Fx.Exception.ArgumentOutOfRange("task", task, InternalSR.ValueMustBeNonNegative); 62throw Fx.Exception.ArgumentOutOfRange("task", task, string.Empty);
System\Runtime\Diagnostics\EventLogger.cs (13)
22[Fx.Tag.SecurityNote(Miscellaneous = "RequiresReview - In PT log no more than 5 events.")] 30[Fx.Tag.SecurityNote(Critical = "Protect the string that defines the event source name.", 61[Fx.Tag.SecurityNote(Critical = "Unsafe method to create event logger (sets the event source name).")] 70[Fx.Tag.SecurityNote(Critical = "Logs event to the event log and asserts Unmanaged code.")] 188if (Fx.IsFatal(e)) 218Fx.Exception.TraceHandledException(ex, TraceEventType.Information); 246[Fx.Tag.SecurityNote(Critical = "Logs event to the event log by calling unsafe method.", 255[Fx.Tag.SecurityNote(Critical = "Protect the string that defines the event source name.", 264[Fx.Tag.SecurityNote(Critical = "Sets event source name.")] 272[Fx.Tag.SecurityNote(Critical = "Satisfies a LinkDemand for 'PermissionSetAttribute' on type 'Process' when calling method GetCurrentProcess", 297[Fx.Tag.SecurityNote(Critical = "Accesses security critical code RegisterEventSource and ReportEvent")] 322[Fx.Tag.SecurityNote(Critical = "Satisfies a LinkDemand for 'PermissionSetAttribute' on type 'Process' when calling method GetCurrentProcess", 340[Fx.Tag.SecurityNote(Critical = "Satisfies a LinkDemand for 'PermissionSetAttribute' on type 'Process' when calling method GetCurrentProcess",
System\Runtime\Diagnostics\EventTraceActivity.cs (3)
53[Fx.Tag.SecurityNote(Critical = "Critical because the CorrelationManager property has a link demand on UnmanagedCode.", 72[Fx.Tag.SecurityNote(Critical = "Critical because the CorrelationManager property has a link demand on UnmanagedCode.", 85[Fx.Tag.SecurityNote(Critical = "Critical because the CorrelationManager property has a link demand on UnmanagedCode.",
System\Runtime\DuplicateDetector.cs (4)
18Fx.Assert(capacity >= 0, "The capacity parameter must be a positive value."); 28Fx.Assert(value != null, "The value must be non null."); 45Fx.Assert(this.items.Count == this.fifoList.Count, "The items and fifoList must be synchronized."); 59Fx.Assert(value != null, "The value must be non null.");
System\Runtime\ExceptionTrace.cs (10)
26Fx.Assert(diagnosticTrace != null, "'diagnosticTrace' MUST NOT be NULL."); 84Fx.Assert(targetInvocationException != null, "targetInvocationException cannot be null."); 88if (Fx.IsFatal(targetInvocationException)) 128Fx.Assert(aggregateException != null, "aggregateException cannot be null."); 132if (Fx.IsFatal(aggregateException)) 167Fx.Assert(innerExceptions.Count > 0, "InnerException.Count is known to be > 0 here."); 279[Fx.Tag.SecurityNote(Critical = "Calls 'System.Runtime.Interop.UnsafeNativeMethods.IsDebuggerPresent()' which is a P/Invoke method", 295[Fx.Tag.SecurityNote(Critical = "Calls into critical method UnsafeNativeMethods.IsDebuggerPresent and UnsafeNativeMethods.DebugBreak", 349if (Fx.IsFatal(exception)) 369if (Fx.IsFatal(ex))
System\Runtime\FatalException.cs (2)
24Fx.Assert(innerException == null || !Fx.IsFatal(innerException), "FatalException can't be used to wrap fatal exceptions.");
System\Runtime\Fx.cs (49)
45[Fx.Tag.SecurityNote(Critical = "This delegate is called from within a ConstrainedExecutionRegion, must not be settable from PT code")] 76[Fx.Tag.SecurityNote(Critical = "Accesses SecurityCritical field EtwProvider", 89Fx.UpdateLevel(); 92Fx.UpdateLevel(trace); 98[Fx.Tag.SecurityNote(Critical = "access critical field", Safe = "ok for get-only access")] 103return Fx.asynchronousThreadExceptionHandler; 106[Fx.Tag.SecurityNote(Critical = "sets a critical field")] 110Fx.asynchronousThreadExceptionHandler = value; 141Fx.Assert(description); 157Fx.Assert(description); 172[Fx.Tag.SecurityNote(Critical = "Calls into critical method Environment.FailFast", 178Fx.Assert(description); 187Fx.Exception.TraceFailFast(failFastMessage); 393[Fx.Tag.SecurityNote(Critical = "Construct the unsafe object IOCompletionThunk")] 461throw Fx.Exception.AsError( 476throw Fx.Exception.AsError( 483[Fx.Tag.SecurityNote(Miscellaneous = "Must not call into PT code as it is called within a CER.")] 491Fx.Exception.TraceUnhandledException(exception); 504[Fx.Tag.SecurityNote(Miscellaneous = "Must not call into PT code as it is called within a CER.")] 511Fx.Assert("Null exception in HandleAtThreadBase."); 519ExceptionHandler handler = Fx.AsynchronousThreadExceptionHandler; 547UpdateLevel(Fx.Trace); 552[Fx.Tag.SecurityNote(Miscellaneous = "Must not call into PT code as it is called within a CER.")] 690throw Fx.Exception.ArgumentNull("elementType"); 731throw Fx.Exception.ArgumentNull("elementType"); 765throw Fx.Exception.ArgumentNullOrEmpty("limit"); 927throw Fx.Exception.ArgumentNull("exceptionType"); 931throw Fx.Exception.ArgumentNullOrEmpty("diagnosis"); 1028[Fx.Tag.SecurityNote(Critical = "Make these safe to use in SecurityCritical contexts.")] 1032[Fx.Tag.SecurityNote(Critical = "Accesses critical field.", Safe = "Data provided by caller.")] 1041[Fx.Tag.SecurityNote(Critical = "Accesses critical field.", Safe = "Data is not privileged.")] 1064[Fx.Tag.SecurityNote(Critical = "Calls PrepareConstrainedRegions which has a LinkDemand", 1076if (!Fx.HandleAtThreadBase(exception)) 1098[Fx.Tag.SecurityNote(Critical = "Calls PrepareConstrainedRegions which has a LinkDemand", 1110if (!Fx.HandleAtThreadBase(exception)) 1132[Fx.Tag.SecurityNote(Critical = "Calls PrepareConstrainedRegions which has a LinkDemand", 1144if (!Fx.HandleAtThreadBase(exception)) 1166[Fx.Tag.SecurityNote(Critical = "Calls PrepareConstrainedRegions which has a LinkDemand", 1178if (!Fx.HandleAtThreadBase(exception)) 1200[Fx.Tag.SecurityNote(Critical = "Calls PrepareConstrainedRegions which has a LinkDemand", 1212if (!Fx.HandleAtThreadBase(exception)) 1234[Fx.Tag.SecurityNote(Critical = "Calls PrepareConstrainedRegions which has a LinkDemand", 1246if (!Fx.HandleAtThreadBase(exception)) 1255[Fx.Tag.SecurityNote(Critical = "unsafe object")] 1259[Fx.Tag.SecurityNote(Critical = "Make these safe to use in SecurityCritical contexts.")] 1262[Fx.Tag.SecurityNote(Critical = "Accesses critical field.", Safe = "Data provided by caller.")] 1270[Fx.Tag.SecurityNote(Safe = "returns a delegate around the safe method UnhandledExceptionFrame")] 1277[Fx.Tag.SecurityNote(Critical = "Accesses critical field, calls PrepareConstrainedRegions which has a LinkDemand", 1288if (!Fx.HandleAtThreadBase(exception))
System\Runtime\InputQueue.cs (44)
11[Fx.Tag.SynchronizationPrimitive(Fx.Tag.BlocksUsing.PrivatePrimitive, SupportsAsync = true, ReleaseMethod = "Dispatch")] 22[Fx.Tag.SynchronizationObject(Blocking = false, Kind = Fx.Tag.SynchronizationKind.LockStatement)] 25[Fx.Tag.SynchronizationObject] 28[Fx.Tag.SynchronizationObject] 42Fx.Assert(asyncCallbackGenerator != null, "use default ctor if you don't have a generator"); 146[Fx.Tag.Blocking(CancelMethod = "Close")] 153throw Fx.Exception.AsError(new TimeoutException(InternalSR.TimeoutInputQueueDequeue(timeout))); 159[Fx.Tag.Blocking(CancelMethod = "Close")] 271[Fx.Tag.Blocking(CancelMethod = "Close", Conditional = "!result.IsCompleted")] 285[Fx.Tag.Blocking(CancelMethod = "Close", Conditional = "!result.IsCompleted")] 292throw Fx.Exception.AsError(new TimeoutException()); 298[Fx.Tag.Blocking(CancelMethod = "Dispatch", Conditional = "!result.IsCompleted")] 327Fx.Assert(exception != null, "EnqueueAndDispatch: exception parameter should not be null"); 333Fx.Assert(item != null, "EnqueueAndDispatch: item parameter should not be null"); 339Fx.Assert(item != null, "EnqueueWithoutDispatch: item parameter should not be null"); 345Fx.Assert(exception != null, "EnqueueWithoutDispatch: exception parameter should not be null"); 392[Fx.Tag.Blocking(CancelMethod = "Dispatch")] 572Fx.Assert(state != null, "InputQueue.OnInvokeDequeuedCallback: (state != null)"); 701Fx.Assert(reader != null, "InputQueue.RemoveReader: (reader != null)"); 788throw Fx.Exception.AsError(this.exception); 795[Fx.Tag.SynchronizationPrimitive(Fx.Tag.BlocksUsing.AsyncResult, SupportsAsync = true, ReleaseMethod = "Set")] 820[Fx.Tag.Blocking(Conditional = "!result.IsCompleted", CancelMethod = "Set")] 858[Fx.Tag.SynchronizationPrimitive(Fx.Tag.BlocksUsing.AsyncResult, SupportsAsync = true, ReleaseMethod = "Set")] 864[Fx.Tag.SynchronizationObject(Blocking = false)] 886[Fx.Tag.Blocking(Conditional = "!result.IsCompleted", CancelMethod = "Set")] 954Fx.AssertAndThrow(this.totalCount != this.pendingCount, "ItemQueue does not contain any available items"); 971Fx.AssertAndThrow(this.pendingCount != 0, "ItemQueue does not contain any pending items"); 977Fx.AssertAndThrow(totalCount != 0, "ItemQueue does not contain any items"); 1003[Fx.Tag.SynchronizationObject(Blocking = false)] 1004[Fx.Tag.SynchronizationPrimitive(Fx.Tag.BlocksUsing.ManualResetEvent, ReleaseMethod = "Set")] 1011[Fx.Tag.SynchronizationObject] 1024Fx.Assert(this.item == null, "InputQueue.WaitQueueReader.Set: (this.item == null)"); 1025Fx.Assert(this.exception == null, "InputQueue.WaitQueueReader.Set: (this.exception == null)"); 1033[Fx.Tag.Blocking(CancelMethod = "Set")] 1065throw Fx.Exception.AsError(this.exception); 1073[Fx.Tag.SynchronizationPrimitive(Fx.Tag.BlocksUsing.ManualResetEvent, ReleaseMethod = "Set")] 1078[Fx.Tag.SynchronizationObject] 1095[Fx.Tag.Blocking(CancelMethod = "Set")]
System\Runtime\InternalBufferManager.cs (13)
36Fx.Assert(maxBufferPoolSize > 0 && maxBufferSize >= 0, "bad params, caller should verify"); 121if (TraceCore.BufferPoolChangeQuotaIsEnabled(Fx.Trace)) 123TraceCore.BufferPoolChangeQuota(Fx.Trace, bufferPool.BufferSize, delta); 216Fx.Assert(buffer != null, "caller must verify"); 244throw Fx.Exception.Argument("buffer", InternalSR.BufferIsNotRightSizeForBufferManager); 256Fx.Assert(bufferSize >= 0, "caller must ensure a non-negative argument"); 279if (TraceCore.BufferPoolAllocationIsEnabled(Fx.Trace)) 281TraceCore.BufferPoolAllocation(Fx.Trace, bufferPool.BufferSize); 284returnValue = Fx.AllocateByteArray(bufferPool.BufferSize); 289if (TraceCore.BufferPoolAllocationIsEnabled(Fx.Trace)) 291TraceCore.BufferPoolAllocation(Fx.Trace, bufferSize); 294returnValue = Fx.AllocateByteArray(bufferSize); 562return Fx.AllocateByteArray(bufferSize);
System\Runtime\Interop\SafeEventLogWriteHandle.cs (4)
14[Fx.Tag.SecurityNote(Critical = "Usage of SafeHandleZeroOrMinusOneIsInvalid, which is protected by a LinkDemand and InheritanceDemand")] 19[Fx.Tag.SecurityNote(Critical = "Usage of SafeHandleZeroOrMinusOneIsInvalid, which is protected by a LinkDemand and InheritanceDemand")] 24[Fx.Tag.SecurityNote(Critical = "Usage of SafeHandleZeroOrMinusOneIsInvalid, which is protected by a LinkDemand and InheritanceDemand")] 43[Fx.Tag.SecurityNote(Critical = "Usage of SafeHandleZeroOrMinusOneIsInvalid, which is protected by a LinkDemand and InheritanceDemand")]
System\Runtime\Interop\UnsafeNativeMethods.cs (5)
111throw Fx.Exception.AsError(new System.ComponentModel.Win32Exception(error)); 117Fx.AssertAndThrow("GetComputerName returned an invalid length: " + length); 124throw Fx.Exception.AsError(new System.ComponentModel.Win32Exception(error)); 234[Fx.Tag.SecurityNote(Critical = "Accesses security critical type SafeHandle")] 243[Fx.Tag.SecurityNote(Critical = "Returns security critical type SafeEventLogWriteHandle")]
System\Runtime\IOThreadCancellationTokenSource.cs (4)
12static readonly Action<object> onCancel = Fx.ThunkCallback<object>(OnCancel); 58Fx.Assert(this.timer != null, "timer should not be null."); 69Fx.Assert(obj != null, "obj should not be null."); 76Fx.Assert(this.source != null, "source should not be null.");
System\Runtime\IOThreadScheduler.cs (47)
11[Fx.Tag.SynchronizationPrimitive(Fx.Tag.BlocksUsing.NonBlocking)] 18[Fx.Tag.SecurityNote(Miscellaneous = "can be called outside user context")] 57[Fx.Tag.Queue(typeof(Slot), Scope = Fx.Tag.Strings.AppDomain)] 58[Fx.Tag.SecurityNote(Critical = "holds callbacks which get called outside of the app security context")] 62[Fx.Tag.Queue(typeof(Slot), Scope = Fx.Tag.Strings.AppDomain)] 63[Fx.Tag.SecurityNote(Critical = "holds callbacks which get called outside of the app security context")] 78[Fx.Tag.SynchronizationObject(Blocking = false, Kind = Fx.Tag.SynchronizationKind.InterlockedNoSpin)] 83[Fx.Tag.SynchronizationObject(Blocking = false, Kind = Fx.Tag.SynchronizationKind.InterlockedNoSpin)] 86[Fx.Tag.SecurityNote(Critical = "creates a ScheduledOverlapped, touches slots, can be called outside of user context", 91Fx.Assert(capacity > 0, "Capacity must be positive."); 92Fx.Assert(capacity <= 0x8000, "Capacity cannot exceed 32k."); 94Fx.Assert(capacityLowPri > 0, "Low-priority capacity must be positive."); 95Fx.Assert(capacityLowPri <= 0x8000, "Low-priority capacity cannot exceed 32k."); 98Fx.Assert((this.slots.Length & SlotMask) == 0, "Capacity must be a power of two."); 101Fx.Assert((this.slotsLowPri.Length & SlotMaskLowPri) == 0, "Low-priority capacity must be a power of two."); 106[Fx.Tag.SecurityNote(Critical = "Calls into critical class CriticalHelper, doesn't flow context")] 112throw Fx.Exception.ArgumentNull("callback"); 126[Fx.Tag.SecurityNote(Critical = "Calls into critical class CriticalHelper, doesn't flow context")] 132throw Fx.Exception.ArgumentNull("callback"); 147[Fx.Tag.SecurityNote(Critical = "calls into ScheduledOverlapped to post it, touches slots, can be called outside user context.")] 160Fx.Assert(Bits.Count(slot) != 0, "IOTS went idle when it shouldn't have."); 169throw Fx.AssertAndThrowFatal("Head/Tail overflow!"); 193[Fx.Tag.SecurityNote(Critical = "calls into ScheduledOverlapped to post it, touches slots, can be called outside user context.")] 227throw Fx.AssertAndThrowFatal("Low-priority Head/Tail overflow!"); 250[Fx.Tag.SecurityNote(Critical = "calls into ScheduledOverlapped to post it, touches slots, may be called outside of user context")] 258Fx.Assert(Bits.Count(slot) != -1, "CompletionCallback called on idle IOTS!"); 323[Fx.Tag.SecurityNote(Critical = "touches slots, may be called outside of user context")] 364[Fx.Tag.SecurityNote(Critical = "touches slots, may be called outside of user context")] 374[Fx.Tag.SecurityNote(Critical = "touches slots, may be called outside of user context")] 478[Fx.Tag.SecurityNote(Miscellaneous = "called by critical code, can be called outside user context")] 493Fx.Assert(this.callback == null, "Slot already has a work item."); 494Fx.Assert((gateSnapshot & Bits.HiBits) == 0, "Slot already marked."); 501Fx.Assert((gateSnapshot & Bits.HiBits) == Bits.LoHiBit, "Slot already empty."); 527[Fx.Tag.SecurityNote(Miscellaneous = "called by critical code, can be called outside user context")] 594[Fx.Tag.SecurityNote(Critical = "manages NativeOverlapped instance, can be called outside user context")] 604Fx.ThunkCallback(new IOCompletionCallback(IOCallback)), null); 607[Fx.Tag.SecurityNote(Miscellaneous = "note that in some hosts this runs without any user context on the stack")] 613Fx.Assert(iots != null, "Overlapped completed without a scheduler."); 643Fx.Assert(this.scheduler == null, "Post called on an overlapped that is already posted."); 644Fx.Assert(iots != null, "Post called with a null scheduler."); 650[Fx.Tag.SecurityNote(Miscellaneous = "note that this runs on the finalizer thread")] 655throw Fx.AssertAndThrowFatal("Cleanup called on an overlapped that is in-flight.");
System\Runtime\IOThreadTimer.cs (19)
73[Fx.Tag.SecurityNote(Critical = "Calls critical method GetSystemTimeAdjustment", Safe = "method is a SafeNativeMethod")] 113[Fx.Tag.SynchronizationObject(Blocking = false, Scope = Fx.Tag.Strings.AppDomain)] 118[Fx.Tag.Queue(typeof(IOThreadTimer), Scope = Fx.Tag.Strings.AppDomain, StaleElementsRemovedImmediately = true)] 124[Fx.Tag.SynchronizationObject(Blocking = false)] 399Fx.Assert(this.count > 0, "Should have at least one timer in our queue."); 414Fx.Assert(index > 0, ""); 415Fx.Assert(index <= this.count, ""); 445Fx.Assert(timer.index == 0, "Timer should not have an index."); 498Fx.Assert(index > 0, ""); 499Fx.Assert(index <= count, ""); 600[Fx.Tag.SynchronizationPrimitive(Fx.Tag.BlocksUsing.NonBlocking)] 606[Fx.Tag.SecurityNote(Critical = "Call the critical CreateWaitableTimer method in TimerHelper", 619[Fx.Tag.SecurityNote(Critical = "Call the critical Set method in TimerHelper", 626[Fx.Tag.SecurityNote(Critical = "Provides a set of unsafe methods used to work with the WaitableTimer")] 637throw Fx.Exception.AsError(exception); 645throw Fx.Exception.AsError(new Win32Exception());
System\Runtime\MruCache.cs (4)
34Fx.Assert(lowWatermark < highWatermark, ""); 35Fx.Assert(lowWatermark >= 0, ""); 60Fx.Assert(null != key, ""); 109Fx.Assert(null != key, "");
System\Runtime\PartialTrustHelpers.cs (12)
14[Fx.Tag.SecurityNote(Critical = "used in a security-sensitive decision")] 18[Fx.Tag.SecurityNote(Critical = "used in a security-sensitive decision")] 21[Fx.Tag.SecurityNote(Critical = "used in a security-sensitive decision")] 27[Fx.Tag.SecurityNote(Critical = "used in a security-sensitive decision")] 35[Fx.Tag.SecurityNote(Critical = "used in a security-sensitive decision")] 55[Fx.Tag.SecurityNote(Critical = "Captures security context with identity flow suppressed, " + 74[Fx.Tag.SecurityNote(Critical = "used in a security-sensitive decision")] 89[Fx.Tag.SecurityNote(Critical = "used in a security-sensitive decision")] 100[Fx.Tag.SecurityNote(Critical = "used in a security-sensitive decision")] 109[Fx.Tag.SecurityNote(Critical = "used in a security-sensitive decision")] 117[Fx.Tag.SecurityNote(Critical = "used in a security-sensitive decision")] 128[Fx.Tag.SecurityNote(Critical = "used in a security-sensitive decision",
System\Runtime\ReadOnlyDictionaryInternal.cs (6)
50throw Fx.Exception.AsError(CreateReadOnlyException()); 73throw Fx.Exception.AsError(CreateReadOnlyException()); 78throw Fx.Exception.AsError(CreateReadOnlyException()); 83throw Fx.Exception.AsError(CreateReadOnlyException()); 112throw Fx.Exception.AsError(CreateReadOnlyException()); 117throw Fx.Exception.AsError(CreateReadOnlyException());
System\Runtime\ReadOnlyKeyedCollection.cs (1)
16Fx.Assert(innerCollection != null, "innerCollection should not be null");
System\Runtime\ScheduleActionItemAsyncResult.cs (1)
37if (Fx.IsFatal(ex))
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)); 98[Fx.Tag.SynchronizationPrimitive(Fx.Tag.BlocksUsing.NonBlocking)]
System\Runtime\SynchronizedPool.cs (3)
48[Fx.Tag.SynchronizationObject(Blocking = false)] 337[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")] 346[Fx.Tag.SynchronizationObject(Blocking = false)]
System\Runtime\TaskExtensions.cs (9)
17throw Fx.Exception.ArgumentNull("task"); 22throw Fx.Exception.AsError(new InvalidOperationException(InternalSR.SFxTaskNotStarted)); 59throw Fx.Exception.ArgumentNull("task"); 64throw Fx.Exception.AsError(new InvalidOperationException(InternalSR.SFxTaskNotStarted)); 125throw Fx.Exception.AsError<TException>(ex); 137throw Fx.Exception.AsError<TException>(ex); 156throw Fx.Exception.AsError<TException>(ex); 177if (Fx.IsFatal(ex) || exceptionConverter == null) 187throw Fx.Exception.AsError(new TimeoutException(InternalSR.TaskTimedOutError(timeout)));
System\Runtime\ThreadNeutralSemaphore.cs (14)
13[Fx.Tag.SynchronizationPrimitive(Fx.Tag.BlocksUsing.PrivatePrimitive, 28[Fx.Tag.SynchronizationObject(Blocking = false)] 31[Fx.Tag.SynchronizationObject] 41Fx.Assert(maxCount > 0, "maxCount must be positive"); 74Fx.Assert(callback != null, "must have a non-null call back for async purposes"); 82throw Fx.Exception.AsError(CreateObjectAbortedException()); 114Fx.Assert(!thisPtr.waiters.Contains(data.Waiter), "The waiter should have been removed already."); 138[Fx.Tag.Blocking(CancelMethod = "Abort")] 143throw Fx.Exception.AsError(CreateEnterTimedOutException(timeout)); 147[Fx.Tag.Blocking(CancelMethod = "Abort")] 158throw Fx.Exception.AsError(CreateObjectAbortedException()); 225throw Fx.Exception.AsError(CreateObjectAbortedException()); 266throw Fx.Exception.AsError(new SynchronizationLockException(message));
System\Runtime\Ticks.cs (1)
14[Fx.Tag.SecurityNote(Miscellaneous = "Why isn't the SuppressUnmanagedCodeSecurity attribute working in this case?")]
System\Runtime\TimeoutHelper.cs (5)
19Fx.Assert(timeout >= TimeSpan.Zero, "timeout must be non-negative"); 142Fx.Assert(!deadlineSet, "TimeoutHelper deadline set twice."); 156throw Fx.Exception.ArgumentOutOfRange(argumentName, timeout, InternalSR.TimeoutMustBeNonNegative(argumentName, timeout)); 169throw Fx.Exception.ArgumentOutOfRange(argumentName, timeout, InternalSR.TimeoutMustBePositive(argumentName, timeout)); 173[Fx.Tag.Blocking]
System\Runtime\TypeHelper.cs (4)
64Fx.Assert(!sourceType.IsValueType && !destinationType.IsValueType, "AreReferenceTypesCompatible can only be used for reference types"); 111throw Fx.Exception.AsError(new InvalidCastException(InternalSR.CannotConvertObject(source, typeof(T)))); 123throw Fx.Exception.AsError(new InvalidCastException(InternalSR.CannotConvertObject(source, typeof(T)))); 312Fx.Assert(source != null, "caller must verify");
System\Runtime\UrlUtility.cs (3)
25throw Fx.Exception.ArgumentNull("query"); 30throw Fx.Exception.ArgumentNull("encoding"); 358Fx.Assert(n < 0x10, "n < 0x10");