Skip to content

Commit b01aebd

Browse files
committed
Removed DecompileProject
1 parent f628660 commit b01aebd

File tree

2 files changed

+23
-20
lines changed

2 files changed

+23
-20
lines changed

ILSpy.XSharpLanguage/ILSpy.XSharpLanguage.xsproj

+2-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
<StartupObject />
1717
<ApplicationIcon />
1818
<VulcanCompatibleResources>False</VulcanCompatibleResources>
19-
<XSharpProjectversion>2.7.0.0</XSharpProjectversion>
19+
<XSharpProjectversion>2.11.0.1</XSharpProjectversion>
2020
<Includepaths />
2121
<Nostandarddefs />
2222
<TargetFrameworkProfile />
@@ -35,6 +35,7 @@
3535
<DebuggerCommandArguments />
3636
<DebuggerWorkingDirectory />
3737
<EnableUnmanagedDebugging>true</EnableUnmanagedDebugging>
38+
<TreatWarningsAsErrors>False</TreatWarningsAsErrors>
3839
</PropertyGroup>
3940
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|AnyCPU'" Label="Configuration">
4041
<PlatformTarget>AnyCPU</PlatformTarget>

ILSpy.XSharpLanguage/XSharpLanguage.prg

+21-19
Original file line numberDiff line numberDiff line change
@@ -30,27 +30,27 @@ BEGIN NAMESPACE ILSpy.XSharpLanguage
3030
CONSTRUCTOR()
3131
RETURN
3232

33-
PUBLIC OVERRIDE PROPERTY Name AS STRING
33+
PUBLIC OVERRIDE PROPERTY Name AS STRING
3434
GET
3535
RETURN "XSharp"
3636
END GET
37-
END PROPERTY
37+
END PROPERTY
3838

3939

40-
PUBLIC OVERRIDE PROPERTY FileExtension AS STRING
40+
PUBLIC OVERRIDE PROPERTY FileExtension AS STRING
4141
GET
4242
// used in 'Save As' dialog
4343
RETURN ".prg"
4444
END GET
45-
END PROPERTY
45+
END PROPERTY
4646

47-
PUBLIC OVERRIDE PROPERTY ProjectFileExtension AS STRING
47+
PUBLIC OVERRIDE PROPERTY ProjectFileExtension AS STRING
4848
GET
4949
RETURN ".xsproj"
5050
END GET
51-
END PROPERTY
51+
END PROPERTY
5252

53-
PUBLIC OVERRIDE METHOD DecompileMethod( methoddef AS IMethod, output AS ITextOutput, options AS DecompilationOptions) AS VOID
53+
PUBLIC OVERRIDE METHOD DecompileMethod( methoddef AS IMethod, output AS ITextOutput, options AS DecompilationOptions) AS VOID
5454
LOCAL decompiler AS CSharpDecompiler
5555
LOCAL assembly AS PEFile
5656
LOCAL method2 AS IMethod
@@ -72,7 +72,7 @@ BEGIN NAMESPACE ILSpy.XSharpLanguage
7272
SELF:WriteCode(output, options:DecompilerSettings, decompiler:Decompile(methoddef:MetadataToken), decompiler:TypeSystem)
7373
RETURN
7474

75-
PUBLIC OVERRIDE METHOD DecompileProperty(propDef AS IProperty, output AS ITextOutput, options AS DecompilationOptions) AS VOID
75+
PUBLIC OVERRIDE METHOD DecompileProperty(propDef AS IProperty, output AS ITextOutput, options AS DecompilationOptions) AS VOID
7676
LOCAL decompiler AS CSharpDecompiler
7777
LOCAL assembly AS PEFile
7878
//
@@ -81,7 +81,7 @@ BEGIN NAMESPACE ILSpy.XSharpLanguage
8181
SELF:WriteCommentLine(output, SELF:TypeToString(propDef:DeclaringType, TRUE))
8282
SELF:WriteCode(output, options:DecompilerSettings, decompiler:Decompile(propDef:MetadataToken), decompiler:TypeSystem)
8383

84-
PUBLIC OVERRIDE METHOD DecompileField(fieldDef AS IField, output AS ITextOutput, options AS DecompilationOptions) AS VOID
84+
PUBLIC OVERRIDE METHOD DecompileField(fieldDef AS IField, output AS ITextOutput, options AS DecompilationOptions) AS VOID
8585
LOCAL assembly AS PEFile
8686
LOCAL decompiler AS CSharpDecompiler
8787
LOCAL definitions AS List<EntityHandle>
@@ -99,7 +99,7 @@ BEGIN NAMESPACE ILSpy.XSharpLanguage
9999
decompiler:AstTransforms:Add(SelectFieldTransform{definition})
100100
SELF:WriteCode(output, options:DecompilerSettings, decompiler:Decompile(definitions), decompiler:TypeSystem)
101101

102-
PUBLIC OVERRIDE METHOD DecompileType(typeDef AS ITypeDefinition, output AS ITextOutput, options AS DecompilationOptions) AS VOID
102+
PUBLIC OVERRIDE METHOD DecompileType(typeDef AS ITypeDefinition, output AS ITextOutput, options AS DecompilationOptions) AS VOID
103103
LOCAL assembly AS PEFile
104104
LOCAL decompiler AS CSharpDecompiler
105105
//
@@ -108,7 +108,7 @@ BEGIN NAMESPACE ILSpy.XSharpLanguage
108108
decompiler := SELF:CreateDecompiler(assembly, options)
109109
SELF:WriteCode(output, options:DecompilerSettings, decompiler:Decompile(typeDef:MetadataToken), decompiler:TypeSystem)
110110

