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
- MbpInfo.cs
- MessagePropertyDescriptionCollection.cs
- TextBoxLine.cs
- SqlServer2KCompatibilityCheck.cs
- SimpleWorkerRequest.cs
- DataGridViewTextBoxEditingControl.cs
- RepeaterCommandEventArgs.cs
- SchemaDeclBase.cs
- TransformGroup.cs
- PermissionAttributes.cs
- ScrollContentPresenter.cs
- TextTreeInsertUndoUnit.cs
- XmlUTF8TextReader.cs
- MenuItemStyleCollection.cs
- WCFBuildProvider.cs
- LongTypeConverter.cs
- BeginGetFileNameFromUserRequest.cs
- CodeMethodReturnStatement.cs
- TransformerInfo.cs
- SqlDataSourceSelectingEventArgs.cs
- ActivityMarkupSerializationProvider.cs
- TextEditorTables.cs
- HtmlImage.cs
- DataGridViewTextBoxColumn.cs
- ObjectDesignerDataSourceView.cs
- UpdateCompiler.cs
- GraphicsContext.cs
- IntranetCredentialPolicy.cs
- wmiprovider.cs
- LambdaCompiler.Lambda.cs
- TableRowCollection.cs
- ObjectCloneHelper.cs
- HuffCodec.cs
- ObjectDataSourceWizardForm.cs
- StringWriter.cs
- ReferencedCategoriesDocument.cs
- DependencyObjectPropertyDescriptor.cs
- XmlUtil.cs
- TreeBuilder.cs
- XmlSerializationGeneratedCode.cs
- WSIdentityFaultException.cs
- XmlSchemaAnyAttribute.cs
- SystemIPv4InterfaceProperties.cs
- StringSorter.cs
- ValueConversionAttribute.cs
- HttpWebResponse.cs
- TimeoutException.cs
- UnsignedPublishLicense.cs
- ProcessHostConfigUtils.cs
- RegexReplacement.cs
- XmlFormatReaderGenerator.cs
- SpAudioStreamWrapper.cs
- RightsDocument.cs
- WebPartZoneCollection.cs
- MiniLockedBorderGlyph.cs
- Console.cs
- FileInfo.cs
- MediaPlayer.cs
- RegionInfo.cs
- AliasedExpr.cs
- CodeNamespace.cs
- ImageBrush.cs
- HtmlEmptyTagControlBuilder.cs
- ComponentResourceKey.cs
- StreamAsIStream.cs
- HttpConfigurationSystem.cs
- SettingsPropertyValueCollection.cs
- XmlCharType.cs
- StylusPlugInCollection.cs
- SqlExpressionNullability.cs
- PointLightBase.cs
- PropertySegmentSerializer.cs
- WebPartUtil.cs
- ColumnMapVisitor.cs
- httpapplicationstate.cs
- WpfSharedXamlSchemaContext.cs
- WindowsRegion.cs
- IteratorFilter.cs
- BooleanConverter.cs
- CapabilitiesState.cs
- CustomError.cs
- DefaultBinder.cs
- CodeIdentifiers.cs
- OperatingSystem.cs
- DialogWindow.cs
- ColorAnimationBase.cs
- WindowsFormsLinkLabel.cs
- Itemizer.cs
- UnauthorizedWebPart.cs
- UriTemplateLiteralPathSegment.cs
- XmlPreloadedResolver.cs
- NeedSkipTokenVisitor.cs
- DataRelationCollection.cs
- KnownTypesHelper.cs
- GenericAuthenticationEventArgs.cs
- Substitution.cs
- RowUpdatedEventArgs.cs
- TextAutomationPeer.cs
- CalendarItem.cs
- AssemblyName.cs