private static IEnumerable <JsonConverter> GetRazorConverters() { var collection = new JsonConverterCollection(); collection.RegisterRazorConverters(); return(collection); }
public ProjectSnapshotHandleSerializationTest() { var converters = new JsonConverterCollection(); converters.RegisterRazorConverters(); Converters = converters.ToArray(); }
public RazorConfigurationSerializationTest() { var converters = new JsonConverterCollection(); converters.RegisterRazorConverters(); Converters = converters.ToArray(); }
public static void RegisterRazorLiveShareConverters(this JsonConverterCollection collection) { if (collection == null) { throw new ArgumentNullException(nameof(collection)); } if (collection.Contains(ProjectSnapshotHandleProxyJsonConverter.Instance)) { // Already registered. return; } collection.Add(ProjectSnapshotHandleProxyJsonConverter.Instance); collection.RegisterRazorConverters(); }
public SerializationTest() { var languageVersion = RazorLanguageVersion.Experimental; var extensions = new RazorExtension[] { new SerializedRazorExtension("TestExtension"), }; Configuration = RazorConfiguration.Create(languageVersion, "Custom", extensions); ProjectWorkspaceState = new ProjectWorkspaceState(new[] { TagHelperDescriptorBuilder.Create("Test", "TestAssembly").Build(), }, LanguageVersion.LatestMajor); var converterCollection = new JsonConverterCollection(); converterCollection.RegisterRazorConverters(); Converters = converterCollection.ToArray(); }
public static void RegisterOmniSharpRazorConverters(this JsonConverterCollection collection) { collection.RegisterRazorConverters(); collection.Add(OmniSharpProjectSnapshotHandleJsonConverter.Instance); }