Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / Services / Monitoring / system / Diagnosticts / EventLogPermissionEntryCollection.cs / 1305376 / EventLogPermissionEntryCollection.cs
//---------------------------------------------------- //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- namespace System.Diagnostics { using System.Security.Permissions; using System.Collections; [ Serializable() ] public class EventLogPermissionEntryCollection : CollectionBase { EventLogPermission owner; ///internal EventLogPermissionEntryCollection(EventLogPermission owner, ResourcePermissionBaseEntry[] entries) { this.owner = owner; for (int index = 0; index < entries.Length; ++index) this.InnerList.Add(new EventLogPermissionEntry(entries[index])); } public EventLogPermissionEntry this[int index] { get { return (EventLogPermissionEntry)List[index]; } set { List[index] = value; } } public int Add(EventLogPermissionEntry value) { return List.Add(value); } public void AddRange(EventLogPermissionEntry[] value) { if (value == null) { throw new ArgumentNullException("value"); } for (int i = 0; ((i) < (value.Length)); i = ((i) + (1))) { this.Add(value[i]); } } public void AddRange(EventLogPermissionEntryCollection value) { if (value == null) { throw new ArgumentNullException("value"); } int currentCount = value.Count; for (int i = 0; i < currentCount; i = ((i) + (1))) { this.Add(value[i]); } } public bool Contains(EventLogPermissionEntry value) { return List.Contains(value); } public void CopyTo(EventLogPermissionEntry[] array, int index) { List.CopyTo(array, index); } public int IndexOf(EventLogPermissionEntry value) { return List.IndexOf(value); } public void Insert(int index, EventLogPermissionEntry value) { List.Insert(index, value); } public void Remove(EventLogPermissionEntry value) { List.Remove(value); } /// protected override void OnClear() { this.owner.Clear(); } /// protected override void OnInsert(int index, object value) { this.owner.AddPermissionAccess((EventLogPermissionEntry)value); } /// protected override void OnRemove(int index, object value) { this.owner.RemovePermissionAccess((EventLogPermissionEntry)value); } /// protected override void OnSet(int index, object oldValue, object newValue) { this.owner.RemovePermissionAccess((EventLogPermissionEntry)oldValue); this.owner.AddPermissionAccess((EventLogPermissionEntry)newValue); } } } // 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
- HGlobalSafeHandle.cs
- MTConfigUtil.cs
- SafeRightsManagementQueryHandle.cs
- GeometryHitTestResult.cs
- UnSafeCharBuffer.cs
- ProfileModule.cs
- RC2CryptoServiceProvider.cs
- HTMLTextWriter.cs
- Exception.cs
- ApplicationFileParser.cs
- NameNode.cs
- DesignTimeResourceProviderFactoryAttribute.cs
- XmlProcessingInstruction.cs
- RadioButton.cs
- FileSystemInfo.cs
- DeadCharTextComposition.cs
- CompareValidator.cs
- ClaimSet.cs
- DllNotFoundException.cs
- XmlBaseReader.cs
- EntityTypeBase.cs
- XslTransform.cs
- ServicePoint.cs
- CatalogPartCollection.cs
- ClonableStack.cs
- CategoryAttribute.cs
- CodeAttributeArgument.cs
- RoleBoolean.cs
- Rectangle.cs
- SyndicationContent.cs
- FolderNameEditor.cs
- FlowDocumentScrollViewer.cs
- HtmlControlPersistable.cs
- TabletCollection.cs
- SoapHeaderException.cs
- ADMembershipUser.cs
- AdRotator.cs
- XmlEncodedRawTextWriter.cs
- DoubleIndependentAnimationStorage.cs
- BitmapEffectCollection.cs
- SingleSelectRootGridEntry.cs
- ExceptionHelpers.cs
- HttpStreamMessageEncoderFactory.cs
- IteratorFilter.cs
- PasswordValidationException.cs
- RectangleGeometry.cs
- DefaultCommandConverter.cs
- Icon.cs
- ConfigurationPropertyAttribute.cs
- UserNameSecurityTokenAuthenticator.cs
- DefaultProxySection.cs
- CreateInstanceBinder.cs
- EdmPropertyAttribute.cs
- CodeTypeOfExpression.cs
- XmlBinaryReaderSession.cs
- TreeViewCancelEvent.cs
- ManagedWndProcTracker.cs
- MulticastOption.cs
- IdentityReference.cs
- AuthenticateEventArgs.cs
- EventDescriptor.cs
- HashHelper.cs
- MethodToken.cs
- ApplicationException.cs
- InternalEnumValidatorAttribute.cs
- EntityConnectionStringBuilderItem.cs
- HtmlHead.cs
- LinkedList.cs
- GeneratedCodeAttribute.cs
- MessageFault.cs
- LinkedResourceCollection.cs
- WebCategoryAttribute.cs
- FixUpCollection.cs
- CodePropertyReferenceExpression.cs
- FtpWebRequest.cs
- WindowsRegion.cs
- StringFunctions.cs
- newinstructionaction.cs
- ControlValuePropertyAttribute.cs
- FontStyles.cs
- webclient.cs
- ReachObjectContext.cs
- SystemParameters.cs
- XamlToRtfWriter.cs
- OleDbRowUpdatedEvent.cs
- DbConnectionPoolOptions.cs
- UnsignedPublishLicense.cs
- XmlSchemaAny.cs
- ParentQuery.cs
- Models.cs
- StorageComplexTypeMapping.cs
- FormViewModeEventArgs.cs
- CriticalExceptions.cs
- DetailsViewModeEventArgs.cs
- NavigationProperty.cs
- MemberPath.cs
- DbConnectionPoolGroup.cs
- UrlMapping.cs
- ToolboxItemFilterAttribute.cs
- DoubleAnimationBase.cs