Skip to content

Commit

Permalink
Fixed a error #14 “Unable to debug ASP.NET MVC project”
Browse files Browse the repository at this point in the history
  • Loading branch information
Taritsyn committed Mar 9, 2017
1 parent 6189d5d commit 8be4a1f
Show file tree
Hide file tree
Showing 5 changed files with 68 additions and 87 deletions.
13 changes: 1 addition & 12 deletions nuget/LibSassHost/LibSassHost.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -19,18 +19,7 @@ This package does not contain the native implementations of libSass. Therefore,
* LibSassHost.Native.debian-x64
* LibSassHost.Native.osx-x64</description>
<summary>.NET wrapper around the libSass with the ability to support a virtual file system.</summary>
<releaseNotes>1. Added support of .NET Core 1.0.3 and .NET Framework 4.5;
2. Native assemblies have been moved to separate packages: LibSassHost.Native.win-x86 and LibSassHost.Native.win-x64;
3. Now the libSass for Windows requires `msvcp140.dll` assembly from the Visual C++ Redistributable for Visual Studio 2015;
4. Added a packages, that contains a native assemblies for Debian-based Linux (x64) and OS X (x64);
5. `SassCompiler` class was converted to a static class;
6. In `SassCompiler` class was added two static properties: `Version` and `LanguageVersion`;
7. `IndentedSyntax` and `SourceMapFilePath` compilation options was converted into parameters of compilation methods;
8. `SassСompilationException` class was made serializable;
9. Added a two new exception classes: `SassException` and `SassCompilerLoadException`;
10. Now it is possible to use the Sass compiler without the file manager;
11. In `IFileManager` interface was added `SupportsConversionToAbsolutePath` property;
12. In `FileManager` class the `Current` property was renamed to `Instance`.</releaseNotes>
<releaseNotes>Fixed a error #14 “Unable to debug ASP.NET MVC project”.</releaseNotes>
<copyright>Copyright (c) 2015-2017 Andrey Taritsyn - http://www.taritsyn.ru</copyright>
<language>en-US</language>
<tags>libSass Sass SCSS CSS</tags>
Expand Down
20 changes: 1 addition & 19 deletions nuget/LibSassHost/readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -26,25 +26,7 @@
=============
RELEASE NOTES
=============
1. Added support of .NET Core 1.0.3 and .NET Framework 4.5;
2. Native assemblies have been moved to separate packages:
LibSassHost.Native.win-x86 and LibSassHost.Native.win-x64;
3. Now the libSass for Windows requires `msvcp140.dll` assembly from the Visual
C++ Redistributable for Visual Studio 2015;
4. Added a packages, that contains a native assemblies for Debian-based Linux
(x64) and OS X (x64);
5. `SassCompiler` class was converted to a static class;
6. In `SassCompiler` class was added two static properties: `Version` and
`LanguageVersion`;
7. `IndentedSyntax` and `SourceMapFilePath` compilation options was converted
into parameters of compilation methods;
8. `SassСompilationException` class was made serializable;
9. Added a two new exception classes: `SassException` and
`SassCompilerLoadException`;
10. Now it is possible to use the Sass compiler without the file manager;
11. In `IFileManager` interface was added `SupportsConversionToAbsolutePath`
property;
12. In `FileManager` class the `Current` property was renamed to `Instance`.
Fixed a error #14 “Unable to debug ASP.NET MVC project”.

============
PROJECT SITE
Expand Down
122 changes: 66 additions & 56 deletions src/LibSassHost/Internal/Native/Sass_Api.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,222 +11,232 @@ internal static class Sass_Api

#region Version information

[DllImport(DllName)]
[DllImport(DllName, CallingConvention = CallingConvention.Cdecl)]
internal static extern Utf8_String libsass_version();

[DllImport(DllName)]
[DllImport(DllName, CallingConvention = CallingConvention.Cdecl)]
internal static extern Utf8_String libsass_language_version();

#endregion

#region Create and initialize a specific context

[DllImport(DllName)]
[DllImport(DllName, CallingConvention = CallingConvention.Cdecl)]
internal static extern Sass_File_Context sass_make_file_context(Utf8_String input_path);

[DllImport(DllName)]
[DllImport(DllName, CallingConvention = CallingConvention.Cdecl)]
internal static extern Sass_Data_Context sass_make_data_context(Utf8_String source_string);

