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
- FixedStringLookup.cs
- FrameworkTextComposition.cs
- EntityProviderFactory.cs
- Stroke.cs
- DataControlFieldHeaderCell.cs
- FileChangesMonitor.cs
- UInt16Storage.cs
- SupportsEventValidationAttribute.cs
- ScrollBarRenderer.cs
- UserControl.cs
- DataGridCellInfo.cs
- XmlDocumentSerializer.cs
- UrlParameterReader.cs
- CallbackValidator.cs
- HttpApplication.cs
- PointLight.cs
- FrameAutomationPeer.cs
- DiscoveryInnerClientAdhoc11.cs
- BamlVersionHeader.cs
- SqlGenerator.cs
- LogLogRecord.cs
- DefinitionProperties.cs
- OracleDateTime.cs
- ProtectedConfiguration.cs
- DbConvert.cs
- Message.cs
- WindowsFormsSynchronizationContext.cs
- PrintPreviewControl.cs
- ExtendedPropertyCollection.cs
- WsrmTraceRecord.cs
- PackWebRequestFactory.cs
- Int32RectValueSerializer.cs
- JumpItem.cs
- SecUtil.cs
- DataListItem.cs
- arabicshape.cs
- IdleTimeoutMonitor.cs
- UnauthorizedWebPart.cs
- RegexReplacement.cs
- WebPartCatalogAddVerb.cs
- InsufficientMemoryException.cs
- DataSourceSelectArguments.cs
- HtmlTableRowCollection.cs
- BufferModeSettings.cs
- SafeNativeMethods.cs
- WebPartConnectionsEventArgs.cs
- SqlUserDefinedTypeAttribute.cs
- RightsManagementEncryptionTransform.cs
- ToolStripSplitButton.cs
- ContextQuery.cs
- GPRECT.cs
- DefaultCommandConverter.cs
- ProtectedConfigurationProviderCollection.cs
- TextParagraphView.cs
- TreeViewTemplateSelector.cs
- CroppedBitmap.cs
- TableLayoutPanelBehavior.cs
- Compiler.cs
- DataViewSettingCollection.cs
- ProcessManager.cs
- UdpSocketReceiveManager.cs
- DbConnectionPoolOptions.cs
- EnumValidator.cs
- TypeListConverter.cs
- SmtpLoginAuthenticationModule.cs
- RuntimeWrappedException.cs
- BitmapEffectDrawing.cs
- BitmapSizeOptions.cs
- SqlRecordBuffer.cs
- Table.cs
- PageContentCollection.cs
- XmlSchemaAttribute.cs
- DataSourceConverter.cs
- Converter.cs
- CharConverter.cs
- NetDataContractSerializer.cs
- TextWriterEngine.cs
- ACL.cs
- WindowsAuthenticationModule.cs
- LocalFileSettingsProvider.cs
- CopyAttributesAction.cs
- ScriptingScriptResourceHandlerSection.cs
- PersonalizationProviderCollection.cs
- AspNetRouteServiceHttpHandler.cs
- BaseCollection.cs
- BaseResourcesBuildProvider.cs
- SecurityDocument.cs
- PeerCustomResolverBindingElement.cs
- ConditionalWeakTable.cs
- OracleMonthSpan.cs
- MachineKeySection.cs
- UIElementParaClient.cs
- FormViewPagerRow.cs
- AttachedPropertyBrowsableForChildrenAttribute.cs
- PointCollection.cs
- SchemaNotation.cs
- ToolStripRendererSwitcher.cs
- CurrentChangingEventManager.cs
- ProcessProtocolHandler.cs
- DataException.cs