src/Misc/EFTools/DesignXmlCore/Common/VsTextBufferFactory.cs
/// <summary>
///     Instantiates and sites a new VsTextBuffer.
/// </summary>
Instantiates and sites a new VsTextBuffer.
Instantiates and sites a new VsTextBuffer .
internal static T CreateInstance<T>(IServiceProvider serviceProvider, ILocalRegistry localRegistry) where T : IVsTextBuffer
        {
            ArgumentValidation.CheckForNullReference(serviceProvider, "serviceProvider");
            ArgumentValidation.CheckForNullReference(localRegistry, "localRegistry");
            var obj = CreateObject<T>(localRegistry);
            var objectWithSite = obj as IObjectWithSite;
            if (objectWithSite != null)
            {
                objectWithSite.SetSite(serviceProvider);
            }
            return obj;
        }
internal static T CreateInstance < T > ( IServiceProvider serviceProvider , ILocalRegistry localRegistry ) where T : IVsTextBuffer { ArgumentValidation . CheckForNullReference ( serviceProvider , " " ) ; ArgumentValidation . CheckForNullReference ( localRegistry , " " ) ; var obj = CreateObject < T > ( localRegistry ) ; var objectWithSite = obj as IObjectWithSite ; if ( objectWithSite != null ) { objectWithSite . SetSite ( serviceProvider ) ; } return obj ; }
Instantiates and sites a new VsTextBuffer.
Instantiates and sites a new VsTextBuffer .
serviceProvider
IServiceProvider
localRegistry
ILocalRegistry