Code:
/ DotNET / DotNET / 8.0 / untmp / whidbey / REDBITS / ndp / fx / src / CompMod / System / CodeDOM / CodeNamespace.cs / 1 / CodeNamespace.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- namespace System.CodeDom { using System.Diagnostics; using System; using Microsoft.Win32; using System.Collections; using System.Runtime.Serialization; using System.Runtime.InteropServices; ////// [ ClassInterface(ClassInterfaceType.AutoDispatch), ComVisible(true), Serializable, ] public class CodeNamespace: CodeObject { private string name; private CodeNamespaceImportCollection imports = new CodeNamespaceImportCollection(); private CodeCommentStatementCollection comments = new CodeCommentStatementCollection(); private CodeTypeDeclarationCollection classes = new CodeTypeDeclarationCollection(); private CodeNamespaceCollection namespaces = new CodeNamespaceCollection(); private int populated = 0x0; private const int ImportsCollection = 0x1; private const int CommentsCollection = 0x2; private const int TypesCollection = 0x4; #if CODEDOM_NESTED_NAMESPACES private const int NamespacesCollection = 0x8; #endif ////// Represents a /// namespace declaration. /// ////// public event EventHandler PopulateComments; ////// An event that will be fired the first time the Comments Collection is accessed. /// ////// public event EventHandler PopulateImports; #if CODEDOM_NESTED_NAMESPACES ////// An event that will be fired the first time the Imports Collection is accessed. /// ////// public event EventHandler PopulateNamespaces; #endif ////// An event that will be fired the first time the Namespaces Collection is accessed. /// ////// public event EventHandler PopulateTypes; ////// An event that will be fired the first time the Types Collection is accessed. /// ////// public CodeNamespace() { } ////// Initializes a new instance of ///. /// /// public CodeNamespace(string name) { Name = name; } private CodeNamespace(SerializationInfo info, StreamingContext context) { } ////// Initializes a new instance of ///using the specified name. /// /// public CodeTypeDeclarationCollection Types { get { if (0 == (populated & TypesCollection)) { populated |= TypesCollection; if (PopulateTypes != null) PopulateTypes(this, EventArgs.Empty); } return classes; } } ////// Gets or sets the collection of classes. /// ////// public CodeNamespaceImportCollection Imports { get { if (0 == (populated & ImportsCollection)) { populated |= ImportsCollection; if (PopulateImports != null) PopulateImports(this, EventArgs.Empty); } return imports; } } ////// Gets or sets the collection of namespace imports used by the represented /// namespace. /// ////// public string Name { get { return (name == null) ? string.Empty : name; } set { name = value; } } #if CODEDOM_NESTED_NAMESPACES ////// Gets or sets the name of the namespace. /// ////// public CodeNamespaceCollection Namespaces { get { if (0 == (populated & NamespacesCollection)) { populated |= NamespacesCollection; if (PopulateNamespaces != null) PopulateNamespaces(this, EventArgs.Empty); } return namespaces; } } #endif ////// Gets or sets the collection of Namespaces. /// ////// public CodeCommentStatementCollection Comments { get { if (0 == (populated & CommentsCollection)) { populated |= CommentsCollection; if (PopulateComments != null) PopulateComments(this, EventArgs.Empty); } return comments; } } } }/// Gets or sets the member comment collection members. /// ///
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- DbDeleteCommandTree.cs
- FlowDocumentReaderAutomationPeer.cs
- ToolStripLocationCancelEventArgs.cs
- SliderAutomationPeer.cs
- DataGridViewCellEventArgs.cs
- cookiecollection.cs
- WebPartCatalogCloseVerb.cs
- DbDataAdapter.cs
- SchemaImporterExtensionElementCollection.cs
- XamlGridLengthSerializer.cs
- LayoutTableCell.cs
- ModelServiceImpl.cs
- Bidi.cs
- FreezableDefaultValueFactory.cs
- XmlElement.cs
- Grid.cs
- ToolStripProfessionalLowResolutionRenderer.cs
- AspCompat.cs
- CursorEditor.cs
- WorkflowApplicationEventArgs.cs
- KeyManager.cs
- safex509handles.cs
- HandlerMappingMemo.cs
- DataObjectMethodAttribute.cs
- MatchSingleFxEngineOpcode.cs
- Compiler.cs
- OrderByBuilder.cs
- QuestionEventArgs.cs
- WrapPanel.cs
- SelectionProviderWrapper.cs
- SynchronizedRandom.cs
- WindowsSysHeader.cs
- BoundsDrawingContextWalker.cs
- DrawingVisual.cs
- PlatformNotSupportedException.cs
- InplaceBitmapMetadataWriter.cs
- UnsafeNativeMethods.cs
- InputMethodStateTypeInfo.cs
- MultiPageTextView.cs
- Condition.cs
- StringSorter.cs
- Stylesheet.cs
- BamlTreeUpdater.cs
- ListViewItem.cs
- IconConverter.cs
- Pkcs7Recipient.cs
- TextParagraphProperties.cs
- VirtualizedContainerService.cs
- DataStorage.cs
- JavaScriptObjectDeserializer.cs
- Triangle.cs
- Application.cs
- MouseGestureValueSerializer.cs
- Vector3DConverter.cs
- SinglePageViewer.cs
- Compiler.cs
- AffineTransform3D.cs
- GenericTextProperties.cs
- InternalTypeHelper.cs
- MemberRelationshipService.cs
- Event.cs
- SocketSettings.cs
- SQLGuidStorage.cs
- UnsafeNativeMethods.cs
- CharacterShapingProperties.cs
- CompoundFileStreamReference.cs
- ElementHostAutomationPeer.cs
- ListParaClient.cs
- OleDbConnection.cs
- TextTreeUndo.cs
- DataTableNewRowEvent.cs
- MethodSignatureGenerator.cs
- DbProviderFactory.cs
- WorkflowOperationBehavior.cs
- OutputScope.cs
- ObjectListDesigner.cs
- FreezableDefaultValueFactory.cs
- RequiredAttributeAttribute.cs
- TreeViewImageKeyConverter.cs
- EventProvider.cs
- ValueTable.cs
- Win32NamedPipes.cs
- RectAnimationUsingKeyFrames.cs
- FunctionNode.cs
- PrintDocument.cs
- EntityConnection.cs
- WindowsScroll.cs
- CharacterString.cs
- ParsedAttributeCollection.cs
- WebPartEditorOkVerb.cs
- TransformerTypeCollection.cs
- MemoryStream.cs
- TableLayoutStyleCollection.cs
- EntityContainerRelationshipSet.cs
- ClosureBinding.cs
- Site.cs
- TypeDescriptionProvider.cs
- DefaultValueTypeConverter.cs
- _AutoWebProxyScriptHelper.cs
- RootContext.cs