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
- GraphicsContainer.cs
- DispatcherHooks.cs
- ScrollProviderWrapper.cs
- HtmlInputFile.cs
- EntityDataSourceUtil.cs
- Highlights.cs
- OleDbConnectionFactory.cs
- SelectionUIService.cs
- ResourceExpressionEditor.cs
- ServiceOperationWrapper.cs
- KeyTime.cs
- ConstructorNeedsTagAttribute.cs
- ParseNumbers.cs
- PropertyPushdownHelper.cs
- COSERVERINFO.cs
- HierarchicalDataSourceControl.cs
- TypeForwardedToAttribute.cs
- AsyncCompletedEventArgs.cs
- DataGridViewCellCollection.cs
- MatrixTransform.cs
- graph.cs
- CodeCommentStatement.cs
- DBConnection.cs
- FullTextBreakpoint.cs
- ButtonBaseAutomationPeer.cs
- Binding.cs
- RtfControlWordInfo.cs
- DynamicMetaObjectBinder.cs
- RSAPKCS1SignatureDeformatter.cs
- NumberFunctions.cs
- tooltip.cs
- GenericEnumerator.cs
- SchemaEntity.cs
- TransactionChannelFaultConverter.cs
- BitmapEffect.cs
- UIElement3D.cs
- ObjectListField.cs
- MultiView.cs
- JoinGraph.cs
- TouchFrameEventArgs.cs
- DbDataAdapter.cs
- StdValidatorsAndConverters.cs
- HMACSHA384.cs
- XmlSerializerAssemblyAttribute.cs
- ScriptModule.cs
- MultiView.cs
- PageThemeCodeDomTreeGenerator.cs
- TransactionFlowAttribute.cs
- QilBinary.cs
- WebPartConnectionsEventArgs.cs
- Identifier.cs
- GridViewAutomationPeer.cs
- SequentialActivityDesigner.cs
- XsdDuration.cs
- PasswordBoxAutomationPeer.cs
- ApplicationContext.cs
- RemotingConfigParser.cs
- ReadingWritingEntityEventArgs.cs
- BrowserCapabilitiesCompiler.cs
- Vector3dCollection.cs
- ThreadPoolTaskScheduler.cs
- ResourceProviderFactory.cs
- ToolStripDropDownClosingEventArgs.cs
- ProviderCommandInfoUtils.cs
- ProjectionCamera.cs
- DBSchemaTable.cs
- MenuBase.cs
- RubberbandSelector.cs
- autovalidator.cs
- EdmType.cs
- HttpCookiesSection.cs
- SecurityElement.cs
- Grid.cs
- TextTreeTextNode.cs
- FormViewRow.cs
- DefaultValueMapping.cs
- DataObjectFieldAttribute.cs
- UnsafeNativeMethods.cs
- LinqDataSourceContextEventArgs.cs
- ReflectionHelper.cs
- ObjectRef.cs
- PieceNameHelper.cs
- EdmFunctionAttribute.cs
- PrivilegedConfigurationManager.cs
- ExtentCqlBlock.cs
- BatchWriter.cs
- OdbcInfoMessageEvent.cs
- ConfigXmlDocument.cs
- ZipPackage.cs
- DrawingContextDrawingContextWalker.cs
- BaseValidatorDesigner.cs
- UshortList2.cs
- Keyboard.cs
- MonitorWrapper.cs
- TextSelectionHighlightLayer.cs
- AppSettingsSection.cs
- EntityDataSourceQueryBuilder.cs
- ControlParser.cs
- MaskedTextProvider.cs
- XmlSequenceWriter.cs