Exemple #1
0
 public override int GetHashCode()
 {
     unchecked
     {
         return((Asset1.GetHashCode() * 397) ^ Asset2.GetHashCode());
     }
 }
Exemple #2
0
            public static async void TestStaticAsyncMethod3 <T3>(int a1, Asset1 a2, T1 a3, T2 a4, T3 a5)
            {
                TestLog.Write(Events.TestStaticAsyncMethodEnter);

                await Task.Delay(200);

                TestLog.Write(Events.TestStaticAsyncMethodExit);
            }
Exemple #3
0
            public async Task TestAsyncMethod2 <T3>(int a1, Asset1 a2, T1 a3, T2 a4, T3 a5)
            {
                TestLog.Write(Events.TestAsyncMethodEnter);

                await Task.Delay(200);

                TestLog.Write(Events.TestAsyncMethodExit);
            }
Exemple #4
0
        public bool Equals(AssetPair other, bool eitherDirection)
        {
            if (!eitherDirection)
            {
                return(Equals(other));
            }

            return(Equals(other) || (Asset1.Equals(other.Asset2) && Asset2.Equals(other.Asset1)));
        }
Exemple #5
0
            public async void TestAsyncMethod3 <T3>(int a1, Asset1 a2, T1 a3, T2 a4, T3 a5)
                where T3 : class
            {
                TestLog.Write(Events.TestAsyncMethodEnter);

                await Task.Delay(200);

                TestLog.Write(Events.TestAsyncMethodExit);
            }
Exemple #6
0
            public TestClass(
                int a1, Asset1 a2, T1 a3, T2 a4,
                ref int ar1, ref Asset1 ar2, ref T1 ar3, ref T2 ar4,
                out int ao1, out Asset1 ao2, out T1 ao3, out T2 ao4
                )
            {
                TestLog.Write(Events.TestConstructorEnter);

                ao1 = ar1;
                ao2 = ar2;
                ao3 = ar3;
                ao4 = ar4;

                TestLog.Write(Events.TestConstructorExit);
            }
Exemple #7
0
            public static Tuple <int, Asset1, T1, T2, T3> TestStaticMethod <T3>(
                int a1, Asset1 a2, T1 a3, T2 a4, T3 a5,
                ref int ar1, ref Asset1 ar2, ref T1 ar3, ref T2 ar4, ref T3 ar5,
                out int ao1, out Asset1 ao2, out T1 ao3, out T2 ao4, out T3 ao5
                )
            {
                TestLog.Write(Events.TestStaticMethodEnter);

                ao1 = ar1;
                ao2 = ar2;
                ao3 = ar3;
                ao4 = ar4;
                ao5 = ar5;

                TestLog.Write(Events.TestStaticMethodExit);

                return(new Tuple <int, Asset1, T1, T2, T3>(a1, a2, a3, a4, a5));
            }
Exemple #8
0
            public Tuple <int, Asset1, T1, T2, T3> Fact <T3>(
                int a1, Asset1 a2, T1 a3, T2 a4, T3 a5,
                ref int ar1, ref Asset1 ar2, ref T1 ar3, ref T2 ar4, ref T3 ar5,
                out int ao1, out Asset1 ao2, out T1 ao3, out T2 ao4, out T3 ao5
                )
                where T3 : class
            {
                TestLog.Write(Events.FactEnter);

                ao1 = ar1;
                ao2 = ar2;
                ao3 = ar3;
                ao4 = ar4;
                ao5 = ar5;

                TestLog.Write(Events.FactExit);

                return(new Tuple <int, Asset1, T1, T2, T3>(a1, a2, a3, a4, a5));
            }
Exemple #9
0
 public string ToTicker(IDescribesAssets converter, char separator)
 {
     return(separator == '\0' ?
            $"{Asset1.ToRemoteCode(converter)}{Asset2.ToRemoteCode(converter)}" :
            $"{Asset1.ToRemoteCode(converter)}{separator}{Asset2.ToRemoteCode(converter)}");
 }
Exemple #10
0
 public string ToTicker(IDescribesAssets converter, string separator)
 {
     return(separator == string.Empty ?
            ToTicker(converter, '\0') :
            $"{Asset1.ToRemoteCode(converter)}{separator}{Asset2.ToRemoteCode(converter)}");
 }
Exemple #11
0
 public Asset Other(Asset asset)
 {
     return(Asset1.Equals(asset) ? Asset2 : Asset1);
 }
Exemple #12
0
 public bool Has(Asset asset)
 {
     return(Asset1.Equals(asset) || Asset2.Equals(asset));
 }
Exemple #13
0
 public bool Equals(AssetPair other)
 {
     return(Asset1.Equals(other.Asset1) && Asset2.Equals(other.Asset2));
 }
Exemple #14
0
 Tuple <int, Asset1, Asset2, Asset1, T3> IAssetIface1Wrapper <Asset2> .IAssetIface1 <Asset1> .TestMethod <T3>(int a1, Asset1 a2, Asset2 a3, Asset1 a4, T3 a5, ref int ar1, ref Asset1 ar2, ref Asset2 ar3, ref Asset1 ar4, ref T3 ar5, out int ao1, out Asset1 ao2, out Asset2 ao3, out Asset1 ao4, out T3 ao5)
 {
     throw new NotImplementedException();
 }
Exemple #15
0
            public IEnumerable <Tuple <int, Asset1, T1, T2, T3> > TestIteratorMethod <T3>(int a1, Asset1 a2, T1 a3, T2 a4, T3 a5)
            {
                TestLog.Write(Events.TestIteratorMethodEnter);

                for (int i = 0; i < a1; i++)
                {
                    yield return(new Tuple <int, Asset1, T1, T2, T3>(a1, a2, a3, a4, a5));
                }

                TestLog.Write(Events.TestIteratorMethodExit);
            }
Exemple #16
0
            public static async Task <Tuple <int, Asset1, T1, T2, T3> > TestStaticAsyncMethod1 <T3>(int a1, Asset1 a2, T1 a3, T2 a4, T3 a5)
            {
                TestLog.Write(Events.TestStaticAsyncMethodEnter);

                await Task.Delay(200);

                TestLog.Write(Events.TestStaticAsyncMethodExit);

                return(new Tuple <int, Asset1, T1, T2, T3>(a1, a2, a3, a4, a5));
            }