Esempio n. 1
0
 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");
 }
Esempio n. 2
0
 public static void AddReferences(params Type[] types)
 {
     foreach (var type in types)
     {
         if (!ReferencePaths.Contains(type.Assembly.Location))
         {
             ReferencePaths.Add(type.Assembly.Location);
         }
     }
 }
Esempio n. 3
0
 public static void AddReferences(params string[] assemblies)
 {
     foreach (var assembly in assemblies)
     {
         if (!ReferencePaths.Contains(assembly))
         {
             ReferencePaths.Add(assembly);
         }
     }
 }
Esempio n. 4
0
 public static void AddReferences(params Assembly[] assemblies)
 {
     foreach (var assembly in assemblies)
     {
         if (!ReferencePaths.Contains(assembly.Location))
         {
             ReferencePaths.Add(assembly.Location);
         }
     }
 }
Esempio n. 5
0
        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
        }
Esempio n. 6
0
        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);
 }