Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / Services / Monitoring / system / Diagnosticts / EventLogPermissionAttribute.cs / 1305376 / EventLogPermissionAttribute.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 EventLogPermissionAttribute : CodeAccessSecurityAttribute { private string machineName; private EventLogPermissionAccess permissionAccess; public EventLogPermissionAttribute(SecurityAction action) : base(action) { this.machineName = "."; this.permissionAccess = EventLogPermissionAccess.Write; } 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 EventLogPermissionAccess PermissionAccess { get { return this.permissionAccess; } set { this.permissionAccess = value; } } public override IPermission CreatePermission() { if (Unrestricted) return new EventLogPermission(PermissionState.Unrestricted); return new EventLogPermission(this.PermissionAccess, this.MachineName); } } } // 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
- SchemaCollectionPreprocessor.cs
- FeatureSupport.cs
- XmlCharType.cs
- MetadataCacheItem.cs
- PipelineModuleStepContainer.cs
- HandledEventArgs.cs
- CodeTypeMember.cs
- ResourceDisplayNameAttribute.cs
- OperationResponse.cs
- Decoder.cs
- CodeBinaryOperatorExpression.cs
- FontEmbeddingManager.cs
- CreatingCookieEventArgs.cs
- DrawingGroup.cs
- NamedPipeTransportManager.cs
- CheckBox.cs
- TemplateBaseAction.cs
- ColumnTypeConverter.cs
- DetailsViewDeleteEventArgs.cs
- WebEventCodes.cs
- DetailsViewPagerRow.cs
- ImageBrush.cs
- PcmConverter.cs
- shaperfactoryquerycacheentry.cs
- OAVariantLib.cs
- AccessibilityHelperForXpWin2k3.cs
- WindowsFormsLinkLabel.cs
- QuestionEventArgs.cs
- PageParser.cs
- MarkupCompilePass1.cs
- Nullable.cs
- HttpCapabilitiesSectionHandler.cs
- Ipv6Element.cs
- WebPartMovingEventArgs.cs
- XsltLoader.cs
- WebServiceErrorEvent.cs
- TheQuery.cs
- OleDbReferenceCollection.cs
- CurrentChangingEventManager.cs
- baseaxisquery.cs
- HierarchicalDataTemplate.cs
- SerializationAttributes.cs
- HostSecurityManager.cs
- VerificationException.cs
- MethodImplAttribute.cs
- SchemaSetCompiler.cs
- PackWebRequestFactory.cs
- Options.cs
- EntityContainerAssociationSet.cs
- AtomMaterializerLog.cs
- ContentDesigner.cs
- EventListener.cs
- TypeInfo.cs
- DecimalMinMaxAggregationOperator.cs
- OperatingSystemVersionCheck.cs
- XmlDataSource.cs
- HttpPostClientProtocol.cs
- XmlC14NWriter.cs
- HuffModule.cs
- BuildProvidersCompiler.cs
- TimeSpan.cs
- LocalFileSettingsProvider.cs
- ShapingEngine.cs
- HandleCollector.cs
- NameValuePermission.cs
- ValidatedControlConverter.cs
- MailAddressCollection.cs
- WebServiceTypeData.cs
- TreeViewTemplateSelector.cs
- PasswordTextNavigator.cs
- ShaperBuffers.cs
- UIElementAutomationPeer.cs
- MDIControlStrip.cs
- SqlReferenceCollection.cs
- ViewStateModeByIdAttribute.cs
- ToolBar.cs
- IsolatedStorageFile.cs
- Base64Decoder.cs
- SafeTimerHandle.cs
- ProcessStartInfo.cs
- CharAnimationUsingKeyFrames.cs
- TemplatedControlDesigner.cs
- HwndMouseInputProvider.cs
- SqlNotificationRequest.cs
- ItemMap.cs
- RelatedImageListAttribute.cs
- Image.cs
- remotingproxy.cs
- StringValueSerializer.cs
- XmlSchemaSimpleTypeUnion.cs
- FormatVersion.cs
- HashAlgorithm.cs
- FormClosingEvent.cs
- RenderOptions.cs
- TabPageDesigner.cs
- SqlClientPermission.cs
- HuffCodec.cs
- ManagementObjectSearcher.cs
- BrushConverter.cs
- ViewStateModeByIdAttribute.cs