Freigeben über


CodeDomDocDataAdapter Class

Maintains a cached CodeTypeDeclaration that objects may use to access the code DOM indirectly. Since multiple objects may be working on the code DOM tree for the design surface at a given time, they could overwrite each other's changes if they all accessed the code DOM tree directly. In addition, this class has several properties that expose the CodeDomProvider, and contains a reference to the actual DocData object.

This API is not CLS-compliant. The CLS-compliant alternative is [None].

Inheritance Hierarchy

Object
  Microsoft.VisualStudio.Shell.Design.Serialization.CodeDom.CodeDomDocDataAdapter

Namespace:  Microsoft.VisualStudio.Shell.Design.Serialization.CodeDom
Assembly:  Microsoft.VisualStudio.Shell.Design (in Microsoft.VisualStudio.Shell.Design.dll)

Syntax

'Declaration
<CLSCompliantAttribute(False)> _
Public Class CodeDomDocDataAdapter _
    Implements IDisposable
[CLSCompliantAttribute(false)]
public class CodeDomDocDataAdapter : IDisposable
[CLSCompliantAttribute(false)]
public ref class CodeDomDocDataAdapter : IDisposable
[<CLSCompliantAttribute(false)>]
type CodeDomDocDataAdapter =  
    class 
        interface IDisposable 
    end
public class CodeDomDocDataAdapter implements IDisposable

The CodeDomDocDataAdapter type exposes the following members.

Constructors

  Name Description
Public method CodeDomDocDataAdapter Initializes a new instance of CodeDomDocDataAdapter for the specified DocData object.

Top

Properties

  Name Description
Public property CompileUnit Gets the entire compile unit in which the document data exists.
Public property DocData Gets the associated document data.
Public property Generator Gets a cached code generator that may be used to validate identifiers and generate code.
Protected property Parser Gets the code parser.
Public property Provider Gets the code DOM provider for the file.
Public property TypeDeclaration Gets the code type declaration for this document.
Public property TypeNamespace Gets the code namespace for this document.

Top

Methods

  Name Description
Public method Dispose() Disposes this object.
Protected method Dispose(Boolean) Disposes the resources of this object.
Public method Equals Determines whether the specified object is equal to the current object. (Inherited from Object.)
Protected method Finalize Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.)
Public method Generate Takes the current type declaration and generates it into the doc data.
Public method GetHashCode Serves as the default hash function. (Inherited from Object.)
Protected method GetService Gets the service of the specified type.
Public method GetType Gets the Type of the current instance. (Inherited from Object.)
Protected method MemberwiseClone Creates a shallow copy of the current Object. (Inherited from Object.)
Protected method OnCodeDomChanged Called when the code has changed externally.
Public method ToString Returns a string that represents the current object. (Inherited from Object.)

Top

Events

  Name Description
Public event CodeDomChanged This event is raised when an external party has made a change to the code file that would cause the code DOM to need rebuilding.

Top

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

See Also

Reference

Microsoft.VisualStudio.Shell.Design.Serialization.CodeDom Namespace