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
- AppDomainAttributes.cs
- DataGridTextBox.cs
- HtmlTableRow.cs
- ResourcePart.cs
- JournalEntryStack.cs
- TextEditorThreadLocalStore.cs
- AbstractSvcMapFileLoader.cs
- StateItem.cs
- EntityViewGenerationAttribute.cs
- Collection.cs
- documentation.cs
- PageAsyncTaskManager.cs
- DataGridViewSelectedRowCollection.cs
- MenuItemStyle.cs
- CursorConverter.cs
- UInt16Converter.cs
- WmlObjectListAdapter.cs
- DateTimeFormatInfo.cs
- TableParagraph.cs
- BitmapData.cs
- Polyline.cs
- CounterCreationDataCollection.cs
- ScrollData.cs
- OutKeywords.cs
- XPathBinder.cs
- XmlQueryType.cs
- IncrementalCompileAnalyzer.cs
- RangeEnumerable.cs
- DataDocumentXPathNavigator.cs
- DataGridViewColumnCollection.cs
- ValidationService.cs
- XmlDictionary.cs
- LoadMessageLogger.cs
- ComponentCommands.cs
- PreservationFileReader.cs
- filewebresponse.cs
- Panel.cs
- XMLUtil.cs
- Transform.cs
- CurrentTimeZone.cs
- StringBuilder.cs
- FormsIdentity.cs
- CancellationTokenRegistration.cs
- Stylus.cs
- EtwTrackingBehavior.cs
- HttpRequestCacheValidator.cs
- View.cs
- SqlFunctions.cs
- SharedDp.cs
- Int64KeyFrameCollection.cs
- UnhandledExceptionEventArgs.cs
- AspNetSynchronizationContext.cs
- ProtocolsConfiguration.cs
- Missing.cs
- DataGridViewImageCell.cs
- TreePrinter.cs
- EventLogTraceListener.cs
- URLString.cs
- XmlNodeChangedEventManager.cs
- LayoutEngine.cs
- TableParaClient.cs
- COM2IDispatchConverter.cs
- OleDbEnumerator.cs
- ClientData.cs
- DnsElement.cs
- WinOEToolBoxItem.cs
- DataBindEngine.cs
- CacheDependency.cs
- ErrorEventArgs.cs
- ToolZoneDesigner.cs
- PTUtility.cs
- DispatcherExceptionFilterEventArgs.cs
- NumericUpDownAccelerationCollection.cs
- ImmutableObjectAttribute.cs
- CompositeDispatchFormatter.cs
- CatalogZone.cs
- InputProcessorProfilesLoader.cs
- VisualStates.cs
- SizeChangedEventArgs.cs
- PickBranch.cs
- Column.cs
- BamlRecordWriter.cs
- ResponseStream.cs
- RemotingSurrogateSelector.cs
- BitmapCodecInfo.cs
- VersionedStreamOwner.cs
- DataGridViewRowDividerDoubleClickEventArgs.cs
- WCFModelStrings.Designer.cs
- CommonGetThemePartSize.cs
- ApplyTemplatesAction.cs
- ControlType.cs
- AssemblyNameProxy.cs
- SessionSymmetricMessageSecurityProtocolFactory.cs
- DrawingCollection.cs
- InvalidDocumentContentsException.cs
- ProjectedSlot.cs
- AudienceUriMode.cs
- DecoderFallbackWithFailureFlag.cs
- HtmlForm.cs
- XmlAnyElementAttributes.cs