protected override void OnWrite(TemplatedWriter writer) { base.OnWrite(writer); writer.Write(TargetUWPVersionToken, TargetUWPVersion); writer.Write(MinimumUWPVersionToken, MinimumUWPVersion); }
public void Write() { TemplatedWriter writer = new TemplatedWriter(fileTemplate); writer.Write(TargetFrameworkToken, TargetFramework, optional: true); writer.Write(DefineConstantsToken, DefineConstants); writer.Write(AssemblySearchPathsToken, AssemblySearchPaths); foreach (KeyValuePair <string, Uri> reference in References) { TemplatedWriter subTemplateWriter = writer.CreateWriterFor(CommonReferenceSubTemplate); subTemplateWriter.Write(CommonReferencesSubTemplateReferenceToken, reference.Key); subTemplateWriter.Write(CommonReferencesSubTemplateHintPathToken, reference.Value.LocalPath); } OnWrite(writer); writer.Export(exportPath); }
public void Write() { TemplatedWriter writer = new TemplatedWriter(fileTemplate); writer.Write(MSBuildForUnityVersionToken, MSBuildForUnityVersion.ToString()); writer.Write(UnityMajorVersionToken, UnityMajorVersion); writer.Write(UnityMinorVersionToken, UnityMinorVersion); writer.Write(UnityEditorInstallPathToken, UnityEditorInstallPath.FullName); writer.Write(CurrentUnityPlatformToken, CurrentUnityPlatform); writer.Write(CurrentTargetFrameworkToken, CurrentTargetFramework); writer.Write(UnityProjectAssetsDirectoryToken, UnityProjectAssetsDirectory.FullName); writer.Write(GeneratedOutputDirectoryToken, GeneratedProjectOutputPath.FullName); writer.Export(exportPath); }
/// <summary> /// Updates the value of the field and the token (if the field has changed). /// </summary> /// <param name="writer">The "this" writer.</param> /// <param name="token">The token key.</param> /// <param name="value">The Guid to update to.</param> /// <param name="optional">Whether this is an optional setting.</param> /// <returns>The same writer to allow chaining of writes.</returns> internal static TemplatedWriter Write(this TemplatedWriter writer, string token, Guid guid, bool optional = false) { return(writer.Write(token, guid.ToString().ToUpper(), optional: optional)); }