Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/cecil.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Mono.Cecil.Cil/Symbols.cs2
-rw-r--r--Mono.Cecil/AssemblyInfo.cs2
-rw-r--r--Mono.Cecil/AssemblyWriter.cs4
-rw-r--r--Mono.Cecil/BaseAssemblyResolver.cs4
-rw-r--r--Mono.Cecil/Import.cs12
-rw-r--r--Mono.Cecil/ModuleDefinition.cs6
-rw-r--r--Mono.Collections.Generic/Collection.cs6
-rw-r--r--Mono.Security.Cryptography/CryptoService.cs8
8 files changed, 29 insertions, 15 deletions
diff --git a/Mono.Cecil.Cil/Symbols.cs b/Mono.Cecil.Cil/Symbols.cs
index 3d822fe..8e668b0 100644
--- a/Mono.Cecil.Cil/Symbols.cs
+++ b/Mono.Cecil.Cil/Symbols.cs
@@ -222,7 +222,9 @@ namespace Mono.Cecil.Cil {
if (assembly != null)
return assembly.GetType (fullname);
} catch (FileNotFoundException) {
+#if !CF
} catch (FileLoadException) {
+#endif
}
return null;
diff --git a/Mono.Cecil/AssemblyInfo.cs b/Mono.Cecil/AssemblyInfo.cs
index a24ebfa..491adc2 100644
--- a/Mono.Cecil/AssemblyInfo.cs
+++ b/Mono.Cecil/AssemblyInfo.cs
@@ -38,8 +38,10 @@ using System.Runtime.InteropServices;
[assembly: Guid ("fd225bb4-fa53-44b2-a6db-85f5e48dcb54")]
+#if !CF
[assembly: AssemblyVersion ("0.9.0.0")]
[assembly: AssemblyFileVersion ("0.9.0.0")]
+#endif
[assembly: InternalsVisibleTo ("Mono.Cecil.Rocks, PublicKey=002400000480000094000000060200000024000052534131000400000100010079159977d2d03a8e6bea7a2e74e8d1afcc93e8851974952bb480a12c9134474d04062447c37e0e68c080536fcf3c3fbe2ff9c979ce998475e506e8ce82dd5b0f350dc10e93bf2eeecf874b24770c5081dbea7447fddafa277b22de47d6ffea449674a4f9fccf84d15069089380284dbdd35f46cdff12a1bd78e4ef0065d016df")]
[assembly: InternalsVisibleTo ("Mono.Cecil.Tests, PublicKey=002400000480000094000000060200000024000052534131000400000100010079159977d2d03a8e6bea7a2e74e8d1afcc93e8851974952bb480a12c9134474d04062447c37e0e68c080536fcf3c3fbe2ff9c979ce998475e506e8ce82dd5b0f350dc10e93bf2eeecf874b24770c5081dbea7447fddafa277b22de47d6ffea449674a4f9fccf84d15069089380284dbdd35f46cdff12a1bd78e4ef0065d016df")]
diff --git a/Mono.Cecil/AssemblyWriter.cs b/Mono.Cecil/AssemblyWriter.cs
index c3445d2..b9e4aa5 100644
--- a/Mono.Cecil/AssemblyWriter.cs
+++ b/Mono.Cecil/AssemblyWriter.cs
@@ -94,7 +94,7 @@ namespace Mono.Cecil {
if (symbol_writer_provider == null && parameters.WriteSymbols)
symbol_writer_provider = SymbolProvider.GetPlatformWriterProvider ();
var symbol_writer = GetSymbolWriter (module, fq_name, symbol_writer_provider);
-#if !SILVERLIGHT
+#if !SILVERLIGHT && !CF
if (parameters.StrongNameKeyPair != null && module.assembly != null) {
var name = module.assembly.Name;
name.PublicKey = parameters.StrongNameKeyPair.PublicKey;
@@ -113,7 +113,7 @@ namespace Mono.Cecil {
writer.WriteImage ();
-#if !SILVERLIGHT
+#if !SILVERLIGHT && !CF
if (parameters.StrongNameKeyPair != null)
CryptoService.StrongName (stream, writer, parameters.StrongNameKeyPair);
#endif
diff --git a/Mono.Cecil/BaseAssemblyResolver.cs b/Mono.Cecil/BaseAssemblyResolver.cs
index bb242b0..73de261 100644
--- a/Mono.Cecil/BaseAssemblyResolver.cs
+++ b/Mono.Cecil/BaseAssemblyResolver.cs
@@ -82,7 +82,7 @@ namespace Mono.Cecil {
if (assembly != null)
return assembly;
-#if !SILVERLIGHT
+#if !SILVERLIGHT && !CF
var framework_dir = Path.GetDirectoryName (typeof (object).Module.FullyQualifiedName);
if (IsZero (name.Version)) {
@@ -128,7 +128,7 @@ namespace Mono.Cecil {
return version.Major == 0 && version.Minor == 0 && version.Build == 0 && version.Revision == 0;
}
-#if !SILVERLIGHT
+#if !SILVERLIGHT && !CF
AssemblyDefinition GetCorlib (AssemblyNameReference reference)
{
var corlib = typeof (object).Assembly.GetName ();
diff --git a/Mono.Cecil/Import.cs b/Mono.Cecil/Import.cs
index 11a5019..772794d 100644
--- a/Mono.Cecil/Import.cs
+++ b/Mono.Cecil/Import.cs
@@ -38,6 +38,12 @@ namespace Mono.Cecil {
readonly ModuleDefinition module;
+ public MetadataImporter (ModuleDefinition module)
+ {
+ this.module = module;
+ }
+
+#if !CF
static readonly Dictionary<Type, ElementType> type_etype_mapping = new Dictionary<Type, ElementType> {
{ typeof (void), ElementType.Void },
{ typeof (bool), ElementType.Boolean },
@@ -59,11 +65,6 @@ namespace Mono.Cecil {
{ typeof (object), ElementType.Object },
};
- public MetadataImporter (ModuleDefinition module)
- {
- this.module = module;
- }
-
public TypeReference ImportType (Type type, IGenericContext context)
{
if (IsTypeSpecification (type))
@@ -296,6 +297,7 @@ namespace Mono.Cecil {
{
return (method.CallingConvention & conventions) != 0;
}
+#endif
static readonly Dictionary<string, ElementType> string_etype_mapping = new Dictionary<string, ElementType> {
{ "Void", ElementType.Void },
diff --git a/Mono.Cecil/ModuleDefinition.cs b/Mono.Cecil/ModuleDefinition.cs
index bb3a92d..cb261ed 100644
--- a/Mono.Cecil/ModuleDefinition.cs
+++ b/Mono.Cecil/ModuleDefinition.cs
@@ -93,7 +93,7 @@ namespace Mono.Cecil {
Stream symbol_stream;
ISymbolWriterProvider symbol_writer_provider;
bool write_symbols;
-#if !SILVERLIGHT
+#if !SILVERLIGHT && !CF
SR.StrongNameKeyPair key_pair;
#endif
public Stream SymbolStream {
@@ -110,7 +110,7 @@ namespace Mono.Cecil {
get { return write_symbols; }
set { write_symbols = value; }
}
-#if !SILVERLIGHT
+#if !SILVERLIGHT && !CF
public SR.StrongNameKeyPair StrongNameKeyPair {
get { return key_pair; }
set { key_pair = value; }
@@ -480,6 +480,7 @@ namespace Mono.Cecil {
throw new ArgumentNullException ("method");
}
+#if !CF
public TypeReference Import (Type type)
{
CheckType (type);
@@ -500,6 +501,7 @@ namespace Mono.Cecil {
return MetadataImporter.ImportMethod (method);
}
+#endif
public TypeReference Import (TypeReference type)
{
diff --git a/Mono.Collections.Generic/Collection.cs b/Mono.Collections.Generic/Collection.cs
index 6cf9b74..7e7f3fe 100644
--- a/Mono.Collections.Generic/Collection.cs
+++ b/Mono.Collections.Generic/Collection.cs
@@ -241,7 +241,13 @@ namespace Mono.Collections.Generic {
System.Math.Max (items.Length * 2, default_capacity),
new_size);
+#if !CF
Array.Resize (ref items, new_size);
+#else
+ var array = new T [new_size];
+ Array.Copy (items, array, size);
+ items = array;
+#endif
}
int IList.Add (object value)
diff --git a/Mono.Security.Cryptography/CryptoService.cs b/Mono.Security.Cryptography/CryptoService.cs
index 12d0d94..df903a3 100644
--- a/Mono.Security.Cryptography/CryptoService.cs
+++ b/Mono.Security.Cryptography/CryptoService.cs
@@ -29,12 +29,12 @@
using System;
using System.IO;
using System.Reflection;
-using System.Runtime.Serialization;
using System.Security.Cryptography;
#if !READ_ONLY
-#if !SILVERLIGHT
+#if !SILVERLIGHT && !CF
+using System.Runtime.Serialization;
using Mono.Security.Cryptography;
#endif
@@ -48,7 +48,7 @@ namespace Mono.Cecil {
static class CryptoService {
-#if !SILVERLIGHT
+#if !SILVERLIGHT && !CF
public static void StrongName (Stream stream, ImageWriter writer, StrongNameKeyPair key_pair)
{
int strong_name_pointer;
@@ -172,7 +172,7 @@ namespace Mono.Cecil {
}
}
-#if !SILVERLIGHT
+#if !SILVERLIGHT && !CF
static partial class Mixin {
public static RSA CreateRSA (this StrongNameKeyPair key_pair)