You've already forked linux-packaging-mono
Imported Upstream version 5.14.0.106
Former-commit-id: 03fab0f68b93e237c47a03f7d3793d7f5d7c276d
This commit is contained in:
parent
c34b058d3e
commit
fee6ab6a16
51
external/cecil/Mono.Cecil.Cil/Document.cs
vendored
51
external/cecil/Mono.Cecil.Cil/Document.cs
vendored
@@ -49,12 +49,13 @@ namespace Mono.Cecil.Cil {
|
||||
|
||||
string url;
|
||||
|
||||
byte type;
|
||||
byte hash_algorithm;
|
||||
byte language;
|
||||
byte language_vendor;
|
||||
Guid type;
|
||||
Guid hash_algorithm;
|
||||
Guid language;
|
||||
Guid language_vendor;
|
||||
|
||||
byte [] hash;
|
||||
byte [] embedded_source;
|
||||
|
||||
public string Url {
|
||||
get { return url; }
|
||||
@@ -62,23 +63,43 @@ namespace Mono.Cecil.Cil {
|
||||
}
|
||||
|
||||
public DocumentType Type {
|
||||
get { return (DocumentType) type; }
|
||||
set { type = (byte) value; }
|
||||
get { return type.ToType (); }
|
||||
set { type = value.ToGuid (); }
|
||||
}
|
||||
|
||||
public Guid TypeGuid {
|
||||
get { return type; }
|
||||
set { type = value; }
|
||||
}
|
||||
|
||||
public DocumentHashAlgorithm HashAlgorithm {
|
||||
get { return (DocumentHashAlgorithm) hash_algorithm; }
|
||||
set { hash_algorithm = (byte) value; }
|
||||
get { return hash_algorithm.ToHashAlgorithm (); }
|
||||
set { hash_algorithm = value.ToGuid (); }
|
||||
}
|
||||
|
||||
public Guid HashAlgorithmGuid {
|
||||
get { return hash_algorithm; }
|
||||
set { hash_algorithm = value; }
|
||||
}
|
||||
|
||||
public DocumentLanguage Language {
|
||||
get { return (DocumentLanguage) language; }
|
||||
set { language = (byte) value; }
|
||||
get { return language.ToLanguage (); }
|
||||
set { language = value.ToGuid (); }
|
||||
}
|
||||
|
||||
public Guid LanguageGuid {
|
||||
get { return language; }
|
||||
set { language = value; }
|
||||
}
|
||||
|
||||
public DocumentLanguageVendor LanguageVendor {
|
||||
get { return (DocumentLanguageVendor) language_vendor; }
|
||||
set { language_vendor = (byte) value; }
|
||||
get { return language_vendor.ToVendor (); }
|
||||
set { language_vendor = value.ToGuid (); }
|
||||
}
|
||||
|
||||
public Guid LanguageVendorGuid {
|
||||
get { return language_vendor; }
|
||||
set { language_vendor = value; }
|
||||
}
|
||||
|
||||
public byte [] Hash {
|
||||
@@ -86,10 +107,16 @@ namespace Mono.Cecil.Cil {
|
||||
set { hash = value; }
|
||||
}
|
||||
|
||||
public byte[] EmbeddedSource {
|
||||
get { return embedded_source; }
|
||||
set { embedded_source = value; }
|
||||
}
|
||||
|
||||
public Document (string url)
|
||||
{
|
||||
this.url = url;
|
||||
this.hash = Empty<byte>.Array;
|
||||
this.embedded_source = Empty<byte>.Array;
|
||||
this.token = new MetadataToken (TokenType.Document);
|
||||
}
|
||||
}
|
||||
|
||||
40
external/cecil/Mono.Cecil.Cil/Symbols.cs
vendored
40
external/cecil/Mono.Cecil.Cil/Symbols.cs
vendored
@@ -761,6 +761,44 @@ namespace Mono.Cecil.Cil {
|
||||
ISymbolReader GetSymbolReader (ModuleDefinition module, Stream symbolStream);
|
||||
}
|
||||
|
||||
#if !NET_CORE
|
||||
[Serializable]
|
||||
#endif
|
||||
public sealed class SymbolsNotFoundException : FileNotFoundException {
|
||||
|
||||
public SymbolsNotFoundException (string message) : base (message)
|
||||
{
|
||||
}
|
||||
|
||||
#if !NET_CORE
|
||||
SymbolsNotFoundException (
|
||||
System.Runtime.Serialization.SerializationInfo info,
|
||||
System.Runtime.Serialization.StreamingContext context)
|
||||
: base (info, context)
|
||||
{
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
#if !NET_CORE
|
||||
[Serializable]
|
||||
#endif
|
||||
public sealed class SymbolsNotMatchingException : InvalidOperationException {
|
||||
|
||||
public SymbolsNotMatchingException (string message) : base (message)
|
||||
{
|
||||
}
|
||||
|
||||
#if !NET_CORE
|
||||
SymbolsNotMatchingException (
|
||||
System.Runtime.Serialization.SerializationInfo info,
|
||||
System.Runtime.Serialization.StreamingContext context)
|
||||
: base (info, context)
|
||||
{
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
public class DefaultSymbolReaderProvider : ISymbolReaderProvider {
|
||||
|
||||
readonly bool throw_if_no_symbol;
|
||||
@@ -810,7 +848,7 @@ namespace Mono.Cecil.Cil {
|
||||
}
|
||||
|
||||
if (throw_if_no_symbol)
|
||||
throw new FileNotFoundException (string.Format ("No symbol found for file: {0}", fileName));
|
||||
throw new SymbolsNotFoundException (string.Format ("No symbol found for file: {0}", fileName));
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user