static SassCompiler() { SassInfo = new VersionInfo { LibSassNetVersion = typeof(SassCompiler).Assembly.GetName().Version.ToString(), LibSassVersion = SassSafeContextHandle.LibsassVersion(), SassLanguageVersion = SassSafeContextHandle.SassLanguageVersion() }; }
/// <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); }
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)); }
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)); }
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)); }
internal static extern IntPtr sass_context_get_error_text(SassSafeContextHandle @context);
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)); }
internal static extern int sass_context_get_error_status(SassSafeContextHandle @context);
internal static extern IntPtr sass_context_get_output_string(SassSafeContextHandle @context);
internal static extern IntPtr sass_context_get_options(SassSafeContextHandle @context);
internal static extern IntPtr sass_context_get_included_files(SassSafeContextHandle @context);
internal static extern IntPtr sass_context_get_source_map_string(SassSafeContextHandle @context);