#endregion

#region Call the compilation step for the specific context

[DllImport(DllName)]
[DllImport(DllName, CallingConvention = CallingConvention.Cdecl)]
internal static extern int sass_compile_file_context(Sass_File_Context ctx);

[DllImport(DllName)]
[DllImport(DllName, CallingConvention = CallingConvention.Cdecl)]
internal static extern int sass_compile_data_context(Sass_Data_Context ctx);

#endregion

#region Release all memory allocated and also ourself

[DllImport(DllName)]
[DllImport(DllName, CallingConvention = CallingConvention.Cdecl)]
internal static extern void sass_delete_file_context(Sass_File_Context ctx);

[DllImport(DllName)]
[DllImport(DllName, CallingConvention = CallingConvention.Cdecl)]
internal static extern void sass_delete_data_context(Sass_Data_Context ctx);

#endregion

#region Getters for context from specific implementation

[DllImport(DllName)]
[DllImport(DllName, CallingConvention = CallingConvention.Cdecl)]
internal static extern Sass_Context sass_file_context_get_context(Sass_File_Context file_ctx);

[DllImport(DllName)]
[DllImport(DllName, CallingConvention = CallingConvention.Cdecl)]
internal static extern Sass_Context sass_data_context_get_context(Sass_Data_Context data_ctx);

#endregion

#region Getters for Sass_Options from Sass_Context

[DllImport(DllName)]
[DllImport(DllName, CallingConvention = CallingConvention.Cdecl)]
internal static extern Sass_Options sass_file_context_get_options(Sass_File_Context file_ctx);

[DllImport(DllName)]
[DllImport(DllName, CallingConvention = CallingConvention.Cdecl)]
internal static extern Sass_Options sass_data_context_get_options(Sass_Data_Context data_ctx);

#endregion

#region Setters for Sass_Options values

[DllImport(DllName)]
[DllImport(DllName, CallingConvention = CallingConvention.Cdecl)]
internal static extern void sass_option_set_precision(Sass_Options options, int precision);

[DllImport(DllName)]
[DllImport(DllName, CallingConvention = CallingConvention.Cdecl)]
internal static extern void sass_option_set_output_style(Sass_Options options,
Sass_Output_Style output_style);

[DllImport(DllName)]
[DllImport(DllName, CallingConvention = CallingConvention.Cdecl)]
internal static extern void sass_option_set_source_comments(Sass_Options options, bool source_comments);

[DllImport(DllName)]
[DllImport(DllName, CallingConvention = CallingConvention.Cdecl)]
internal static extern void sass_option_set_source_map_embed(Sass_Options options, bool source_map_embed);

[DllImport(DllName)]
[DllImport(DllName, CallingConvention = CallingConvention.Cdecl)]
internal static extern void sass_option_set_source_map_contents(Sass_Options options,
bool source_map_contents);

[DllImport(DllName)]
[DllImport(DllName, CallingConvention = CallingConvention.Cdecl)]
internal static extern void sass_option_set_source_map_file_urls(Sass_Options options,
bool source_map_file_urls);

[DllImport(DllName)]
[DllImport(DllName, CallingConvention = CallingConvention.Cdecl)]
internal static extern void sass_option_set_omit_source_map_url(Sass_Options options,
bool omit_source_map_url);

[DllImport(DllName)]
[DllImport(DllName, CallingConvention = CallingConvention.Cdecl)]
internal static extern void sass_option_set_is_indented_syntax_src(Sass_Options options,
bool is_indented_syntax_src);

[DllImport(DllName)]
[DllImport(DllName, CallingConvention = CallingConvention.Cdecl)]
internal static extern void sass_option_set_indent(Sass_Options options, Utf8_String indent);

[DllImport(DllName)]
[DllImport(DllName, CallingConvention = CallingConvention.Cdecl)]
internal static extern void sass_option_set_linefeed(Sass_Options options, Utf8_String linefeed);

[DllImport(DllName)]
[DllImport(DllName, CallingConvention = CallingConvention.Cdecl)]
internal static extern void sass_option_set_input_path(Sass_Options options, Utf8_String input_path);

