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",
46
Fx
.Assert(callback != null, "A null callback was passed for Schedule!");
50
Fx
.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 " +
75
throw
Fx
.Exception.AsError(new InvalidOperationException(InternalSR.ActionItemIsAlreadyScheduled));
92
[
Fx
.Tag.SecurityNote(Critical = "Access critical field context and critical property " +
100
throw
Fx
.Exception.ArgumentNull("context");
104
throw
Fx
.Exception.AsError(new InvalidOperationException(InternalSR.ActionItemIsAlreadyScheduled));
111
[
Fx
.Tag.SecurityNote(Critical = "Access critical property CallbackHelper.InvokeWithoutContextCallback, " +
118
throw
Fx
.Exception.AsError(new InvalidOperationException(InternalSR.ActionItemIsAlreadyScheduled));
125
[
Fx
.Tag.SecurityNote(Critical = "Calls into critical methods IOThreadScheduler.ScheduleCallbackNoFlow, " +
130
Fx
.Assert(callback != null, "Cannot schedule a null callback");
141
[
Fx
.Tag.SecurityNote(Critical = "Extract the security context stored and reset the critical field")]
145
Fx
.Assert(this.context != null, "Cannot bind to a null context; context should have been set by now");
146
Fx
.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",
248
Fx
.Assert(callback != null, "Shouldn't instantiate an object to wrap a null callback");
257
if (
Fx
.Trace.IsEnd2EndActivityTracingEnabled)
260
if (TraceCore.ActionItemScheduledIsEnabled(
Fx
.Trace))
262
TraceCore.ActionItemScheduled(
Fx
.Trace, this.eventTraceActivity);
268
[
Fx
.Tag.SecurityNote(Critical = "Implements a the critical abstract ActionItem.Invoke method, " +
273
if (this.flowLegacyActivityId ||
Fx
.Trace.IsEnd2EndActivityTracingEnabled)
283
[
Fx
.Tag.SecurityNote(Critical = "Implements a the critical abstract Trace method, " +
313
if (TraceCore.ActionItemCallbackInvokedIsEnabled(
Fx
.Trace))
315
TraceCore.ActionItemCallbackInvoked(
Fx
.Trace, this.eventTraceActivity);
System\Runtime\AsyncEventArgs.cs (5)
9
[
Fx
.Tag.SynchronizationPrimitive(
Fx
.Tag.BlocksUsing.NonBlocking, SupportsAsync = true, ReleaseMethod = "Complete")]
40
throw
Fx
.Exception.AsError(new InvalidOperationException(InternalSR.AsyncEventArgsCompletionPending(GetType())));
53
throw
Fx
.Exception.AsError(new InvalidOperationException(InternalSR.AsyncEventArgsCompletedTwice(GetType())));
93
throw
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)]
125
throw
Fx
.Exception.AsError(new InvalidOperationException(InternalSR.AsyncResultCompletedTwice(GetType())));
147
if (
Fx
.IsFatal(exception))
159
Fx
.Assert(this.manualResetEvent == null, "No ManualResetEvent should be created for a synchronous AsyncResult.");
191
if (
Fx
.IsFatal(e))
196
throw
Fx
.Exception.AsError(new CallbackException(InternalSR.AsyncCallbackThrewException, e));
212
throw
Fx
.Exception.AsError(new InvalidOperationException(InternalSR.InvalidNullAsyncResult));
239
if (
Fx
.IsFatal(e))
281
AsyncResult.asyncCompletionWrapperCallback =
Fx
.ThunkCallback(new AsyncCallback(AsyncCompletionWrapperCallback));
309
throw
Fx
.Exception.AsError(new InvalidOperationException(InternalSR.InvalidNullAsyncResult));
342
throw
Fx
.Exception.AsError(new InvalidOperationException(InternalSR.InvalidAsyncResultImplementation(result.GetType())));
354
throw
Fx
.Exception.AsError(new InvalidOperationException(message));
357
[
Fx
.Tag.Blocking(Conditional = "!asyncResult.isCompleted")]
363
throw
Fx
.Exception.ArgumentNull("result");
370
throw
Fx
.Exception.Argument("result", InternalSR.InvalidAsyncResult);
375
throw
Fx
.Exception.AsError(new InvalidOperationException(InternalSR.AsyncResultAlreadyEnded));
406
throw
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")]
263
throw
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,
14
SizeLimit =
Fx
.Tag.Strings.ExternallyManaged)]
17
[
Fx
.Tag.Queue(typeof(byte), SizeLimit = "BufferedOutputStream(maxSize)",
84
throw
Fx
.Exception.AsError(new NotSupportedException(InternalSR.SeekNotSupported));
88
throw
Fx
.Exception.AsError(new NotSupportedException(InternalSR.SeekNotSupported));
99
Fx
.Assert(!this.initialized, "Clear must be called before re-initializing stream");
140
throw
Fx
.Exception.AsError(new NotSupportedException(InternalSR.ReadNotSupported));
145
throw
Fx
.Exception.AsError(new NotSupportedException(InternalSR.ReadNotSupported));
187
throw
Fx
.Exception.AsError(new NotSupportedException(InternalSR.ReadNotSupported));
192
throw
Fx
.Exception.AsError(new NotSupportedException(InternalSR.ReadNotSupported));
197
throw
Fx
.Exception.AsError(new NotSupportedException(InternalSR.SeekNotSupported));
202
throw
Fx
.Exception.AsError(new NotSupportedException(InternalSR.SeekNotSupported));
214
Fx
.Assert(this.initialized, "No data to return from uninitialized stream");
215
Fx
.Assert(!this.bufferReturned, "ToArray cannot be called more than once");
260
Fx
.Assert(this.initialized, "Cannot write to uninitialized stream");
261
Fx
.Assert(!this.bufferReturned, "Cannot write to stream once ToArray has been called.");
265
throw
Fx
.Exception.ArgumentOutOfRange("size", size, InternalSR.ValueMustBeNonNegative);
270
throw
Fx
.Exception.AsError(CreateQuotaExceededException(this.maxSizeQuota));
276
throw
Fx
.Exception.AsError(CreateQuotaExceededException(this.maxSizeQuota));
305
Fx
.Assert(this.initialized, "Cannot write to uninitialized stream");
306
Fx
.Assert(!this.bufferReturned, "Cannot write to stream once ToArray has been called.");
310
throw
Fx
.Exception.AsError(CreateQuotaExceededException(this.maxSize));
System\Runtime\CallbackException.cs (3)
21
Fx
.Assert(innerException != null, "CallbackException requires an inner exception.");
22
Fx
.Assert(!
Fx
.IsFatal(innerException), "CallbackException can't be used to wrap fatal exceptions.");
System\Runtime\Collections\HopperCache.cs (6)
63
Fx
.Assert(hopperSize > 0, "HopperCache hopperSize must be positive.");
76
Fx
.Assert(key != null, "HopperCache key cannot be null.");
77
Fx
.Assert(value != null, "HopperCache value cannot be null.");
85
Fx
.Assert(this.strongHopper.Count <= this.hopperSize * 2,
113
Fx
.Assert(key != null, "Can't look up a null key.");
176
Fx
.Assert(this.outstandingHopper.Count <= this.hopperSize,
System\Runtime\Collections\NullableKeyDictionary.cs (8)
60
throw
Fx
.Exception.AsError(new KeyNotFoundException());
88
throw
Fx
.Exception.Argument("key", InternalSR.NullKeyAlreadyPresent);
250
throw
Fx
.Exception.AsError(new NotSupportedException(InternalSR.KeyCollectionUpdatesNotAllowed));
255
throw
Fx
.Exception.AsError(new NotSupportedException(InternalSR.KeyCollectionUpdatesNotAllowed));
274
throw
Fx
.Exception.AsError(new NotSupportedException(InternalSR.KeyCollectionUpdatesNotAllowed));
325
throw
Fx
.Exception.AsError(new NotSupportedException(InternalSR.ValueCollectionUpdatesNotAllowed));
330
throw
Fx
.Exception.AsError(new NotSupportedException(InternalSR.ValueCollectionUpdatesNotAllowed));
350
throw
Fx
.Exception.AsError(new NotSupportedException(InternalSR.ValueCollectionUpdatesNotAllowed));
System\Runtime\Collections\ObjectCache.cs (15)
39
Fx
.Assert(settings != null, "caller must use a valid settings object");
75
Fx
.Assert(key != null, "caller must validate parameters");
76
Fx
.Assert(value != null, "caller must validate parameters");
99
Fx
.Assert(key != null, "caller must validate parameters");
118
Fx
.Assert(createdObject != null, "initializer delegate must always give us a valid object");
168
Fx
.Assert(removedFromItems, "we should always find the key");
203
Fx
.Assert(!item.Equals(default(T)), "item should never be null");
407
Fx
.Assert(this.parent.cacheItems.ContainsValue(this), "should have a valid value");
408
Fx
.Assert(this.Value != null, "should have a valid value");
428
Fx
.Assert(this.referenceCount == 1, "reference count should have never increased");
458
Fx
.Assert(this.referenceCount >= 0, "cannot take the item marked for disposal");
464
Fx
.Assert(this.referenceCount > 0, "can only release an item that has references");
471
Fx
.Assert(this.referenceCount == 0, "we should only dispose items without references");
482
Fx
.Assert(localDisposeItemCallback == null, "shouldn't have both this.disposeItemCallback and this.parent");
502
Fx
.Assert(this.referenceCount == -1, "we should only dispose items that have had LockedDispose called on them");
System\Runtime\Collections\ObjectCacheSettings.cs (4)
48
Fx
.Assert(value >= 0, "caller should validate cache limit is non-negative");
61
Fx
.Assert(value >= TimeSpan.Zero, "caller should validate cache limit is non-negative");
74
Fx
.Assert(value >= TimeSpan.Zero, "caller should validate cache limit is non-negative");
87
Fx
.Assert(value >= 0, "caller should validate purge frequency is non-negative");
System\Runtime\Collections\OrderedDictionary.cs (10)
58
throw
Fx
.Exception.ArgumentNull("key");
67
throw
Fx
.Exception.AsError(new KeyNotFoundException(InternalSR.KeyNotFoundInDictionary));
74
throw
Fx
.Exception.ArgumentNull("key");
128
throw
Fx
.Exception.ArgumentNull("key");
155
throw
Fx
.Exception.ArgumentNull("key");
165
throw
Fx
.Exception.ArgumentNull("array");
170
throw
Fx
.Exception.AsError(new ArgumentOutOfRangeException("arrayIndex"));
175
throw
Fx
.Exception.Argument("array", InternalSR.BadCopyToArray);
216
throw
Fx
.Exception.ArgumentNull("key");
234
throw
Fx
.Exception.ArgumentNull("key");
System\Runtime\CompletedAsyncResult.cs (6)
19
[
Fx
.Tag.GuaranteeNonBlocking]
22
Fx
.AssertAndThrowFatal(result.IsCompleted, "CompletedAsyncResult was not completed!");
38
[
Fx
.Tag.GuaranteeNonBlocking]
41
Fx
.AssertAndThrowFatal(result.IsCompleted, "CompletedAsyncResult<T> was not completed!");
60
[
Fx
.Tag.GuaranteeNonBlocking]
63
Fx
.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")]
399
throw
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")]
527
throw
Fx
.Exception.AsError(new ArgumentOutOfRangeException("eventPayload",
566
throw
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")]
737
Fx
.Assert(false, "eventTraceActivity should not be null for WriteTransferEvent");
754
throw
Fx
.Exception.AsError(new ArgumentOutOfRangeException("eventPayload",
793
throw
Fx
.Exception.AsError(new ArgumentOutOfRangeException("eventPayload",
863
[
Fx
.Tag.SecurityNote(Critical = "Calling Unsafe code; usage of EventDescriptor, which is protected by a LinkDemand")]
869
throw
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.",
467
if (
Fx
.IsFatal(eventLoggerException))
488
if (
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",
569
Fx
.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")]
78
if (
Fx
.IsFatal(exception))
96
if (
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",
281
if (
Fx
.IsFatal(e))
291
[
Fx
.Tag.SecurityNote(Critical = "Usage of EventDescriptor, which is protected by a LinkDemand")]
318
if (
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")]
626
if (
Fx
.IsFatal(exception))
636
[
Fx
.Tag.SecurityNote(Critical = "Access critical etwProvider field",
652
if (
Fx
.IsFatal(exception))
968
Fx
.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)
40
throw
Fx
.Exception.ArgumentOutOfRange("id", id, InternalSR.ValueMustBeNonNegative);
45
throw
Fx
.Exception.ArgumentOutOfRange("id", id, string.Empty);
57
throw
Fx
.Exception.ArgumentOutOfRange("task", task, InternalSR.ValueMustBeNonNegative);
62
throw
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.")]
188
if (
Fx
.IsFatal(e))
218
Fx
.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)
18
Fx
.Assert(capacity >= 0, "The capacity parameter must be a positive value.");
28
Fx
.Assert(value != null, "The value must be non null.");
45
Fx
.Assert(this.items.Count == this.fifoList.Count, "The items and fifoList must be synchronized.");
59
Fx
.Assert(value != null, "The value must be non null.");
System\Runtime\ExceptionTrace.cs (10)
26
Fx
.Assert(diagnosticTrace != null, "'diagnosticTrace' MUST NOT be NULL.");
84
Fx
.Assert(targetInvocationException != null, "targetInvocationException cannot be null.");
88
if (
Fx
.IsFatal(targetInvocationException))
128
Fx
.Assert(aggregateException != null, "aggregateException cannot be null.");
132
if (
Fx
.IsFatal(aggregateException))
167
Fx
.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",
349
if (
Fx
.IsFatal(exception))
369
if (
Fx
.IsFatal(ex))
System\Runtime\FatalException.cs (2)
24
Fx
.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",
89
Fx
.UpdateLevel();
92
Fx
.UpdateLevel(trace);
98
[
Fx
.Tag.SecurityNote(Critical = "access critical field", Safe = "ok for get-only access")]
103
return
Fx
.asynchronousThreadExceptionHandler;
106
[
Fx
.Tag.SecurityNote(Critical = "sets a critical field")]
110
Fx
.asynchronousThreadExceptionHandler = value;
141
Fx
.Assert(description);
157
Fx
.Assert(description);
172
[
Fx
.Tag.SecurityNote(Critical = "Calls into critical method Environment.FailFast",
178
Fx
.Assert(description);
187
Fx
.Exception.TraceFailFast(failFastMessage);
393
[
Fx
.Tag.SecurityNote(Critical = "Construct the unsafe object IOCompletionThunk")]
461
throw
Fx
.Exception.AsError(
476
throw
Fx
.Exception.AsError(
483
[
Fx
.Tag.SecurityNote(Miscellaneous = "Must not call into PT code as it is called within a CER.")]
491
Fx
.Exception.TraceUnhandledException(exception);
504
[
Fx
.Tag.SecurityNote(Miscellaneous = "Must not call into PT code as it is called within a CER.")]
511
Fx
.Assert("Null exception in HandleAtThreadBase.");
519
ExceptionHandler handler =
Fx
.AsynchronousThreadExceptionHandler;
547
UpdateLevel(
Fx
.Trace);
552
[
Fx
.Tag.SecurityNote(Miscellaneous = "Must not call into PT code as it is called within a CER.")]
690
throw
Fx
.Exception.ArgumentNull("elementType");
731
throw
Fx
.Exception.ArgumentNull("elementType");
765
throw
Fx
.Exception.ArgumentNullOrEmpty("limit");
927
throw
Fx
.Exception.ArgumentNull("exceptionType");
931
throw
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",
1076
if (!
Fx
.HandleAtThreadBase(exception))
1098
[
Fx
.Tag.SecurityNote(Critical = "Calls PrepareConstrainedRegions which has a LinkDemand",
1110
if (!
Fx
.HandleAtThreadBase(exception))
1132
[
Fx
.Tag.SecurityNote(Critical = "Calls PrepareConstrainedRegions which has a LinkDemand",
1144
if (!
Fx
.HandleAtThreadBase(exception))
1166
[
Fx
.Tag.SecurityNote(Critical = "Calls PrepareConstrainedRegions which has a LinkDemand",
1178
if (!
Fx
.HandleAtThreadBase(exception))
1200
[
Fx
.Tag.SecurityNote(Critical = "Calls PrepareConstrainedRegions which has a LinkDemand",
1212
if (!
Fx
.HandleAtThreadBase(exception))
1234
[
Fx
.Tag.SecurityNote(Critical = "Calls PrepareConstrainedRegions which has a LinkDemand",
1246
if (!
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",
1288
if (!
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]
42
Fx
.Assert(asyncCallbackGenerator != null, "use default ctor if you don't have a generator");
146
[
Fx
.Tag.Blocking(CancelMethod = "Close")]
153
throw
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")]
292
throw
Fx
.Exception.AsError(new TimeoutException());
298
[
Fx
.Tag.Blocking(CancelMethod = "Dispatch", Conditional = "!result.IsCompleted")]
327
Fx
.Assert(exception != null, "EnqueueAndDispatch: exception parameter should not be null");
333
Fx
.Assert(item != null, "EnqueueAndDispatch: item parameter should not be null");
339
Fx
.Assert(item != null, "EnqueueWithoutDispatch: item parameter should not be null");
345
Fx
.Assert(exception != null, "EnqueueWithoutDispatch: exception parameter should not be null");
392
[
Fx
.Tag.Blocking(CancelMethod = "Dispatch")]
572
Fx
.Assert(state != null, "InputQueue.OnInvokeDequeuedCallback: (state != null)");
701
Fx
.Assert(reader != null, "InputQueue.RemoveReader: (reader != null)");
788
throw
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")]
954
Fx
.AssertAndThrow(this.totalCount != this.pendingCount, "ItemQueue does not contain any available items");
971
Fx
.AssertAndThrow(this.pendingCount != 0, "ItemQueue does not contain any pending items");
977
Fx
.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]
1024
Fx
.Assert(this.item == null, "InputQueue.WaitQueueReader.Set: (this.item == null)");
1025
Fx
.Assert(this.exception == null, "InputQueue.WaitQueueReader.Set: (this.exception == null)");
1033
[
Fx
.Tag.Blocking(CancelMethod = "Set")]
1065
throw
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)
36
Fx
.Assert(maxBufferPoolSize > 0 && maxBufferSize >= 0, "bad params, caller should verify");
121
if (TraceCore.BufferPoolChangeQuotaIsEnabled(
Fx
.Trace))
123
TraceCore.BufferPoolChangeQuota(
Fx
.Trace, bufferPool.BufferSize, delta);
216
Fx
.Assert(buffer != null, "caller must verify");
244
throw
Fx
.Exception.Argument("buffer", InternalSR.BufferIsNotRightSizeForBufferManager);
256
Fx
.Assert(bufferSize >= 0, "caller must ensure a non-negative argument");
279
if (TraceCore.BufferPoolAllocationIsEnabled(
Fx
.Trace))
281
TraceCore.BufferPoolAllocation(
Fx
.Trace, bufferPool.BufferSize);
284
returnValue =
Fx
.AllocateByteArray(bufferPool.BufferSize);
289
if (TraceCore.BufferPoolAllocationIsEnabled(
Fx
.Trace))
291
TraceCore.BufferPoolAllocation(
Fx
.Trace, bufferSize);
294
returnValue =
Fx
.AllocateByteArray(bufferSize);
562
return
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)
111
throw
Fx
.Exception.AsError(new System.ComponentModel.Win32Exception(error));
117
Fx
.AssertAndThrow("GetComputerName returned an invalid length: " + length);
124
throw
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)
12
static readonly Action<object> onCancel =
Fx
.ThunkCallback<object>(OnCancel);
58
Fx
.Assert(this.timer != null, "timer should not be null.");
69
Fx
.Assert(obj != null, "obj should not be null.");
76
Fx
.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",
91
Fx
.Assert(capacity > 0, "Capacity must be positive.");
92
Fx
.Assert(capacity <= 0x8000, "Capacity cannot exceed 32k.");
94
Fx
.Assert(capacityLowPri > 0, "Low-priority capacity must be positive.");
95
Fx
.Assert(capacityLowPri <= 0x8000, "Low-priority capacity cannot exceed 32k.");
98
Fx
.Assert((this.slots.Length & SlotMask) == 0, "Capacity must be a power of two.");
101
Fx
.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")]
112
throw
Fx
.Exception.ArgumentNull("callback");
126
[
Fx
.Tag.SecurityNote(Critical = "Calls into critical class CriticalHelper, doesn't flow context")]
132
throw
Fx
.Exception.ArgumentNull("callback");
147
[
Fx
.Tag.SecurityNote(Critical = "calls into ScheduledOverlapped to post it, touches slots, can be called outside user context.")]
160
Fx
.Assert(Bits.Count(slot) != 0, "IOTS went idle when it shouldn't have.");
169
throw
Fx
.AssertAndThrowFatal("Head/Tail overflow!");
193
[
Fx
.Tag.SecurityNote(Critical = "calls into ScheduledOverlapped to post it, touches slots, can be called outside user context.")]
227
throw
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")]
258
Fx
.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")]
493
Fx
.Assert(this.callback == null, "Slot already has a work item.");
494
Fx
.Assert((gateSnapshot & Bits.HiBits) == 0, "Slot already marked.");
501
Fx
.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")]
604
Fx
.ThunkCallback(new IOCompletionCallback(IOCallback)), null);
607
[
Fx
.Tag.SecurityNote(Miscellaneous = "note that in some hosts this runs without any user context on the stack")]
613
Fx
.Assert(iots != null, "Overlapped completed without a scheduler.");
643
Fx
.Assert(this.scheduler == null, "Post called on an overlapped that is already posted.");
644
Fx
.Assert(iots != null, "Post called with a null scheduler.");
650
[
Fx
.Tag.SecurityNote(Miscellaneous = "note that this runs on the finalizer thread")]
655
throw
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)]
399
Fx
.Assert(this.count > 0, "Should have at least one timer in our queue.");
414
Fx
.Assert(index > 0, "");
415
Fx
.Assert(index <= this.count, "");
445
Fx
.Assert(timer.index == 0, "Timer should not have an index.");
498
Fx
.Assert(index > 0, "");
499
Fx
.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")]
637
throw
Fx
.Exception.AsError(exception);
645
throw
Fx
.Exception.AsError(new Win32Exception());
System\Runtime\MruCache.cs (4)
34
Fx
.Assert(lowWatermark < highWatermark, "");
35
Fx
.Assert(lowWatermark >= 0, "");
60
Fx
.Assert(null != key, "");
109
Fx
.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)
50
throw
Fx
.Exception.AsError(CreateReadOnlyException());
73
throw
Fx
.Exception.AsError(CreateReadOnlyException());
78
throw
Fx
.Exception.AsError(CreateReadOnlyException());
83
throw
Fx
.Exception.AsError(CreateReadOnlyException());
112
throw
Fx
.Exception.AsError(CreateReadOnlyException());
117
throw
Fx
.Exception.AsError(CreateReadOnlyException());
System\Runtime\ReadOnlyKeyedCollection.cs (1)
16
Fx
.Assert(innerCollection != null, "innerCollection should not be null");
System\Runtime\ScheduleActionItemAsyncResult.cs (1)
37
if (
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)]
86
throw
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)
17
throw
Fx
.Exception.ArgumentNull("task");
22
throw
Fx
.Exception.AsError(new InvalidOperationException(InternalSR.SFxTaskNotStarted));
59
throw
Fx
.Exception.ArgumentNull("task");
64
throw
Fx
.Exception.AsError(new InvalidOperationException(InternalSR.SFxTaskNotStarted));
125
throw
Fx
.Exception.AsError<TException>(ex);
137
throw
Fx
.Exception.AsError<TException>(ex);
156
throw
Fx
.Exception.AsError<TException>(ex);
177
if (
Fx
.IsFatal(ex) || exceptionConverter == null)
187
throw
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]
41
Fx
.Assert(maxCount > 0, "maxCount must be positive");
74
Fx
.Assert(callback != null, "must have a non-null call back for async purposes");
82
throw
Fx
.Exception.AsError(CreateObjectAbortedException());
114
Fx
.Assert(!thisPtr.waiters.Contains(data.Waiter), "The waiter should have been removed already.");
138
[
Fx
.Tag.Blocking(CancelMethod = "Abort")]
143
throw
Fx
.Exception.AsError(CreateEnterTimedOutException(timeout));
147
[
Fx
.Tag.Blocking(CancelMethod = "Abort")]
158
throw
Fx
.Exception.AsError(CreateObjectAbortedException());
225
throw
Fx
.Exception.AsError(CreateObjectAbortedException());
266
throw
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)
19
Fx
.Assert(timeout >= TimeSpan.Zero, "timeout must be non-negative");
142
Fx
.Assert(!deadlineSet, "TimeoutHelper deadline set twice.");
156
throw
Fx
.Exception.ArgumentOutOfRange(argumentName, timeout, InternalSR.TimeoutMustBeNonNegative(argumentName, timeout));
169
throw
Fx
.Exception.ArgumentOutOfRange(argumentName, timeout, InternalSR.TimeoutMustBePositive(argumentName, timeout));
173
[
Fx
.Tag.Blocking]
System\Runtime\TypeHelper.cs (4)
64
Fx
.Assert(!sourceType.IsValueType && !destinationType.IsValueType, "AreReferenceTypesCompatible can only be used for reference types");
111
throw
Fx
.Exception.AsError(new InvalidCastException(InternalSR.CannotConvertObject(source, typeof(T))));
123
throw
Fx
.Exception.AsError(new InvalidCastException(InternalSR.CannotConvertObject(source, typeof(T))));
312
Fx
.Assert(source != null, "caller must verify");
System\Runtime\UrlUtility.cs (3)
25
throw
Fx
.Exception.ArgumentNull("query");
30
throw
Fx
.Exception.ArgumentNull("encoding");
358
Fx
.Assert(n < 0x10, "n < 0x10");