Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / whidbey / NetFXspW7 / ndp / fx / src / Services / Monitoring / system / Diagnosticts / EventLogPermissionEntryCollection.cs / 1 / 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
- AutoGeneratedField.cs
- TextLineBreak.cs
- TabItemWrapperAutomationPeer.cs
- MenuCommand.cs
- ObjectDataSourceDesigner.cs
- Assembly.cs
- SQLInt32.cs
- PixelFormatConverter.cs
- ETagAttribute.cs
- WebBrowserEvent.cs
- TextEvent.cs
- AnonymousIdentificationModule.cs
- ExpandCollapseProviderWrapper.cs
- GridItemPatternIdentifiers.cs
- Util.cs
- TransactionManager.cs
- PropVariant.cs
- StyleReferenceConverter.cs
- TextTreeExtractElementUndoUnit.cs
- LifetimeServices.cs
- ProcessHostConfigUtils.cs
- IdentitySection.cs
- EnumConverter.cs
- IIS7UserPrincipal.cs
- PostBackOptions.cs
- SqlParameter.cs
- SvcFileManager.cs
- SecurityHeaderLayout.cs
- InputMethodStateTypeInfo.cs
- MemoryRecordBuffer.cs
- BulletedListEventArgs.cs
- CriticalFinalizerObject.cs
- WmfPlaceableFileHeader.cs
- XmlDictionaryWriter.cs
- MessageHeaderAttribute.cs
- StringValueConverter.cs
- ICspAsymmetricAlgorithm.cs
- XmlElementCollection.cs
- GridViewEditEventArgs.cs
- PositiveTimeSpanValidatorAttribute.cs
- ItemChangedEventArgs.cs
- WebServiceData.cs
- FormsAuthenticationUserCollection.cs
- ResourceContainer.cs
- RegexGroupCollection.cs
- NativeMethods.cs
- WindowsScrollBarBits.cs
- PlainXmlWriter.cs
- TextDecorations.cs
- HttpCacheParams.cs
- ReflectionHelper.cs
- WmpBitmapEncoder.cs
- FrameworkPropertyMetadata.cs
- XmlSchemaNotation.cs
- SurrogateSelector.cs
- HttpVersion.cs
- WorkflowInstanceExtensionCollection.cs
- XmlIncludeAttribute.cs
- OLEDB_Enum.cs
- ConfigurationSectionGroupCollection.cs
- AssemblyCache.cs
- DesignOnlyAttribute.cs
- ObjectParameterCollection.cs
- WindowsListViewItem.cs
- ConsoleCancelEventArgs.cs
- ComboBox.cs
- ButtonBaseAutomationPeer.cs
- XmlSerializerVersionAttribute.cs
- BitmapEffectOutputConnector.cs
- ConsumerConnectionPointCollection.cs
- ExpressionPrinter.cs
- LoginCancelEventArgs.cs
- FileNameEditor.cs
- SoapProtocolImporter.cs
- XmlAnyElementAttribute.cs
- BaseConfigurationRecord.cs
- Soap12ProtocolImporter.cs
- Publisher.cs
- AsymmetricKeyExchangeDeformatter.cs
- _LazyAsyncResult.cs
- SimplePropertyEntry.cs
- ButtonField.cs
- ImageSource.cs
- InstanceCollisionException.cs
- DataGridViewControlCollection.cs
- TextEditorSelection.cs
- MetaModel.cs
- metadatamappinghashervisitor.hashsourcebuilder.cs
- SqlFlattener.cs
- SqlUtils.cs
- RequestCacheEntry.cs
- SmiContextFactory.cs
- UniqueConstraint.cs
- GenerateTemporaryTargetAssembly.cs
- ContextBase.cs
- ServicesExceptionNotHandledEventArgs.cs
- GuidConverter.cs
- IApplicationTrustManager.cs
- CodeDefaultValueExpression.cs
- KnownTypesHelper.cs