Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / Services / Monitoring / system / Diagnosticts / PerformanceCounterPermissionAttribute.cs / 1305376 / PerformanceCounterPermissionAttribute.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- namespace System.Diagnostics { using System.ComponentModel; using System.Security; using System.Security.Permissions; [ AttributeUsage(AttributeTargets.Method | AttributeTargets.Constructor | AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Assembly | AttributeTargets.Event, AllowMultiple = true, Inherited = false ), Serializable() ] public class PerformanceCounterPermissionAttribute : CodeAccessSecurityAttribute { private string categoryName; private string machineName; private PerformanceCounterPermissionAccess permissionAccess; public PerformanceCounterPermissionAttribute(SecurityAction action) : base(action) { this.categoryName = "*"; this.machineName = "."; this.permissionAccess = PerformanceCounterPermissionAccess.Write; } public string CategoryName { get { return this.categoryName; } set { if (value == null) throw new ArgumentNullException("value"); this.categoryName = value; } } public string MachineName { get { return this.machineName; } set { if (!SyntaxCheck.CheckMachineName(value)) throw new ArgumentException(SR.GetString(SR.InvalidProperty, "MachineName", value)); this.machineName = value; } } public PerformanceCounterPermissionAccess PermissionAccess { get { return this.permissionAccess; } set { this.permissionAccess = value; } } public override IPermission CreatePermission() { if (Unrestricted) return new PerformanceCounterPermission(PermissionState.Unrestricted); return new PerformanceCounterPermission(this.PermissionAccess, this.MachineName, this.CategoryName); } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007.
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- AccessibilityApplicationManager.cs
- GridViewRow.cs
- ColumnHeaderConverter.cs
- PropertyItem.cs
- ReaderOutput.cs
- DBPropSet.cs
- QueryComponents.cs
- URLString.cs
- Rotation3D.cs
- PerformanceCounterScope.cs
- LogicalExpr.cs
- PeerInvitationResponse.cs
- XmlSchemaComplexContent.cs
- WorkflowApplicationIdleEventArgs.cs
- XPathSelfQuery.cs
- base64Transforms.cs
- ServerIdentity.cs
- BitmapEffectDrawingContextWalker.cs
- FixedMaxHeap.cs
- ScriptControl.cs
- WebPartZone.cs
- AnnotationService.cs
- XmlSchemaSimpleTypeList.cs
- XmlSchemaRedefine.cs
- ItemList.cs
- Triplet.cs
- InkCanvasAutomationPeer.cs
- VectorAnimationUsingKeyFrames.cs
- BaseValidator.cs
- DiscardableAttribute.cs
- UInt32.cs
- Delay.cs
- CodeTypeReferenceSerializer.cs
- TargetException.cs
- TypeToken.cs
- SimpleType.cs
- DataGridViewRowEventArgs.cs
- SingleObjectCollection.cs
- SQLBoolean.cs
- Adorner.cs
- FormView.cs
- DataGridViewRowPostPaintEventArgs.cs
- IgnoreDeviceFilterElement.cs
- FixUpCollection.cs
- CodeDelegateCreateExpression.cs
- Vector.cs
- MsdtcWrapper.cs
- DeferredReference.cs
- CredentialCache.cs
- IListConverters.cs
- ForeignKeyConstraint.cs
- Currency.cs
- MarshalByRefObject.cs
- AccessDataSource.cs
- KeyValuePairs.cs
- SqlConnectionStringBuilder.cs
- CatalogUtil.cs
- ApplicationFileParser.cs
- UnrecognizedAssertionsBindingElement.cs
- DiscoveryClientDocuments.cs
- FreezableCollection.cs
- CacheDependency.cs
- DoubleConverter.cs
- ListViewDesigner.cs
- DataControlCommands.cs
- StrongNamePublicKeyBlob.cs
- UpdatableWrapper.cs
- FormsAuthenticationUserCollection.cs
- ValidationPropertyAttribute.cs
- FontDriver.cs
- Executor.cs
- CodeAssignStatement.cs
- UserPreferenceChangingEventArgs.cs
- _WebProxyDataBuilder.cs
- Int32Converter.cs
- MasterPage.cs
- DesignerTransaction.cs
- Propagator.Evaluator.cs
- ListenerElementsCollection.cs
- CrossAppDomainChannel.cs
- CurrencyWrapper.cs
- TreeNodeBinding.cs
- MediaScriptCommandRoutedEventArgs.cs
- CapabilitiesRule.cs
- Sequence.cs
- ProcessProtocolHandler.cs
- ImageDrawing.cs
- RuleSettingsCollection.cs
- EncoderFallback.cs
- ComboBoxRenderer.cs
- Set.cs
- XmlException.cs
- DoubleLink.cs
- BindingCompleteEventArgs.cs
- SkinBuilder.cs
- DataGridViewCellStyleConverter.cs
- TraceSection.cs
- StatusBarDrawItemEvent.cs
- Vector.cs
- CacheDependency.cs