public TemplateGenerator() { ReferencePaths.Add(Path.GetDirectoryName(typeof(int).Assembly.Location).Replace("Microsoft.NETCore.App", "Microsoft.AspNetCore.App")); Refs.Add(typeof(TextTransformation).Assembly.Location); Refs.Add(typeof(Uri).Assembly.Location); Refs.Add(typeof(File).Assembly.Location); Refs.Add(typeof(StringReader).Assembly.Location); Imports.Add("System"); }
public static void AddReferences(params Type[] types) { foreach (var type in types) { if (!ReferencePaths.Contains(type.Assembly.Location)) { ReferencePaths.Add(type.Assembly.Location); } } }
public static void AddReferences(params string[] assemblies) { foreach (var assembly in assemblies) { if (!ReferencePaths.Contains(assembly)) { ReferencePaths.Add(assembly); } } }
public static void AddReferences(params Assembly[] assemblies) { foreach (var assembly in assemblies) { if (!ReferencePaths.Contains(assembly.Location)) { ReferencePaths.Add(assembly.Location); } } }
public void AddReference(FilePath path) { if (path == null) { throw new ArgumentNullException(nameof(path)); } _log.Debug("Adding reference to {0}...", path.GetFilename().FullPath); #if NETCORE References.Add(_loader.Load(path, true)); #else ReferencePaths.Add(path); #endif }
public static void AddReferences(params Type[] types) { if (_initialized) { throw new InvalidOperationException("Compilador só pode ser executado no Pre-Start!"); } foreach (var type in types) { if (!ReferencePaths.Contains(type.Assembly.Location)) { ReferencePaths.Add(type.Assembly.Location); } } }
/// <summary> /// Add a new entity path reference to this existing entity. /// </summary> /// <param name="path">The path that can be used to reach this entity.</param> public void AddReferencePath(EntityPath path) { ReferencePaths.Add(path); }