public Reference(ContentProject contentProject, string assemblyName, string hintPath) { if (contentProject == null) throw new ArgumentNullException("contentProject"); if (string.IsNullOrEmpty(assemblyName)) throw new ArgumentNullException("assemblyName"); ContentProject = contentProject; AssemblyName = assemblyName; HintPath = hintPath; }
public Asset(ContentProject project, FileInfo file, AssetBuildActionKind buildAction, string name, string importer, string processor) { Project = project; File = file; BuildAction = buildAction; Name = name; Importer = importer; Processor = processor; }
public ProjectReference(ContentProject contentProject, string path, string guid, string name) { if (contentProject == null) throw new ArgumentNullException("contentProject"); if (string.IsNullOrEmpty(path)) throw new ArgumentNullException("path"); ContentProject = contentProject; Path = path; Guid = guid; Name = name; var referencedPath = System.IO.Path.Combine(ContentProject.DirectoryPath, Path); referencedRootElement = ProjectRootElement.Open(referencedPath); referencedProject = new Project(referencedRootElement); }
public ProjectPropertiesEdit(ContentProject project) { Project = project; References = new ObservableCollection<ReferenceEdit>(); foreach (var reference in project.EnumerateReferences()) { References.Add(new ReferenceEdit(reference)); } ProjectReferences = new ObservableCollection<ProjectReferenceEdit>(); foreach (var projectReference in project.EnumerateProjectReferences()) { ProjectReferences.Add(new ProjectReferenceEdit(projectReference)); } }
public void Register(ContentProject project) { var assemblyName = CreateAssemblyName().FullName; var hintPath = (UseHintPath && !string.IsNullOrEmpty(HintPath)) ? HintPath : null; project.AddReference(assemblyName, hintPath); }
public void Register(ContentProject project) { project.AddProjectReference(Path, Guid, Name); }
/// <summary> /// 指定のパスからコンテンツ プロジェクトをロードします。 /// </summary> /// <param name="path">コンテンツ プロジェクト ファイルのパス。</param> /// <param name="logger">ロガー、null (ロガーを設定しない場合)</param> /// <returns>ContentProject。</returns> public static ContentProject Load(string path, ILogger logger) { if (path == null) throw new ArgumentNullException("path"); var rootElement = ProjectRootElement.Open(path); var project = new ContentProject(logger); project.LoadBuildProject(rootElement); Tracer.TraceSource.TraceInformation("Loaded project '{0}'.", project.FullPath); return project; }
/// <summary> /// 指定のパスでコンテンツ プロジェクトをメモリ内で作成します。 /// </summary> /// <param name="logger">ロガー、null (ロガーを設定しない場合)</param> /// <returns>ContentProject。</returns> public static ContentProject Create(string path, ILogger logger) { if (path == null) throw new ArgumentNullException("path"); var rootElement = ProjectRootElement.Create(path); rootElement.AddImport( @"$(MSBuildExtensionsPath)\Microsoft\XNA Game Studio\v4.0\Microsoft.Xna.GameStudio.ContentPipeline.targets"); var project = new ContentProject(logger); project.CreateBuildProject(rootElement); project.project.SetProperty("ContentRootDirectory", "Content"); Tracer.TraceSource.TraceInformation("Created project '{0}'.", project.FullPath); return project; }
/// <summary> /// コンストラクタ。 /// </summary> public TempContentBuilder() { CreateTempDirectory(); project = ContentProject.Create(Path.Combine(tempDirectory, "Content.contentproj")); }