DocDataTextReader.IServiceProvider.GetService Method
Gets the service of the specified type.
Namespace: Microsoft.VisualStudio.Shell.Design.Serialization
Assembly: Microsoft.VisualStudio.Shell.Design (in Microsoft.VisualStudio.Shell.Design.dll)
Syntax
'Declaration
Private Function GetService ( _
serviceType As Type _
) As Object Implements IServiceProvider.GetService
Object IServiceProvider.GetService(
Type serviceType
)
private:
virtual Object^ GetService(
Type^ serviceType
) sealed = IServiceProvider::GetService
private abstract GetService :
serviceType:Type -> Object
private override GetService :
serviceType:Type -> Object
JScript does not support explicit interface implementations.
Parameters
serviceType
Type: System.TypeThe type of the service to be retrieved.
Return Value
Type: System.Object
The service object.
Implements
IServiceProvider.GetService(Type)
Remarks
This method allows objects receiving this DocDataTextReader to rediscover the original DocData it is associated with. We provide this ability because in many instances, redirecting through the System.IO classes doesn't allow enough fidelity. For example, using a text writer, the writer must write the entire file, rather than just the interesting portions. The following services are provided:
typeof(DocData)
typeof(EnvDte.TextDocument) // If DocData supports it.
.NET Framework Security
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.