[DllImport(DllName)]
[DllImport(DllName, CallingConvention = CallingConvention.Cdecl)]
internal static extern void sass_option_set_output_path(Sass_Options options, Utf8_String output_path);

[DllImport(DllName)]
[DllImport(DllName, CallingConvention = CallingConvention.Cdecl)]
internal static extern void sass_option_set_include_path(Sass_Options options, Utf8_String include_path);

[DllImport(DllName)]
[DllImport(DllName, CallingConvention = CallingConvention.Cdecl)]
internal static extern void sass_option_set_source_map_file(Sass_Options options,
Utf8_String source_map_file);

[DllImport(DllName)]
[DllImport(DllName, CallingConvention = CallingConvention.Cdecl)]
internal static extern void sass_option_set_source_map_root(Sass_Options options,
Utf8_String source_map_root);

#endregion

#region Getters for Sass_Context values

[DllImport(DllName)]
[DllImport(DllName, CallingConvention = CallingConvention.Cdecl)]
internal static extern Utf8_String sass_context_get_output_string(Sass_Context ctx);

[DllImport(DllName)]
[DllImport(DllName, CallingConvention = CallingConvention.Cdecl)]
internal static extern int sass_context_get_error_status(Sass_Context ctx);

[DllImport(DllName)]
[DllImport(DllName, CallingConvention = CallingConvention.Cdecl)]
internal static extern Utf8_String sass_context_get_error_text(Sass_Context ctx);

[DllImport(DllName)]
[DllImport(DllName, CallingConvention = CallingConvention.Cdecl)]
internal static extern Utf8_String sass_context_get_error_message(Sass_Context ctx);

[DllImport(DllName)]
[DllImport(DllName, CallingConvention = CallingConvention.Cdecl)]
internal static extern Utf8_String sass_context_get_error_file(Sass_Context ctx);

[DllImport(DllName)]
[DllImport(DllName, CallingConvention = CallingConvention.Cdecl)]
internal static extern Utf8_String sass_context_get_error_src(Sass_Context ctx);

[DllImport(DllName)]
[DllImport(DllName, CallingConvention = CallingConvention.Cdecl)]
internal static extern size_t sass_context_get_error_line(Sass_Context ctx);

[DllImport(DllName)]
[DllImport(DllName, CallingConvention = CallingConvention.Cdecl)]
internal static extern size_t sass_context_get_error_column(Sass_Context ctx);

[DllImport(DllName)]
[DllImport(DllName, CallingConvention = CallingConvention.Cdecl)]
internal static extern Utf8_String sass_context_get_source_map_string(Sass_Context ctx);

[DllImport(DllName)]
[DllImport(DllName, CallingConvention = CallingConvention.Cdecl)]
internal static extern Utf8_String_Array sass_context_get_included_files(Sass_Context ctx);

#endregion

#region Getters for File_Manager properties

[DllImport(DllName)]
[DllImport(DllName, CallingConvention = CallingConvention.Cdecl)]
internal static extern bool sass_file_manager_get_is_initialized();

[DllImport(DllName)]
[DllImport(DllName, CallingConvention = CallingConvention.Cdecl)]
internal static extern bool sass_file_manager_get_supports_conversion_to_absolute_path();

#endregion

#region Setters for File_Manager properties

[DllImport(DllName)]
[DllImport(DllName, CallingConvention = CallingConvention.Cdecl)]
internal static extern void sass_file_manager_set_is_initialized(bool is_initialized);

[DllImport(DllName)]
[DllImport(DllName, CallingConvention = CallingConvention.Cdecl)]
internal static extern void sass_file_manager_set_supports_conversion_to_absolute_path(
bool supports_conversion_to_absolute_path);


