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
- KnownColorTable.cs
- XmlILStorageConverter.cs
- UIInitializationException.cs
- BinaryFormatter.cs
- DEREncoding.cs
- CompilerState.cs
- SettingsAttributes.cs
- loginstatus.cs
- TcpChannelHelper.cs
- ConfigXmlText.cs
- HttpHandlersSection.cs
- TripleDES.cs
- HtmlInputText.cs
- CryptoApi.cs
- ResXResourceReader.cs
- ReadOnlyDictionary.cs
- MailBnfHelper.cs
- ValidationErrorCollection.cs
- GeometryModel3D.cs
- figurelength.cs
- _AutoWebProxyScriptHelper.cs
- Point3D.cs
- RadialGradientBrush.cs
- ChildrenQuery.cs
- NativeMethodsOther.cs
- CompiledXpathExpr.cs
- SqlDataSourceCache.cs
- ProtocolElementCollection.cs
- BindingContext.cs
- PackageStore.cs
- MatrixAnimationUsingPath.cs
- PrivilegeNotHeldException.cs
- DbConnectionPool.cs
- KeyedHashAlgorithm.cs
- MemberInfoSerializationHolder.cs
- IPCCacheManager.cs
- DetailsViewCommandEventArgs.cs
- ISAPIApplicationHost.cs
- XamlReaderConstants.cs
- HoistedLocals.cs
- XmlPreloadedResolver.cs
- StylusPointPropertyInfo.cs
- Visual3DCollection.cs
- WorkflowMarkupSerializationManager.cs
- SqlDataSourceQuery.cs
- EntityObject.cs
- Configuration.cs
- DataBindingList.cs
- Panel.cs
- Margins.cs
- Lasso.cs
- Grant.cs
- ContextDataSourceView.cs
- Confirm.cs
- EntitySet.cs
- PingReply.cs
- HttpBindingExtension.cs
- ToolStripComboBox.cs
- XmlDocument.cs
- XomlCompilerResults.cs
- BitmapEffectOutputConnector.cs
- DbConnectionPoolGroup.cs
- CodeIndexerExpression.cs
- COM2PictureConverter.cs
- DictionarySurrogate.cs
- ChannelPool.cs
- RouteParametersHelper.cs
- StyleXamlTreeBuilder.cs
- NonParentingControl.cs
- ToolStripItemClickedEventArgs.cs
- SemaphoreFullException.cs
- MouseGestureValueSerializer.cs
- TransactionContext.cs
- ReadingWritingEntityEventArgs.cs
- _SslState.cs
- IChannel.cs
- TrustSection.cs
- SizeF.cs
- GridViewCancelEditEventArgs.cs
- Walker.cs
- CompiledXpathExpr.cs
- EntityDataSourceViewSchema.cs
- VBIdentifierNameEditor.cs
- cookieexception.cs
- TextBlockAutomationPeer.cs
- XmlBinaryWriter.cs
- SmiTypedGetterSetter.cs
- FilePresentation.cs
- HtmlToClrEventProxy.cs
- XmlWriterTraceListener.cs
- OutputCacheProviderCollection.cs
- ProxyBuilder.cs
- DocumentApplicationJournalEntryEventArgs.cs
- ErrorEventArgs.cs
- PointAnimationUsingPath.cs
- Options.cs
- WindowsSpinner.cs
- CodeAttributeArgument.cs
- JsonReaderWriterFactory.cs
- SmiRequestExecutor.cs