예제 #1
0
 static SassCompiler()
 {
     SassInfo = new VersionInfo
     {
         LibSassNetVersion   = typeof(SassCompiler).Assembly.GetName().Version.ToString(),
         LibSassVersion      = SassSafeContextHandle.LibsassVersion(),
         SassLanguageVersion = SassSafeContextHandle.SassLanguageVersion()
     };
 }
예제 #2
0
        /// <summary>
        /// Provides an instance of LibSass wrapper class.
        /// </summary>
        /// <param name="sassOptions">Sass options object for compilation.</param>
        /// <remarks>
        /// Replicates LibSass behaviour for context resolution, that is;
        /// if data is provided, make data context and set input file as
        /// supplementary option. Otherwise make a file context.
        /// </remarks>
        public SassCompiler(ISassOptions sassOptions)
        {
            if (string.IsNullOrEmpty(sassOptions.Data))
            {
                _internalContext = new SassSafeFileContextHandle(sassOptions);
            }
            else
            {
                _internalContext = new SassSafeDataContextHandle(sassOptions);
            }

            _internalContext.SetOptions(sassOptions);
        }
예제 #3
0
 internal static IntPtr sass_context_get_included_files(SassSafeContextHandle @context)
 {
     return(IntPtr.Size == 4
         ? SassExterns32.sass_context_get_included_files(@context)
         : SassExterns64.sass_context_get_included_files(@context));
 }
예제 #4
0
 internal static int sass_context_get_error_column(SassSafeContextHandle @context)
 {
     return(IntPtr.Size == 4
         ? SassExterns32.sass_context_get_error_column(@context)
         : SassExterns64.sass_context_get_error_column(@context));
 }
예제 #5
0
 internal static IntPtr sass_context_get_source_map_string(SassSafeContextHandle @context)
 {
     return(IntPtr.Size == 4
         ? SassExterns32.sass_context_get_source_map_string(@context)
         : SassExterns64.sass_context_get_source_map_string(@context));
 }
예제 #6
0
 internal static extern IntPtr sass_context_get_error_text(SassSafeContextHandle @context);
예제 #7
0
 internal static IntPtr sass_context_get_error_message(SassSafeContextHandle @context)
 {
     return(IntPtr.Size == 4
         ? SassExterns32.sass_context_get_error_message(@context)
         : SassExterns64.sass_context_get_error_message(@context));
 }
예제 #8
0
 internal static extern int sass_context_get_error_status(SassSafeContextHandle @context);
예제 #9
0
 internal static extern IntPtr sass_context_get_output_string(SassSafeContextHandle @context);
예제 #10
0
 internal static extern IntPtr sass_context_get_options(SassSafeContextHandle @context);
예제 #11
0
 internal static extern IntPtr sass_context_get_included_files(SassSafeContextHandle @context);
예제 #12
0
 internal static extern IntPtr sass_context_get_source_map_string(SassSafeContextHandle @context);