[DllImport(DllName, EntryPoint = "sass_file_manager_set_get_current_directory_delegate", CharSet = CharSet.Ansi)]
[DllImport(DllName, EntryPoint = "sass_file_manager_set_get_current_directory_delegate",
CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
internal static extern void sass_file_manager_set_get_current_directory_delegate_utf8(Func_StringAnsi del);

[DllImport(DllName, EntryPoint = "sass_file_manager_set_file_exists_delegate", CharSet = CharSet.Ansi)]
[DllImport(DllName, EntryPoint = "sass_file_manager_set_file_exists_delegate",
CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
internal static extern void sass_file_manager_set_file_exists_delegate_utf8(Func_StringAnsi_Boolean del);

[DllImport(DllName, EntryPoint = "sass_file_manager_set_is_absolute_path_delegate", CharSet = CharSet.Ansi)]
[DllImport(DllName, EntryPoint = "sass_file_manager_set_is_absolute_path_delegate",
CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
internal static extern void sass_file_manager_set_is_absolute_path_delegate_utf8(Func_StringAnsi_Boolean del);

[DllImport(DllName, EntryPoint = "sass_file_manager_set_to_absolute_path_delegate", CharSet = CharSet.Ansi)]
[DllImport(DllName, EntryPoint = "sass_file_manager_set_to_absolute_path_delegate",
CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
internal static extern void sass_file_manager_set_to_absolute_path_delegate_utf8(Func_StringAnsi_StringAnsi del);

[DllImport(DllName, EntryPoint = "sass_file_manager_set_read_file_delegate", CharSet = CharSet.Ansi)]
[DllImport(DllName, EntryPoint = "sass_file_manager_set_read_file_delegate",
CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
internal static extern void sass_file_manager_set_read_file_delegate_utf8(Func_StringAnsi_StringAnsi del);


[DllImport(DllName, EntryPoint = "sass_file_manager_set_get_current_directory_delegate", CharSet = CharSet.Unicode)]
[DllImport(DllName, EntryPoint = "sass_file_manager_set_get_current_directory_delegate",
CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Unicode)]
internal static extern void sass_file_manager_set_get_current_directory_delegate_utf16(Func_StringUni del);

[DllImport(DllName, EntryPoint = "sass_file_manager_set_file_exists_delegate", CharSet = CharSet.Unicode)]
[DllImport(DllName, EntryPoint = "sass_file_manager_set_file_exists_delegate",
CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Unicode)]
internal static extern void sass_file_manager_set_file_exists_delegate_utf16(Func_StringUni_Boolean del);

[DllImport(DllName, EntryPoint = "sass_file_manager_set_is_absolute_path_delegate", CharSet = CharSet.Unicode)]
[DllImport(DllName, EntryPoint = "sass_file_manager_set_is_absolute_path_delegate",
CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Unicode)]
internal static extern void sass_file_manager_set_is_absolute_path_delegate_utf16(Func_StringUni_Boolean del);

[DllImport(DllName, EntryPoint = "sass_file_manager_set_to_absolute_path_delegate", CharSet = CharSet.Unicode)]
[DllImport(DllName, EntryPoint = "sass_file_manager_set_to_absolute_path_delegate",
CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Unicode)]
internal static extern void sass_file_manager_set_to_absolute_path_delegate_utf16(Func_StringUni_StringUni del);

[DllImport(DllName, EntryPoint = "sass_file_manager_set_read_file_delegate", CharSet = CharSet.Unicode)]
[DllImport(DllName, EntryPoint = "sass_file_manager_set_read_file_delegate",
CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Unicode)]
internal static extern void sass_file_manager_set_read_file_delegate_utf16(Func_StringUni_StringUni del);

#endregion

#region Unsetters for File_Manager properties

[DllImport(DllName)]
[DllImport(DllName, CallingConvention = CallingConvention.Cdecl)]
internal static extern void sass_file_manager_unset_get_current_directory_delegate();

[DllImport(DllName)]
[DllImport(DllName, CallingConvention = CallingConvention.Cdecl)]
internal static extern void sass_file_manager_unset_file_exists_delegate();

[DllImport(DllName)]
[DllImport(DllName, CallingConvention = CallingConvention.Cdecl)]
internal static extern void sass_file_manager_unset_is_absolute_path_delegate();

[DllImport(DllName)]
[DllImport(DllName, CallingConvention = CallingConvention.Cdecl)]
internal static extern void sass_file_manager_unset_to_absolute_path_delegate();

[DllImport(DllName)]
[DllImport(DllName, CallingConvention = CallingConvention.Cdecl)]
internal static extern void sass_file_manager_unset_read_file_delegate();

#endregion
Expand Down
Binary file modified test/SharedFiles/ютф-16/sass/символы.sass
Binary file not shown.
Binary file modified test/SharedFiles/ютф-16/scss/символы.scss
Binary file not shown.

0 comments on commit 8be4a1f

Please sign in to comment.