Exemplo n.º 1
0
        public static void AddPhysical(
            [NotNull] this VirtualFileSetList list,
            [NotNull] string root,
            ExclusionFilters exclusionFilters = ExclusionFilters.Sensitive)
        {
            Check.NotNull(list, nameof(list));
            Check.NotNullOrWhiteSpace(root, nameof(root));

            var fileProvider = new PhysicalFileProvider(root, exclusionFilters);

            list.Add(new PhysicalVirtualFileSetInfo(fileProvider, root));
        }
        public static void AddEmbedded <T>([NotNull] this VirtualFileSetList list, [CanBeNull] string baseNamespace = null, string baseFolderInProject = null)
        {
            Check.NotNull(list, nameof(list));

            list.Add(
                new EmbeddedFileSet(
                    typeof(T).Assembly,
                    baseNamespace,
                    baseFolderInProject
                    )
                );
        }
Exemplo n.º 3
0
        public static void AddEmbedded <T>(
            [NotNull] this VirtualFileSetList list,
            [CanBeNull] string baseNamespace = null,
            [CanBeNull] string baseFolder    = null)
        {
            Check.NotNull(list, nameof(list));

            var assembly     = typeof(T).Assembly;
            var fileProvider = CreateFileProvider(
                assembly,
                baseNamespace,
                baseFolder
                );

            list.Add(new EmbeddedVirtualFileSetInfo(fileProvider, assembly, baseFolder));
        }