Code:
/ FX-1434 / FX-1434 / 1.0 / untmp / whidbey / REDBITS / ndp / fx / src / Services / Monitoring / system / Diagnosticts / PerformanceCounterPermissionAttribute.cs / 1 / 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); } } }
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- QilList.cs
- EnlistmentTraceIdentifier.cs
- StringFunctions.cs
- BinHexDecoder.cs
- EntityDataSourceSelectedEventArgs.cs
- SelectionEditor.cs
- InputScopeConverter.cs
- ManagedFilter.cs
- ObjectDataSourceFilteringEventArgs.cs
- PasswordValidationException.cs
- QilReference.cs
- CheckBoxAutomationPeer.cs
- BamlWriter.cs
- AccessControlList.cs
- DebugHandleTracker.cs
- EncoderExceptionFallback.cs
- FormatConvertedBitmap.cs
- XmlAttribute.cs
- DriveInfo.cs
- Module.cs
- NavigationProperty.cs
- NGCPageContentSerializerAsync.cs
- StyleModeStack.cs
- PointAnimationUsingKeyFrames.cs
- DataRecordInternal.cs
- SectionInput.cs
- SystemPens.cs
- Wrapper.cs
- NativeMethodsOther.cs
- WindowsProgressbar.cs
- QueryExtender.cs
- ItemContainerProviderWrapper.cs
- ToolTipService.cs
- XmlSchemaComplexType.cs
- BmpBitmapDecoder.cs
- Model3DCollection.cs
- XmlSchemaAnyAttribute.cs
- XmlDocument.cs
- EntityCommandCompilationException.cs
- DataGridViewRowPostPaintEventArgs.cs
- ExpressionBuilder.cs
- ParamArrayAttribute.cs
- CodeIndexerExpression.cs
- GradientStopCollection.cs
- BufferedStream2.cs
- Latin1Encoding.cs
- UriTemplateLiteralPathSegment.cs
- PropertyDescriptorGridEntry.cs
- DynamicQueryStringParameter.cs
- WsdlInspector.cs
- Internal.cs
- IODescriptionAttribute.cs
- DataKey.cs
- XPathNodePointer.cs
- MatrixIndependentAnimationStorage.cs
- EncodingTable.cs
- DataSourceView.cs
- CaseInsensitiveComparer.cs
- FixedDocument.cs
- DivideByZeroException.cs
- TextEmbeddedObject.cs
- SqlTriggerAttribute.cs
- MouseBinding.cs
- ProxyGenerator.cs
- HttpInputStream.cs
- SessionPageStatePersister.cs
- Serializer.cs
- SignerInfo.cs
- RangeValidator.cs
- StyleModeStack.cs
- WindowsToolbarItemAsMenuItem.cs
- PrintDialogException.cs
- ApplicationFileCodeDomTreeGenerator.cs
- Converter.cs
- Configuration.cs
- WebPartDisplayMode.cs
- InternalBufferOverflowException.cs
- Decimal.cs
- Propagator.JoinPropagator.SubstitutingCloneVisitor.cs
- GenericAuthenticationEventArgs.cs
- TraceInternal.cs
- PrintPreviewControl.cs
- UTF32Encoding.cs
- MimeMapping.cs
- EntitySqlQueryCacheEntry.cs
- TextEditorDragDrop.cs
- CustomTrackingRecord.cs
- CodeBinaryOperatorExpression.cs
- ConfigurationSectionGroupCollection.cs
- ServicePoint.cs
- HtmlInputCheckBox.cs
- LabelAutomationPeer.cs
- Cloud.cs
- SqlConnectionStringBuilder.cs
- OracleDataAdapter.cs
- NumericUpDownAccelerationCollection.cs
- mongolianshape.cs
- ScaleTransform3D.cs
- InkCanvasAutomationPeer.cs
- ellipse.cs