Initialize() public static method

Initialize a assembly resolver
public static Initialize ( ) : void
return void
コード例 #1
0
ファイル: SassCompiler.cs プロジェクト: jnicholes/LibSassHost
 /// <summary>
 /// Static constructor
 /// </summary>
 /// <exception cref="SassCompilerLoadException">Failed to load a Sass-compiler.</exception>
 static SassCompiler()
 {
     if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
     {
         try
         {
             AssemblyResolver.Initialize();
         }
         catch (InvalidOperationException e)
         {
             throw SassErrorHelpers.WrapCompilerLoadException(e);
         }
     }
 }
コード例 #2
0
        /// <summary>
        /// Static constructor
        /// </summary>
        /// <exception cref="SassCompilerLoadException">Failed to load a Sass-compiler.</exception>
        static SassCompiler()
        {
#if !NETSTANDARD
            if (Utils.IsWindows())
            {
                AssemblyResolver.Initialize();
            }
#endif
            try
            {
                _version         = SassCompilerProxy.GetVersion();
                _languageVersion = SassCompilerProxy.GetLanguageVersion();
            }
            catch (DllNotFoundException e)
            {
                throw new SassCompilerLoadException(Strings.Runtime_SassCompilerNotLoaded, e);
            }
        }