Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / whidbey / netfxsp / 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
- CacheMode.cs
- ItemCollection.cs
- KeyFrames.cs
- TimerElapsedEvenArgs.cs
- OpCodes.cs
- RuleSettingsCollection.cs
- CornerRadiusConverter.cs
- PropertyGridView.cs
- MessageHeaderInfoTraceRecord.cs
- MembershipSection.cs
- IntPtr.cs
- FileClassifier.cs
- MetadataItem_Static.cs
- BamlVersionHeader.cs
- AddInControllerImpl.cs
- ToolStripDropDownClosingEventArgs.cs
- XpsDigitalSignature.cs
- ToolboxControl.cs
- SqlDataSourceFilteringEventArgs.cs
- MetadataSource.cs
- Image.cs
- DataGridViewCellCancelEventArgs.cs
- WebBrowser.cs
- SafeRightsManagementSessionHandle.cs
- ThemeDirectoryCompiler.cs
- Native.cs
- Sql8ConformanceChecker.cs
- QuaternionAnimation.cs
- WasNotInstalledException.cs
- RowToFieldTransformer.cs
- BmpBitmapEncoder.cs
- SplitterPanel.cs
- Span.cs
- ExpressionBinding.cs
- XmlDigitalSignatureProcessor.cs
- ContainerActivationHelper.cs
- FixedSOMLineRanges.cs
- PersonalizationProviderCollection.cs
- VBIdentifierNameEditor.cs
- OleDbConnectionInternal.cs
- ToolbarAUtomationPeer.cs
- Scene3D.cs
- ConstraintEnumerator.cs
- OracleConnection.cs
- CacheSection.cs
- RawUIStateInputReport.cs
- HtmlInputRadioButton.cs
- AnonymousIdentificationModule.cs
- FixedBufferAttribute.cs
- ClearTypeHintValidation.cs
- WebPartMenuStyle.cs
- GlyphingCache.cs
- SplitContainer.cs
- QilIterator.cs
- WriteTimeStream.cs
- AppDomainUnloadedException.cs
- ResourceDefaultValueAttribute.cs
- XmlSerializableWriter.cs
- Operand.cs
- UiaCoreProviderApi.cs
- CTreeGenerator.cs
- StateMachine.cs
- RegistrySecurity.cs
- SoapFault.cs
- DataGridHeaderBorder.cs
- RadioButtonRenderer.cs
- InstanceValue.cs
- TimeoutException.cs
- DataRelationPropertyDescriptor.cs
- OdbcUtils.cs
- Dictionary.cs
- TableCell.cs
- HtmlInputText.cs
- NGCUIElementCollectionSerializerAsync.cs
- PersonalizationDictionary.cs
- LogEntryHeaderDeserializer.cs
- RefreshEventArgs.cs
- KeyEvent.cs
- WsatStrings.cs
- SendMailErrorEventArgs.cs
- IDispatchConstantAttribute.cs
- DiscreteKeyFrames.cs
- DeviceContext.cs
- ParseChildrenAsPropertiesAttribute.cs
- CodePageUtils.cs
- RSAPKCS1SignatureFormatter.cs
- HMACSHA256.cs
- Hex.cs
- ElasticEase.cs
- DataTableReaderListener.cs
- BaseHashHelper.cs
- UIPropertyMetadata.cs
- FaultFormatter.cs
- Geometry.cs
- SimpleTableProvider.cs
- AdCreatedEventArgs.cs
- FlowLayout.cs
- CodeArgumentReferenceExpression.cs
- EntityContainerEmitter.cs
- UriExt.cs