You've already forked linux-packaging-mono
Imported Upstream version 4.8.0.309
Former-commit-id: 5f9c6ae75f295e057a7d2971f3a6df4656fa8850
This commit is contained in:
parent
ee1447783b
commit
94b2861243
152
external/cecil-legacy/Test/Resources/cs/CustomAttributes.cs
vendored
Normal file
152
external/cecil-legacy/Test/Resources/cs/CustomAttributes.cs
vendored
Normal file
@@ -0,0 +1,152 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Runtime.CompilerServices;
|
||||
|
||||
[assembly: Foo ("bingo")]
|
||||
|
||||
[assembly: TypeForwardedTo (typeof (System.Diagnostics.DebuggableAttribute))]
|
||||
|
||||
enum Bingo : short {
|
||||
Fuel = 2,
|
||||
Binga = 4,
|
||||
}
|
||||
|
||||
/*
|
||||
in System.Security.AccessControl
|
||||
|
||||
[Flags]
|
||||
public enum AceFlags : byte {
|
||||
None = 0,
|
||||
ObjectInherit = 0x01,
|
||||
ContainerInherit = 0x02,
|
||||
NoPropagateInherit = 0x04,
|
||||
InheritOnly = 0x08,
|
||||
InheritanceFlags = ObjectInherit | ContainerInherit | NoPropagateInherit | InheritOnly,
|
||||
Inherited = 0x10,
|
||||
SuccessfulAccess = 0x40,
|
||||
FailedAccess = 0x80,
|
||||
AuditFlags = SuccessfulAccess | FailedAccess,
|
||||
}
|
||||
*/
|
||||
|
||||
class FooAttribute : Attribute {
|
||||
|
||||
internal class Token {
|
||||
}
|
||||
|
||||
public FooAttribute ()
|
||||
{
|
||||
}
|
||||
|
||||
public FooAttribute (string str)
|
||||
{
|
||||
}
|
||||
|
||||
public FooAttribute (sbyte a, byte b, bool c, bool d, ushort e, short f, char g)
|
||||
{
|
||||
}
|
||||
|
||||
public FooAttribute (int a, uint b, float c, long d, ulong e, double f)
|
||||
{
|
||||
}
|
||||
|
||||
public FooAttribute (char [] chars)
|
||||
{
|
||||
}
|
||||
|
||||
public FooAttribute (object a, object b)
|
||||
{
|
||||
}
|
||||
|
||||
public FooAttribute (Bingo bingo)
|
||||
{
|
||||
}
|
||||
|
||||
public FooAttribute (System.Security.AccessControl.AceFlags flags)
|
||||
{
|
||||
}
|
||||
|
||||
public FooAttribute (Type type)
|
||||
{
|
||||
}
|
||||
|
||||
public int Bang { get { return 0; } set {} }
|
||||
public string Fiou { get { return "fiou"; } set {} }
|
||||
|
||||
public object Pan;
|
||||
public string [] PanPan;
|
||||
|
||||
public Type Chose;
|
||||
}
|
||||
|
||||
[Foo ("bar")]
|
||||
class Hamster {
|
||||
}
|
||||
|
||||
[Foo ((string) null)]
|
||||
class Dentist {
|
||||
}
|
||||
|
||||
[Foo (-12, 242, true, false, 4242, -1983, 'c')]
|
||||
class Steven {
|
||||
}
|
||||
|
||||
[Foo (-100000, 200000, 12.12f, long.MaxValue, ulong.MaxValue, 64.646464)]
|
||||
class Seagull {
|
||||
}
|
||||
|
||||
[Foo (new char [] { 'c', 'e', 'c', 'i', 'l' })]
|
||||
class Rifle {
|
||||
}
|
||||
|
||||
[Foo ("2", 2)]
|
||||
class Worm {
|
||||
}
|
||||
|
||||
[Foo (new object [] { "2", 2, 'c' }, new object [] { new object [] { 1, 2, 3}, null })]
|
||||
class Sheep {
|
||||
}
|
||||
|
||||
[Foo (Bang = 42, PanPan = new string [] { "yo", "yo" }, Pan = new object [] { 1, "2", '3' }, Fiou = null)]
|
||||
class Angola {
|
||||
}
|
||||
|
||||
[Foo (Pan = "fiouuu")]
|
||||
class BoxedStringField {
|
||||
}
|
||||
|
||||
[Foo (Bingo.Fuel)]
|
||||
class Zero {
|
||||
}
|
||||
|
||||
[Foo (System.Security.AccessControl.AceFlags.NoPropagateInherit)]
|
||||
class Ace {
|
||||
}
|
||||
|
||||
[Foo (new object [] { Bingo.Fuel, Bingo.Binga }, null, Pan = System.Security.AccessControl.AceFlags.NoPropagateInherit)]
|
||||
class Bzzz {
|
||||
}
|
||||
|
||||
[Foo (typeof (Bingo))]
|
||||
class Typed {
|
||||
}
|
||||
|
||||
[Foo (typeof (FooAttribute.Token))]
|
||||
class NestedTyped {
|
||||
}
|
||||
|
||||
[Foo (Chose = typeof (Typed))]
|
||||
class Truc {
|
||||
}
|
||||
|
||||
[Foo (Chose = (Type) null)]
|
||||
class Machin {
|
||||
}
|
||||
|
||||
[Foo (typeof (Dictionary<,>))]
|
||||
class OpenGeneric<X, Y> {
|
||||
}
|
||||
|
||||
[Foo (typeof (Dictionary<string, OpenGeneric<Machin, int>[,]>))]
|
||||
class ClosedGeneric {
|
||||
}
|
8
external/cecil-legacy/Test/Resources/cs/Events.cs
vendored
Normal file
8
external/cecil-legacy/Test/Resources/cs/Events.cs
vendored
Normal file
@@ -0,0 +1,8 @@
|
||||
using System;
|
||||
|
||||
delegate void Pan (object sender, EventArgs args);
|
||||
|
||||
abstract class Foo {
|
||||
|
||||
public abstract event Pan Bar;
|
||||
}
|
41
external/cecil-legacy/Test/Resources/cs/Fields.cs
vendored
Normal file
41
external/cecil-legacy/Test/Resources/cs/Fields.cs
vendored
Normal file
@@ -0,0 +1,41 @@
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
class Foo {
|
||||
Bar bar;
|
||||
}
|
||||
|
||||
class Bar {
|
||||
volatile int oiseau;
|
||||
}
|
||||
|
||||
class Baz {
|
||||
bool @bool;
|
||||
char @char;
|
||||
sbyte @sbyte;
|
||||
byte @byte;
|
||||
short int16;
|
||||
ushort uint16;
|
||||
int int32;
|
||||
uint uint32;
|
||||
long int64;
|
||||
ulong uint64;
|
||||
float single;
|
||||
double @double;
|
||||
string @string;
|
||||
object @object;
|
||||
}
|
||||
|
||||
enum Pim {
|
||||
Pam = 1,
|
||||
Poum = 2,
|
||||
}
|
||||
|
||||
class PanPan {
|
||||
|
||||
public const PanPan Peter = null;
|
||||
public const string QQ = "qq";
|
||||
public const string nil = null;
|
||||
public const object obj = null;
|
||||
public const int [] ints = null;
|
||||
}
|
121
external/cecil-legacy/Test/Resources/cs/Generics.cs
vendored
Normal file
121
external/cecil-legacy/Test/Resources/cs/Generics.cs
vendored
Normal file
@@ -0,0 +1,121 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
class Foo<TBar, TBaz> {}
|
||||
|
||||
abstract class Bar<T> {
|
||||
|
||||
T bang;
|
||||
|
||||
public abstract Bar<T> Self ();
|
||||
|
||||
public abstract Bar<string> SelfString ();
|
||||
}
|
||||
|
||||
abstract class Baz {
|
||||
|
||||
public abstract TBang Gazonk<TBang> (object o);
|
||||
|
||||
public abstract Bar<TBingo> Gazoo<TBingo> ();
|
||||
}
|
||||
|
||||
class Zap {}
|
||||
interface IZoom {}
|
||||
|
||||
class Bongo<T> where T : Zap, IZoom {
|
||||
|
||||
enum Dang {
|
||||
Ding = 2,
|
||||
Dong = 12,
|
||||
}
|
||||
}
|
||||
|
||||
class Parent<T> {}
|
||||
class Child<T> : Parent<T> {
|
||||
public T [] array;
|
||||
}
|
||||
class TamChild : Child<Tamtam> {}
|
||||
class RecChild : Child<RecChild> {}
|
||||
|
||||
class Tamtam {
|
||||
|
||||
static void Foo<TFoo> (TFoo tf)
|
||||
{
|
||||
}
|
||||
|
||||
static void Bar ()
|
||||
{
|
||||
Foo (2);
|
||||
}
|
||||
|
||||
static List<TBeta> Beta<TBeta> ()
|
||||
{
|
||||
return new List<TBeta> ();
|
||||
}
|
||||
|
||||
static List<TCharlie> Charlie<TCharlie> ()
|
||||
{
|
||||
return new List<TCharlie> ();
|
||||
}
|
||||
}
|
||||
|
||||
class It {
|
||||
|
||||
public IEnumerable<Foo<string, string>> Pwow ()
|
||||
{
|
||||
yield return new Foo<string, string> ();
|
||||
yield return new Foo<string, string> ();
|
||||
yield return new Foo<string, string> ();
|
||||
}
|
||||
|
||||
public void ReadPwow ()
|
||||
{
|
||||
foreach (Foo<string, string> foo in Pwow ())
|
||||
Tac (foo);
|
||||
}
|
||||
|
||||
public void Tac<T> (T t)
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
class Duel<T1, T2, T3> where T2 : T1 where T3 : T2 {}
|
||||
|
||||
class ChildReader {
|
||||
|
||||
public int Read (TamChild t)
|
||||
{
|
||||
return t.array.Length;
|
||||
}
|
||||
}
|
||||
|
||||
struct Nilible<T> where T : struct {
|
||||
public T t;
|
||||
}
|
||||
|
||||
class Null {
|
||||
|
||||
public static int Compare<T> (Nilible<T> x, Nilible<T> y) where T : struct
|
||||
{
|
||||
return Comparer<T>.Default.Compare (x.t, y.t);
|
||||
}
|
||||
}
|
||||
|
||||
public class DoubleFuncClass {
|
||||
public void Test () { Test<int> (); Test<int, int> (); }
|
||||
public void Test<T> () { Test<T, int> (); Test<T, T> (); }
|
||||
public void Test<T, T1> () { Test<T1> (); Test<T1, T> (); }
|
||||
}
|
||||
|
||||
public class DoubleFuncClass<X> {
|
||||
public void Test () { Test<int> (); Test<int, int> (); }
|
||||
public void Test<T> () { Test<X, int> (); Test<T, X> (); }
|
||||
public void Test<T, T1> () { Test<T1> (); Test<T1, T> (); }
|
||||
}
|
||||
|
||||
public class LaMatrix {
|
||||
public static T At<T> (T[,] m, int i, int j)
|
||||
{
|
||||
return m [i, j];
|
||||
}
|
||||
}
|
22
external/cecil-legacy/Test/Resources/cs/Interfaces.cs
vendored
Normal file
22
external/cecil-legacy/Test/Resources/cs/Interfaces.cs
vendored
Normal file
@@ -0,0 +1,22 @@
|
||||
using System;
|
||||
|
||||
interface IFoo {}
|
||||
interface IBar : IFoo {}
|
||||
|
||||
abstract class Bar : IBar {}
|
||||
|
||||
interface IBingo {
|
||||
void Foo ();
|
||||
void Bar ();
|
||||
}
|
||||
|
||||
class Bingo : IBingo {
|
||||
|
||||
void IBingo.Foo ()
|
||||
{
|
||||
}
|
||||
|
||||
void IBingo.Bar ()
|
||||
{
|
||||
}
|
||||
}
|
16
external/cecil-legacy/Test/Resources/cs/Layouts.cs
vendored
Normal file
16
external/cecil-legacy/Test/Resources/cs/Layouts.cs
vendored
Normal file
@@ -0,0 +1,16 @@
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
[StructLayout (LayoutKind.Explicit, Size = 16)]
|
||||
public struct Foo {
|
||||
[FieldOffset (0)] public ushort Bar;
|
||||
[FieldOffset (2)] public ushort Baz;
|
||||
[FieldOffset (4)] public uint Gazonk;
|
||||
}
|
||||
|
||||
class Babar {
|
||||
}
|
||||
|
||||
class Locke {
|
||||
public int [] integers = new int [] { 1, 2, 3, 4 };
|
||||
}
|
21
external/cecil-legacy/Test/Resources/cs/Methods.cs
vendored
Normal file
21
external/cecil-legacy/Test/Resources/cs/Methods.cs
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
abstract class Foo {
|
||||
public abstract void Bar (int a);
|
||||
}
|
||||
|
||||
class Bar {
|
||||
|
||||
[DllImport ("foo.dll")]
|
||||
public extern static void Pan ([MarshalAs (UnmanagedType.I4)] int i);
|
||||
}
|
||||
|
||||
public class Baz {
|
||||
|
||||
public void PrintAnswer ()
|
||||
{
|
||||
Console.WriteLine ("answer: {0}", 42);
|
||||
}
|
||||
}
|
||||
|
16
external/cecil-legacy/Test/Resources/cs/NestedTypes.cs
vendored
Normal file
16
external/cecil-legacy/Test/Resources/cs/NestedTypes.cs
vendored
Normal file
@@ -0,0 +1,16 @@
|
||||
class Foo {
|
||||
class Bar {
|
||||
class Baz {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
class Bingo {
|
||||
public class Fuel {
|
||||
}
|
||||
|
||||
public static Fuel GetFuel ()
|
||||
{
|
||||
return null;
|
||||
}
|
||||
}
|
18
external/cecil-legacy/Test/Resources/cs/Properties.cs
vendored
Normal file
18
external/cecil-legacy/Test/Resources/cs/Properties.cs
vendored
Normal file
@@ -0,0 +1,18 @@
|
||||
using System;
|
||||
|
||||
abstract class Foo {
|
||||
|
||||
public abstract int Bar { get; }
|
||||
public abstract string Baz { get; set; }
|
||||
public abstract string Gazonk { set; }
|
||||
}
|
||||
|
||||
abstract class Bar {
|
||||
|
||||
public abstract Foo this [int a, string s] { set; }
|
||||
}
|
||||
|
||||
class Baz {
|
||||
|
||||
public string Bingo { get; set; }
|
||||
}
|
Reference in New Issue
Block a user