Code:
/ FX-1434 / FX-1434 / 1.0 / untmp / whidbey / REDBITS / 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); } } }
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- DataGridViewRowCollection.cs
- OrderingQueryOperator.cs
- GradientStopCollection.cs
- ResourceWriter.cs
- DataGridViewToolTip.cs
- ServerType.cs
- GroupItem.cs
- ElementMarkupObject.cs
- CancelEventArgs.cs
- WindowsScroll.cs
- PageAsyncTaskManager.cs
- LayoutEditorPart.cs
- PauseStoryboard.cs
- StringReader.cs
- WebPartTransformerAttribute.cs
- TextEvent.cs
- FixedTextBuilder.cs
- _ChunkParse.cs
- OrderPreservingMergeHelper.cs
- LeftCellWrapper.cs
- DataGridDesigner.cs
- TableItemStyle.cs
- Table.cs
- panel.cs
- UrlMappingsModule.cs
- FilterEventArgs.cs
- ObjectParameterCollection.cs
- SimpleBitVector32.cs
- ContextBase.cs
- DrawingCollection.cs
- SoapHeaders.cs
- DataServiceHost.cs
- SpellerStatusTable.cs
- RSAPKCS1KeyExchangeFormatter.cs
- AssemblyCollection.cs
- SchemaElement.cs
- SpecialFolderEnumConverter.cs
- HashMembershipCondition.cs
- ZipIOEndOfCentralDirectoryBlock.cs
- ExpandSegment.cs
- WebBaseEventKeyComparer.cs
- WhereQueryOperator.cs
- DownloadProgressEventArgs.cs
- SchemaMerger.cs
- BaseValidator.cs
- Table.cs
- String.cs
- HashFinalRequest.cs
- CodeExporter.cs
- OutputCacheProfile.cs
- SmiTypedGetterSetter.cs
- ZipPackage.cs
- AsyncDataRequest.cs
- EmbossBitmapEffect.cs
- TheQuery.cs
- SaveFileDialog.cs
- ComplexPropertyEntry.cs
- UDPClient.cs
- FullTextBreakpoint.cs
- RelationshipManager.cs
- WebPartCloseVerb.cs
- NeutralResourcesLanguageAttribute.cs
- DispatcherExceptionFilterEventArgs.cs
- LogArchiveSnapshot.cs
- ByteStorage.cs
- Mappings.cs
- returneventsaver.cs
- CustomWebEventKey.cs
- CodeTypeDeclarationCollection.cs
- TextTreeInsertUndoUnit.cs
- ListenerElementsCollection.cs
- PrimitiveType.cs
- Command.cs
- CommandValueSerializer.cs
- ServiceReference.cs
- StateBag.cs
- EntityContainerEntitySet.cs
- EditBehavior.cs
- SoapAttributes.cs
- NativeMethods.cs
- _TLSstream.cs
- EntityException.cs
- DiagnosticSection.cs
- PagesChangedEventArgs.cs
- EventSinkHelperWriter.cs
- SchemaTableOptionalColumn.cs
- ITreeGenerator.cs
- XPathNavigatorReader.cs
- TemplatedMailWebEventProvider.cs
- ChannelAcceptor.cs
- SoapProtocolReflector.cs
- HttpBindingExtension.cs
- DocumentNUp.cs
- LineServicesCallbacks.cs
- ToolConsole.cs
- WebServiceEnumData.cs
- ComboBoxAutomationPeer.cs
- SendKeys.cs
- SettingsPropertyValueCollection.cs
- TableLayoutPanel.cs