111-
PUBLIC OVERRIDE METHOD DecompileEvent(evt AS IEvent , output AS ITextOutput , options AS DecompilationOptions ) AS VOID
111+
PUBLIC OVERRIDE METHOD DecompileEvent(evt AS IEvent , output AS ITextOutput , options AS DecompilationOptions ) AS VOID
112112
LOCAL assembly AS PEFile
113113
LOCAL decompiler AS CSharpDecompiler
114114
//
@@ -117,7 +117,7 @@ BEGIN NAMESPACE ILSpy.XSharpLanguage
117117
decompiler := SELF:CreateDecompiler(assembly, options)
118118
SELF:WriteCode(output, options:DecompilerSettings, decompiler:Decompile(evt:MetadataToken), decompiler:TypeSystem)
119119

120-
PUBLIC OVERRIDE METHOD DecompileAssembly(asmbly AS LoadedAssembly , output AS ITextOutput , options AS DecompilationOptions ) AS ICSharpCode.Decompiler.Solution.ProjectId
120+
PUBLIC OVERRIDE METHOD DecompileAssembly(asmbly AS LoadedAssembly , output AS ITextOutput , options AS DecompilationOptions ) AS ICSharpCode.Decompiler.Solution.ProjectId
121121
// LOCAL result AS ModuleDefinition
122122
// //LOCAL iLSpyWholeProjectDecompiler AS ILSpyWholeProjectDecompiler
123123
// LOCAL moduleDefinition AS ModuleDefinition
@@ -492,7 +492,7 @@ BEGIN NAMESPACE ILSpy.XSharpLanguage
492492
SELF:options := options
493493

494494

495-
PROTECTED OVERRIDE METHOD WriteResourceToFile(fileName AS STRING , resourceName AS STRING , entryStream AS Stream ) AS IEnumerable<ValueTuple<STRING, STRING>>
495+
PROTECTED OVERRIDE METHOD WriteResourceToFile(fileName AS STRING , resourceName AS STRING , entryStream AS Stream ) AS IEnumerable<ValueTuple<STRING, STRING>>
496496
//
497497
FOREACH exportedValue AS IResourceFileHandler IN App.ExportProvider:GetExportedValues<IResourceFileHandler>()
498498
IF (exportedValue:CanHandle(fileName, SELF:options))
@@ -504,19 +504,20 @@ BEGIN NAMESPACE ILSpy.XSharpLanguage
504504
NEXT
505505
RETURN SUPER:WriteResourceToFile(fileName, resourceName, entryStream)
506506

507-
507+
/*
508+
508509
PUBLIC METHOD DecompileProject(moduleDefinition AS PEFile , targetDirectory AS STRING , projectFileWriter AS TextWriter , cancellationToken := DEFAULT(CancellationToken) AS CancellationToken ) AS ProjectId
509510
LOCAL list AS List<Tuple<STRING, STRING>>
510511
//
511512
IF string.IsNullOrEmpty(targetDirectory)
512-
THROW InvalidOperationException{e"Must set TargetDirectory"}
513+
THROW InvalidOperationException{"Must set TargetDirectory"}
513514
ENDIF
514515
SELF:targetDirectory := targetDirectory
515516
SELF:directories:Clear()
516-
list := Enumerable.ToList<Tuple<STRING, STRING>>(SELF:xsWriteCodeFilesInProject(moduleDefinition, cancellationToken))
517+
list := SELF:xsWriteCodeFilesInProject(moduleDefinition, cancellationToken)):ToList()
517518
list:AddRange(SELF:WriteResourceFilesInProject(moduleDefinition))
518519
IF SELF:StrongNameKeyFile != NULL
519-
@@File.Copy(SELF:StrongNameKeyFile, Path.Combine(targetDirectory, Path.GetFileName(SELF:StrongNameKeyFile)))
520+
File.Copy(SELF:StrongNameKeyFile, Path.Combine(targetDirectory, Path.GetFileName(SELF:StrongNameKeyFile)))
520521
ENDIF
521522
RETURN SELF:WriteProjectFile(projectFileWriter, list, moduleDefinition)
522523
@@ -556,15 +557,16 @@ BEGIN NAMESPACE ILSpy.XSharpLanguage
556557
syntaxTree:AcceptVisitor(CSharpOutputVisitor{(TextWriter)(OBJECT)val2, SELF:settings:CSharpFormattingOptions})
557558
558559
CATCH ex AS Exception WHEN ((!(ex IS OperationCanceledException)) .AND. (!(ex IS DecompilerException)))
559-
THROW DecompilerException{module, "Error decompiling for '" + @@file:get_Key() + e"'", ex}
560+
THROW DecompilerException{module, "Error decompiling for '" + @@file:get_Key() + "'", ex}
560561
561562
FINALLY
562563
((IDisposable)val2)?:Dispose()
563564
END TRY
564565
})
565566
RETURN Enumerable.Concat<Tuple<STRING, STRING>>(Enumerable.Select<IGrouping<STRING, TypeDefinitionHandle>, Tuple<STRING, STRING>>((IEnumerable<IGrouping<STRING, TypeDefinitionHandle>>)list, (@@Func<IGrouping<STRING, TypeDefinitionHandle>, Tuple<STRING, STRING>>)({f AS IGrouping<STRING, TypeDefinitionHandle> => Tuple.Create(e"Compile", f:get_Key())})), SELF:WriteAssemblyInfo(ts, cancellationToken))
566567
567-
568+
*/
569+
568570
END CLASS
569571

570572

0 commit comments

Comments
 (0)