Code:
/ DotNET / DotNET / 8.0 / untmp / whidbey / REDBITS / ndp / fx / src / Services / Monitoring / system / Diagnosticts / EventLogPermissionAttribute.cs / 1 / 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); } } }
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- CompositeFontFamily.cs
- __ConsoleStream.cs
- PassportAuthenticationModule.cs
- LayoutEngine.cs
- DispatcherEventArgs.cs
- Bits.cs
- ChannelDispatcher.cs
- EnumerableCollectionView.cs
- XamlPathDataSerializer.cs
- Utils.cs
- PingReply.cs
- WebEvents.cs
- XmlSchemaType.cs
- SourceCollection.cs
- Cast.cs
- OrderPreservingPipeliningMergeHelper.cs
- MouseEventArgs.cs
- ScriptingJsonSerializationSection.cs
- CacheEntry.cs
- ShaderEffect.cs
- ProfileEventArgs.cs
- PtsHelper.cs
- TextBox.cs
- FileChangesMonitor.cs
- BufferedGraphicsContext.cs
- ToolboxItem.cs
- PointAnimation.cs
- CharacterBufferReference.cs
- cookieexception.cs
- ItemList.cs
- OpenFileDialog.cs
- XmlEventCache.cs
- InternalException.cs
- CollectionChangedEventManager.cs
- TypeElement.cs
- XamlToRtfWriter.cs
- MarkupCompiler.cs
- SafeNativeMethods.cs
- WebPartDescriptionCollection.cs
- PageBuildProvider.cs
- FontFaceLayoutInfo.cs
- ECDiffieHellman.cs
- Byte.cs
- FixedSchema.cs
- BaseTemplatedMobileComponentEditor.cs
- ButtonBase.cs
- ProvidersHelper.cs
- XmlSchemaChoice.cs
- ProjectionAnalyzer.cs
- messageonlyhwndwrapper.cs
- DataGridViewButtonColumn.cs
- NetWebProxyFinder.cs
- DataGridTextBoxColumn.cs
- SQLMembershipProvider.cs
- XmlFormatWriterGenerator.cs
- XmlILTrace.cs
- TemplateContent.cs
- NativeRightsManagementAPIsStructures.cs
- ConditionChanges.cs
- Dump.cs
- TextElementCollection.cs
- IPPacketInformation.cs
- SafeRightsManagementSessionHandle.cs
- XmlDataSourceView.cs
- TypeSource.cs
- LowerCaseStringConverter.cs
- DelegateCompletionCallbackWrapper.cs
- SQLMembershipProvider.cs
- DataSetSchema.cs
- MouseDevice.cs
- ObjectStateManager.cs
- Persist.cs
- HScrollProperties.cs
- PerfCounters.cs
- WindowsFormsHostPropertyMap.cs
- Reference.cs
- XmlComment.cs
- RuntimeHelpers.cs
- MetadataArtifactLoaderFile.cs
- XmlSchemaSimpleType.cs
- DataListItemCollection.cs
- Psha1DerivedKeyGenerator.cs
- XmlExpressionDumper.cs
- DrawingGroup.cs
- RelationshipDetailsCollection.cs
- IntSecurity.cs
- handlecollector.cs
- ComplexLine.cs
- TagNameToTypeMapper.cs
- FileClassifier.cs
- MimeReturn.cs
- ExclusiveCanonicalizationTransform.cs
- XmlRootAttribute.cs
- ClientSideQueueItem.cs
- CmsInterop.cs
- TrackingConditionCollection.cs
- GridView.cs
- IsolatedStorage.cs
- Registration.cs
- InternalTransaction.cs