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
- MsmqHostedTransportConfiguration.cs
- safelink.cs
- DataServicePagingProviderWrapper.cs
- LongTypeConverter.cs
- ReadingWritingEntityEventArgs.cs
- SerializerProvider.cs
- SafeThemeHandle.cs
- DriveNotFoundException.cs
- Highlights.cs
- HttpContext.cs
- XmlBinaryReader.cs
- WinHttpWebProxyFinder.cs
- Int16KeyFrameCollection.cs
- ListViewGroup.cs
- CharUnicodeInfo.cs
- IconBitmapDecoder.cs
- SourceFilter.cs
- IntranetCredentialPolicy.cs
- TextRunTypographyProperties.cs
- CmsInterop.cs
- DictionaryBase.cs
- ToolStripLocationCancelEventArgs.cs
- DataGridItem.cs
- MouseButton.cs
- LightweightCodeGenerator.cs
- SqlGatherProducedAliases.cs
- XmlArrayAttribute.cs
- SmtpReplyReader.cs
- SpotLight.cs
- ZipPackagePart.cs
- HashCryptoHandle.cs
- sitestring.cs
- UserNameSecurityToken.cs
- DescendentsWalkerBase.cs
- FloaterBaseParaClient.cs
- IssuedTokenParametersElement.cs
- LogManagementAsyncResult.cs
- SchemaMapping.cs
- CellConstantDomain.cs
- DataSysAttribute.cs
- ListViewItem.cs
- HttpContextServiceHost.cs
- GeometryCollection.cs
- WmlLiteralTextAdapter.cs
- DbDataRecord.cs
- XmlBinaryWriterSession.cs
- CodeTypeDelegate.cs
- TextBox.cs
- PartialArray.cs
- DataControlButton.cs
- InputBuffer.cs
- PartialCachingAttribute.cs
- PathFigureCollection.cs
- ConfigXmlText.cs
- ObjectPropertyMapping.cs
- BuilderInfo.cs
- CommunicationObjectManager.cs
- SizeConverter.cs
- HealthMonitoringSection.cs
- DoubleAnimationUsingPath.cs
- DodSequenceMerge.cs
- Hashtable.cs
- HitTestParameters3D.cs
- CorrelationRequestContext.cs
- CodeStatement.cs
- Roles.cs
- DataObjectMethodAttribute.cs
- PrtTicket_Public.cs
- Types.cs
- DelayedRegex.cs
- StringDictionaryWithComparer.cs
- ToolStripOverflow.cs
- DataSetFieldSchema.cs
- EmptyStringExpandableObjectConverter.cs
- AQNBuilder.cs
- MappingSource.cs
- PenContexts.cs
- CommonObjectSecurity.cs
- ControlParameter.cs
- DataTable.cs
- CommentEmitter.cs
- SessionStateItemCollection.cs
- MiniAssembly.cs
- SqlConnectionHelper.cs
- StringConcat.cs
- CodeGeneratorAttribute.cs
- AnnouncementClient.cs
- PropertyChangingEventArgs.cs
- AppendHelper.cs
- EntityRecordInfo.cs
- InfoCardSchemas.cs
- ScrollItemProviderWrapper.cs
- Models.cs
- PartialArray.cs
- LinkedList.cs
- SeverityFilter.cs
- ChildDocumentBlock.cs
- ResourceDescriptionAttribute.cs
- WebPartConnectionsDisconnectVerb.cs
- ConfigurationManagerHelper.cs