Initialize() публичный статический Метод

Initialize a assembly resolver
public static Initialize ( ) : void
Результат void
Пример #1
0
 /// <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);
            }
        }