Partager via


DesignerDocDataService.GetChildDocData Method

Gets a DocData with the given name.

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

Syntax

'Declaration
Public Function GetChildDocData ( _
    name As String, _
    access As FileAccess, _
    createTemplate As String _
) As DocData
public DocData GetChildDocData(
    string name,
    FileAccess access,
    string createTemplate
)
public:
DocData^ GetChildDocData(
    String^ name, 
    FileAccess access, 
    String^ createTemplate
)
member GetChildDocData : 
        name:string * 
        access:FileAccess * 
        createTemplate:string -> DocData
public function GetChildDocData(
    name : String, 
    access : FileAccess, 
    createTemplate : String
) : DocData

Parameters

  • name
    Type: String

    The name of the requested child document.

  • access
    Type: FileAccess

    A FileAccess value that describes the access level of the file.

  • createTemplate
    Type: String

    The path of a template file to be used in case the named document cannot be retrieved.

Return Value

Type: Microsoft.VisualStudio.Shell.Design.Serialization.DocData
DocData , or nulla null reference (Nothing in Visual Basic) if the file does not exist and createTemplate is nulla null reference (Nothing in Visual Basic).

Remarks

If the file does not exist and createTemplate points to a valid file, the file will be created from the template. The file will be checked out from source code control if F:System.IO.FileAccess.Write is requested.

The service keeps track of all document data objects returned and disposes of them automatically when the service itself is disposed. Because of this, files are saved as a unit, so usually there is no need to dispose this doc data yourself.

.NET Framework Security

See Also

Reference

DesignerDocDataService Class

Microsoft.VisualStudio.Shell.Design.Serialization Namespace