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
- SqlProcedureAttribute.cs
- RemoteWebConfigurationHost.cs
- SettingsBase.cs
- GetTokenRequest.cs
- ElementFactory.cs
- HybridDictionary.cs
- RouteParser.cs
- ModifyActivitiesPropertyDescriptor.cs
- DataServiceQueryProvider.cs
- StyleBamlRecordReader.cs
- Context.cs
- ConfigurationManager.cs
- FixedSOMSemanticBox.cs
- DnsEndPoint.cs
- WorkflowItemPresenter.cs
- XappLauncher.cs
- LongValidatorAttribute.cs
- HeaderFilter.cs
- StylusPointPropertyUnit.cs
- HttpModulesInstallComponent.cs
- TickBar.cs
- DataGridCommandEventArgs.cs
- BamlResourceContent.cs
- StorageEntityContainerMapping.cs
- Baml2006KeyRecord.cs
- SafeBitVector32.cs
- Renderer.cs
- UnrecognizedPolicyAssertionElement.cs
- SqlReferenceCollection.cs
- SqlDataSourceParameterParser.cs
- AnnotationComponentManager.cs
- dataprotectionpermissionattribute.cs
- ParallelTimeline.cs
- MarginCollapsingState.cs
- WebPartEditorOkVerb.cs
- HttpsTransportElement.cs
- RemotingConfigParser.cs
- MulticastDelegate.cs
- ObjectDataSource.cs
- BindingMemberInfo.cs
- XmlChoiceIdentifierAttribute.cs
- AnnotationResourceChangedEventArgs.cs
- CodeThrowExceptionStatement.cs
- SecurityContext.cs
- WindowsIPAddress.cs
- FrameworkContentElementAutomationPeer.cs
- ClientFormsAuthenticationCredentials.cs
- ZipIOBlockManager.cs
- PointConverter.cs
- ISFTagAndGuidCache.cs
- TypeUnloadedException.cs
- DataConnectionHelper.cs
- CustomWebEventKey.cs
- TextRange.cs
- FixUpCollection.cs
- Encoder.cs
- OrderPreservingMergeHelper.cs
- ParseChildrenAsPropertiesAttribute.cs
- columnmapkeybuilder.cs
- TextDocumentView.cs
- BindingNavigatorDesigner.cs
- Instrumentation.cs
- PersonalizationProvider.cs
- TemplateBindingExtensionConverter.cs
- FaultConverter.cs
- SystemFonts.cs
- StatusBarPanel.cs
- DataObject.cs
- EnumUnknown.cs
- PeerTransportListenAddressConverter.cs
- BasicViewGenerator.cs
- SmiGettersStream.cs
- ViewGenerator.cs
- XmlDownloadManager.cs
- MemoryPressure.cs
- TemplateColumn.cs
- SoapFault.cs
- InputBuffer.cs
- UnsafeNativeMethods.cs
- TableItemPattern.cs
- TransportElement.cs
- DataGridViewCellParsingEventArgs.cs
- RefreshEventArgs.cs
- HostedElements.cs
- DictionarySectionHandler.cs
- DrawToolTipEventArgs.cs
- SymbolType.cs
- MemberProjectedSlot.cs
- DbException.cs
- PhonemeEventArgs.cs
- Enum.cs
- TypeDependencyAttribute.cs
- Marshal.cs
- WinEventTracker.cs
- Convert.cs
- TableRow.cs
- SecurityProtocolFactory.cs
- PropagatorResult.cs
- SimpleTypesSurrogate.cs
- WebPartEventArgs.cs