Code:
/ 4.0 / 4.0 / 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. //---------------------------------------------------- // // 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
- VisualStateManager.cs
- XPathSelfQuery.cs
- ParserStreamGeometryContext.cs
- XmlSchemaImporter.cs
- DataGridViewRowsRemovedEventArgs.cs
- XsltLibrary.cs
- TabControl.cs
- BoundField.cs
- DataGridViewColumnConverter.cs
- DataGridHelper.cs
- LassoSelectionBehavior.cs
- ValueSerializerAttribute.cs
- CodeConditionStatement.cs
- TextEffectResolver.cs
- ProfileBuildProvider.cs
- ListBase.cs
- StaticSiteMapProvider.cs
- WindowsUpDown.cs
- TrackingProfileSerializer.cs
- ClaimTypeElement.cs
- DesignOnlyAttribute.cs
- WorkflowItemPresenter.cs
- FactoryGenerator.cs
- FunctionQuery.cs
- XmlSchemaExternal.cs
- Baml2006KeyRecord.cs
- FixedPageAutomationPeer.cs
- TextSearch.cs
- PresentationTraceSources.cs
- remotingproxy.cs
- x509utils.cs
- FontUnitConverter.cs
- ExecutedRoutedEventArgs.cs
- XamlTreeBuilder.cs
- FirewallWrapper.cs
- DispatcherFrame.cs
- Int64KeyFrameCollection.cs
- ConfigUtil.cs
- WeakReferenceList.cs
- Vars.cs
- StylusCaptureWithinProperty.cs
- HttpModulesSection.cs
- NameValuePair.cs
- XslTransform.cs
- FormsIdentity.cs
- PageContent.cs
- SingleConverter.cs
- cryptoapiTransform.cs
- NativeMethods.cs
- AlternateView.cs
- DeclaredTypeValidator.cs
- TypefaceMap.cs
- WebMessageFormatHelper.cs
- OleDbReferenceCollection.cs
- PopupControlService.cs
- CompressionTransform.cs
- QilName.cs
- MouseEvent.cs
- WindowsListViewGroup.cs
- XmlSchemaInclude.cs
- TypeDescriptionProvider.cs
- WebSysDescriptionAttribute.cs
- DateTimeParse.cs
- EntityWrapperFactory.cs
- ColorBlend.cs
- Pair.cs
- ToolStripItemCollection.cs
- IISMapPath.cs
- WindowsRebar.cs
- WindowClosedEventArgs.cs
- Trace.cs
- AnimatedTypeHelpers.cs
- X509SecurityTokenAuthenticator.cs
- Tablet.cs
- RenderingEventArgs.cs
- VolatileEnlistmentState.cs
- ProviderBase.cs
- SearchForVirtualItemEventArgs.cs
- InputReportEventArgs.cs
- SolidColorBrush.cs
- filewebresponse.cs
- FlatButtonAppearance.cs
- CompensateDesigner.cs
- GeometryValueSerializer.cs
- dataobject.cs
- KeyValueSerializer.cs
- StyleCollectionEditor.cs
- AesManaged.cs
- OptionalRstParameters.cs
- SiteMapDataSource.cs
- DynamicValueConverter.cs
- DynamicRenderer.cs
- GlyphShapingProperties.cs
- CallbackValidatorAttribute.cs
- WindowsHyperlink.cs
- UIPropertyMetadata.cs
- GenerateScriptTypeAttribute.cs
- XmlDocument.cs
- ValueConversionAttribute.cs
- sqlser.cs