private AbstractWrapper[] getCpf3idrPairInPkg(IPackedFileDescriptor tgtpfd, String pkg) { IPackageFile p = SimPe.Packages.File.LoadFromFile(pkg); if (p == null) { return(null); } IPackedFileDescriptor pc = p.FindFile(tgtpfd); if (pc == null) { return(null); } IPackedFileDescriptor p3 = p.FindFile(SimPe.Data.MetaData.REF_FILE /*3IDR*/, pc.SubType, pc.Group, pc.Instance); if (p3 == null) { return(null); } AbstractWrapper[] tgt = new AbstractWrapper[] { new SimPe.PackedFiles.Wrapper.Cpf(), new SimPe.Plugin.RefFile() }; tgt[0].ProcessData(pc, p); tgt[1].ProcessData(p3, p); return(tgt); }
protected void AddVersionInformation(TextWriter writer, AbstractWrapper wrapper) { AddSectionHeader(writer, "Version Information"); var docs35 = NDocUtilities.FindDocumentation(Artifacts.NDocForPlatform("net35"), wrapper); var docs45 = NDocUtilities.FindDocumentation(Artifacts.NDocForPlatform("net45"), wrapper); var docsCore20 = NDocUtilities.FindDocumentation(Artifacts.NDocForPlatform("netstandard2.0"), wrapper); var docsNetCoreApp31 = NDocUtilities.FindDocumentation(Artifacts.NDocForPlatform("netcoreapp3.1"), wrapper); // If there is no documentation then assume it is available for all platforms. var boolNoDocs = docs35 == null && docs45 == null && docsCore20 == null && docsNetCoreApp31 == null; // .NET Core App var netCoreAppVersions = new List <string>(); if (boolNoDocs || (wrapper != null && docsNetCoreApp31 != null)) { netCoreAppVersions.Add("3.1"); } if (netCoreAppVersions.Count > 0) { writer.WriteLine("<p><strong>.NET Core App: </strong><br/>Supported in: {0}<br/>", string.Join(", ", netCoreAppVersions)); } // .NET Standard var netstandardVersions = new List <string>(); if (boolNoDocs || (wrapper != null && docsCore20 != null)) { netstandardVersions.Add("2.0"); } if (netstandardVersions.Count > 0) { writer.WriteLine("<p><strong>.NET Standard: </strong><br/>Supported in: {0}<br/>", string.Join(", ", netstandardVersions)); } // .NET Framework var netframeworkVersions = new List <string>(); if (boolNoDocs || (wrapper != null && docs45 != null)) { netframeworkVersions.Add("4.5"); } if (boolNoDocs || (wrapper != null && docs35 != null)) { netframeworkVersions.Add("4.0"); netframeworkVersions.Add("3.5"); } if (netframeworkVersions.Count > 0) { writer.WriteLine("<p><strong>.NET Framework: </strong><br/>Supported in: {0}<br/>", string.Join(", ", netframeworkVersions)); } AddSectionClosing(writer); }
public void Act_ShouldAttemptToClaimEachCellForWin() { //Arrange FakeCell fakeCell = new FakeCell.Builder().Build(); FakeEnumerator <ICell> fakeEnumerator = new FakeEnumerator <ICell> .Builder() .MoveNext(true, true, true, true, true, false) .Current(fakeCell) .Build(); FakeCellCollection fakeCellCollection = new FakeCellCollection.Builder() .GetEnumerator(fakeEnumerator) .Build(); FakeBoard fakeBoardClone = new FakeBoard.Builder() .ClaimEndsGame(Bool.False) .Build(); FakeBoard fakeBoard = new FakeBoard.Builder() .AvailableSpaces(fakeCellCollection) .Clone(fakeBoardClone) .Build(); FakeSelectMoveAction fakeSelectMoveAction = new FakeSelectMoveAction.Builder().Act(null).Build(); PlayerWinningSelectMoveAction subject = new AbstractWrapper(fakeSelectMoveAction); //Act subject.Act(fakeBoard, null, null); //Assert fakeSelectMoveAction.AssertActInvoked(); fakeBoard.CloneInvokedCount(5); fakeBoardClone.AssertClaimEndsGameInvokedCount(5); }
protected void AddVersionInformation(TextWriter writer, AbstractWrapper wrapper) { AddSectionHeader(writer, "Version Information"); var docs35 = NDocUtilities.FindDocumentation(Artifacts.NDocForPlatform("net35"), wrapper); var docs45 = NDocUtilities.FindDocumentation(Artifacts.NDocForPlatform("net45"), wrapper); var docsCore = NDocUtilities.FindDocumentation(Artifacts.NDocForPlatform("netstandard1.3"), wrapper); var docsPCL = NDocUtilities.FindDocumentation(Artifacts.NDocForPlatform("pcl"), wrapper); var docsUnity = NDocUtilities.FindDocumentation(Artifacts.NDocForPlatform("unity"), wrapper); // If there is no documentation then assume it is available for all platforms, excluding Unity. var boolNoDocs = docs35 == null && docs45 == null && docsCore == null && docsPCL == null && docsUnity == null; // .NET core Framework if (boolNoDocs || (wrapper != null && docsCore != null)) { writer.WriteLine("<p><strong>.NET Core: </strong><br/>Supported in: 1.3<br/>"); } // .NET Framework StringBuilder sb = new StringBuilder(); if (boolNoDocs || (wrapper != null && docs45 != null)) { sb.Append("4.5"); } if (boolNoDocs || (wrapper != null && docs35 != null)) { if (sb.Length > 0) { sb.Append(", "); } sb.Append("4.0, 3.5"); } if (sb.Length > 0) { writer.WriteLine("<p><strong>.NET Framework: </strong><br/>Supported in: {0}<br/>", sb.ToString()); } if (boolNoDocs || docsPCL != null || _referAsyncAlternativePCL) { writer.WriteLine("<p><strong>Portable Class Library: </strong><br/>"); writer.WriteLine("Supported in: Windows Store Apps<br/>"); writer.WriteLine("Supported in: Windows Phone 8.1<br/>"); writer.WriteLine("Supported in: Xamarin Android<br/>"); writer.WriteLine("Supported in: Xamarin iOS (Unified)<br/>"); writer.WriteLine("Supported in: Xamarin.Forms<br/>"); } if (docsUnity != null || _unityVersionOfAsyncExists || _referAsyncAlternativeUnity) { writer.WriteLine("<p><strong>Unity: </strong><br/>"); writer.WriteLine("Supported Versions: 4.6 and above<br/>"); writer.WriteLine("Supported Platforms: Android, iOS, Standalone<br/>"); } AddSectionClosing(writer); }
AbstractWrapper findInPackagelist(List <string> pkgs, uint Filetype, IPackedFileDescriptor pfd) { foreach (String pkg in pkgs) { AbstractWrapper tgt = findInPackage(pkg, Filetype, pfd); if (tgt != null) { return(tgt); } } return(null); }
protected void AddVersionInformation(TextWriter writer, AbstractWrapper wrapper) { AddSectionHeader(writer, "Version Information"); var docs35 = NDocUtilities.FindDocumentation(Artifacts.NDocForPlatform("net35"), wrapper); var docs45 = NDocUtilities.FindDocumentation(Artifacts.NDocForPlatform("net45"), wrapper); var docsPCL = NDocUtilities.FindDocumentation(Artifacts.NDocForPlatform("pcl"), wrapper); // If there is no documentation then assume it is available for all platforms. var boolNoDocs = docs35 == null && docs45 == null && docsPCL == null; var sb = new StringBuilder(); if (boolNoDocs || (wrapper != null && docs45 != null)) { sb.Append("4.5"); } if (boolNoDocs || (wrapper != null && docs35 != null)) { if (sb.Length > 0) { sb.Append(", "); } sb.Append("4.0, 3.5"); } if (sb.Length > 0) { writer.WriteLine("<p><strong>.NET Framework: </strong><br/>Supported in: {0}<br/>", sb.ToString()); } if (boolNoDocs || docsPCL != null) { writer.WriteLine("<p><strong>Portable Class Library: </strong><br/>"); writer.WriteLine("Supported in: Windows Store Apps<br/>"); writer.WriteLine("Supported in: Windows Phone 8.1<br/>"); writer.WriteLine("Supported in: Xamarin Android<br/>"); writer.WriteLine("Supported in: Xamarin iOS (Unified)<br/>"); writer.WriteLine("Supported in: Xamarin.Forms<br/>"); } AddSectionClosing(writer); }
public void Act_ShouldInvokeActWhenNoSpacesAvailable() { //Arrange FakeEnumerator <ICell> fakeEnumerator = new FakeEnumerator <ICell> .Builder() .MoveNext(false) .Build(); FakeCellCollection fakeCellCollection = new FakeCellCollection.Builder() .GetEnumerator(fakeEnumerator) .Build(); FakeBoard fakeBoard = new FakeBoard.Builder().AvailableSpaces(fakeCellCollection).Build(); FakeSelectMoveAction fakeSelectMoveAction = new FakeSelectMoveAction.Builder().Act(null).Build(); PlayerWinningSelectMoveAction subject = new AbstractWrapper(fakeSelectMoveAction); //Act subject.Act(fakeBoard, null, null); //Assert fakeSelectMoveAction.AssertActInvoked(); }
private void makeCpf3idrPair() { objKeyCPF = null; objKey3IDR = null; if (currentPfd == null || currentPackage == null) { return; } if (currentPfd.Type == 0x0C1FE246 /*XMOL*/ || currentPfd.Type == 0x2C1FD8A1 /*XTOL*/ || currentPfd.Type == SimPe.Data.MetaData.GZPS) { AbstractWrapper p3 = findInPackagelist(objkeys, SimPe.Data.MetaData.REF_FILE, currentPfd); if (p3 != null) { objKeyCPF = new SimPe.PackedFiles.Wrapper.Cpf(); objKeyCPF.ProcessData(currentPfd, currentPackage); addFile(p3); objKey3IDR = new SimPe.Plugin.RefFile(); objKey3IDR.ProcessData(p3.FileDescriptor, p3.Package); } } else if (currentPfd.Type == SimPe.Data.MetaData.REF_FILE /*3IDR*/) { foreach (uint t in new uint[] { 0x0C1FE246 /*XMOL*/, 0x2C1FD8A1 /*XTOL*/, SimPe.Data.MetaData.GZPS }) { AbstractWrapper pc = (SimPe.PackedFiles.Wrapper.Cpf)findInPackagelist(objkeys, t, currentPfd); if (pc != null) { addFile(pc); objKeyCPF = new SimPe.PackedFiles.Wrapper.Cpf(); objKeyCPF.ProcessData(pc.FileDescriptor, pc.Package); objKey3IDR = new SimPe.Plugin.RefFile(); objKey3IDR.ProcessData(currentPfd, currentPackage); break; } } } }
protected void AddVersionInformation(TextWriter writer, AbstractWrapper wrapper) { AddSectionHeader(writer, "Version Information"); var docs35 = NDocUtilities.FindDocumentation(Artifacts.NDocForPlatform("net35"), wrapper); var docs45 = NDocUtilities.FindDocumentation(Artifacts.NDocForPlatform("net45"), wrapper); var docsPCL = NDocUtilities.FindDocumentation(Artifacts.NDocForPlatform("pcl"), wrapper); // If there is no documentation then assume it is available for all platforms. var boolNoDocs = docs35 == null && docs45 == null && docsPCL == null; var sb = new StringBuilder(); if (boolNoDocs || (wrapper != null && docs45 != null)) sb.Append("4.5"); if (boolNoDocs || (wrapper != null && docs35 != null)) { if (sb.Length > 0) sb.Append(", "); sb.Append("4.0, 3.5"); } if (sb.Length > 0) { writer.WriteLine("<p><strong>.NET Framework: </strong><br/>Supported in: {0}<br/>", sb.ToString()); } if (boolNoDocs || docsPCL != null) { writer.WriteLine("<p><strong>Portable Class Library: </strong><br/>"); writer.WriteLine("Supported in: Windows Store Apps<br/>"); writer.WriteLine("Supported in: Windows Phone 8.1<br/>"); writer.WriteLine("Supported in: Xamarin Android<br/>"); writer.WriteLine("Supported in: Xamarin iOS (Unified)<br/>"); writer.WriteLine("Supported in: Xamarin.Forms<br/>"); } AddSectionClosing(writer); }
protected void AddVersionInformation(TextWriter writer, AbstractWrapper wrapper) { AddSectionHeader(writer, "Version Information"); var docs35 = NDocUtilities.FindDocumentation(Artifacts.NDocForPlatform("net35"), wrapper); var docs45 = NDocUtilities.FindDocumentation(Artifacts.NDocForPlatform("net45"), wrapper); var docsRT = NDocUtilities.FindDocumentation(Artifacts.NDocForPlatform("winrt"), wrapper); var docsWP = NDocUtilities.FindDocumentation(Artifacts.NDocForPlatform("wp8"), wrapper); var docsPortable = NDocUtilities.FindDocumentation(Artifacts.NDocForPlatform("portable"), wrapper); // If there is no documentation then assume it is available for all platforms. var boolNoDocs = docs35 == null && docs45 == null && docsRT == null && docsWP == null && docsPortable == null; var sb = new StringBuilder(); if (boolNoDocs || (wrapper != null && docs45 != null)) sb.Append("4.5"); if (boolNoDocs || (wrapper != null && docs35 != null)) { if (sb.Length > 0) sb.Append(", "); sb.Append("4.0, 3.5"); } if (sb.Length > 0) { writer.WriteLine("<p><strong>.NET Framework: </strong><br/>Supported in: {0}<br/>", sb.ToString()); } if (boolNoDocs || docsRT != null || docsPortable != null) { sb = new StringBuilder(); if (docsPortable != null) sb.Append("Windows 8.1"); if (docsRT != null) { if (sb.Length > 0) sb.Append(", "); sb.Append("Windows 8"); } if (sb.Length > 0) writer.WriteLine("<p><strong>.NET for Windows Store apps: </strong><br/>Supported in: {0}<br/>", sb); } if (boolNoDocs || docsWP != null || docsPortable != null) { sb = new StringBuilder(); if (docsPortable != null) sb.Append("Windows Phone 8.1"); if (docsWP != null) { if (sb.Length > 0) sb.Append(", "); sb.Append("Windows Phone 8"); } if (sb.Length > 0) writer.WriteLine("<p><strong>.NET for Windows Phone: </strong><br/>Supported in: {0}<br/>", sb); } AddSectionClosing(writer); }
public MasterWrapper(MixinIsInternalSpec target) { //MixinAttribute.RequiresInitialization = false, so we can construct //AbstractWrapper directly AbstractWrapper = new AbstractWrapper(); }
public MasterWrapper(IOtherMixinRequirements target) { //MixinAttribute.RequiresInitialization = false, so we can construct //AbstractWrapper directly AbstractWrapper = new AbstractWrapper(); }
protected void AddVersionInformation(TextWriter writer, AbstractWrapper wrapper) { AddSectionHeader(writer, "Version Information"); var docs35 = NDocUtilities.FindDocumentation(Artifacts.NDocForPlatform("net35"), wrapper); var docs45 = NDocUtilities.FindDocumentation(Artifacts.NDocForPlatform("net45"), wrapper); var docsCore = NDocUtilities.FindDocumentation(Artifacts.NDocForPlatform("netstandard1.3"), wrapper); var docsPCL = NDocUtilities.FindDocumentation(Artifacts.NDocForPlatform("pcl"), wrapper); var docsUnity = NDocUtilities.FindDocumentation(Artifacts.NDocForPlatform("unity"), wrapper); // If there is no documentation then assume it is available for all platforms, excluding Unity. var boolNoDocs = docs35 == null && docs45 == null && docsCore == null && docsPCL == null && docsUnity == null; // .NET core Framework if (boolNoDocs || (wrapper != null && docsCore != null)) writer.WriteLine("<p><strong>.NET Core: </strong><br/>Supported in: 1.3<br/>"); // .NET Framework StringBuilder sb = new StringBuilder(); if (boolNoDocs || (wrapper != null && docs45 != null)) sb.Append("4.5"); if (boolNoDocs || (wrapper != null && docs35 != null)) { if (sb.Length > 0) sb.Append(", "); sb.Append("4.0, 3.5"); } if (sb.Length > 0) { writer.WriteLine("<p><strong>.NET Framework: </strong><br/>Supported in: {0}<br/>", sb.ToString()); } if (boolNoDocs || docsPCL != null || _referAsyncAlternativePCL) { writer.WriteLine("<p><strong>Portable Class Library: </strong><br/>"); writer.WriteLine("Supported in: Windows Store Apps<br/>"); writer.WriteLine("Supported in: Windows Phone 8.1<br/>"); writer.WriteLine("Supported in: Xamarin Android<br/>"); writer.WriteLine("Supported in: Xamarin iOS (Unified)<br/>"); writer.WriteLine("Supported in: Xamarin.Forms<br/>"); } if (docsUnity != null || _unityVersionOfAsyncExists || _referAsyncAlternativeUnity) { writer.WriteLine("<p><strong>Unity: </strong><br/>"); writer.WriteLine("Supported Versions: 4.6 and above<br/>"); writer.WriteLine("Supported Platforms: Android, iOS, Standalone<br/>"); } AddSectionClosing(writer); }
private void addFile(AbstractWrapper file) { addFile(file.Package, file.FileDescriptor); }