Example #1
0
        public static IComponent BuildComponent(uint x, uint y, Component.Component component)
        {
            IComponent newComponent;

            switch (component)
            {
                case Component.Component.UranCell:
                    newComponent = new UraninumCell(x, y, component);
                    break;
                case Component.Component.CoolCell:
                    newComponent = new CoolantCell(x, y, component);
                    break;
                case Component.Component.HeatDispenser:
                    newComponent = new HeatDispenser(x, y, component);
                    break;
                case Component.Component.ReactorPlating:
                    newComponent = new ReactorPlating(x, y, component);
                    break;
                case Component.Component.Empty:
                    newComponent = new Empty(x, y, component);
                    break;
                default:
                    throw new ArgumentOutOfRangeException();
            }
            return newComponent;
        }
Example #2
0
        public static void test_empty()
        {
            var context = new Context("abc");
            var empty = new Empty();

            ExecTest(context, empty);
        }
 public ExerciseProcedureOption(XmlNode xmlNode)
 {
     XmlNodeList manualExerciseNodeList = xmlNode.SelectNodes("manualExercise");
     if (manualExerciseNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in manualExerciseNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 manualExerciseIDRef = item.Attributes["id"].Name;
                 Empty ob = Empty();
                 IDManager.SetID(manualExerciseIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 manualExerciseIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 manualExercise = new Empty(item);
             }
         }
     }
     
 
     XmlNodeList automaticExerciseNodeList = xmlNode.SelectNodes("automaticExercise");
     if (automaticExerciseNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in automaticExerciseNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 automaticExerciseIDRef = item.Attributes["id"].Name;
                 Empty ob = Empty();
                 IDManager.SetID(automaticExerciseIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 automaticExerciseIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 automaticExercise = new Empty(item);
             }
         }
     }
     
 
 }
 public ExerciseProcedureOption(XmlNode xmlNode)
 {
     XmlNode manualExerciseNode = xmlNode.SelectSingleNode("manualExercise");
     
     if (manualExerciseNode != null)
     {
         if (manualExerciseNode.Attributes["href"] != null || manualExerciseNode.Attributes["id"] != null) 
         {
             if (manualExerciseNode.Attributes["id"] != null) 
             {
                 manualExerciseIDRef_ = manualExerciseNode.Attributes["id"].Value;
                 Empty ob = new Empty(manualExerciseNode);
                 IDManager.SetID(manualExerciseIDRef_, ob);
             }
             else if (manualExerciseNode.Attributes["href"] != null)
             {
                 manualExerciseIDRef_ = manualExerciseNode.Attributes["href"].Value;
             }
             else
             {
                 manualExercise_ = new Empty(manualExerciseNode);
             }
         }
         else
         {
             manualExercise_ = new Empty(manualExerciseNode);
         }
     }
     
 
     XmlNode automaticExerciseNode = xmlNode.SelectSingleNode("automaticExercise");
     
     if (automaticExerciseNode != null)
     {
         if (automaticExerciseNode.Attributes["href"] != null || automaticExerciseNode.Attributes["id"] != null) 
         {
             if (automaticExerciseNode.Attributes["id"] != null) 
             {
                 automaticExerciseIDRef_ = automaticExerciseNode.Attributes["id"].Value;
                 Empty ob = new Empty(automaticExerciseNode);
                 IDManager.SetID(automaticExerciseIDRef_, ob);
             }
             else if (automaticExerciseNode.Attributes["href"] != null)
             {
                 automaticExerciseIDRef_ = automaticExerciseNode.Attributes["href"].Value;
             }
             else
             {
                 automaticExercise_ = new Empty(automaticExerciseNode);
             }
         }
         else
         {
             automaticExercise_ = new Empty(automaticExerciseNode);
         }
     }
     
 
 }
Example #5
0
 public void Test()
 {
     Utilities.Validation.Rules.Empty<ClassC, string> TestObject = new Empty<ClassC, string>(x => x.ItemA, "Error");
     ClassC Temp = new ClassC();
     Temp.ItemA = new List<string>();
     Temp.ItemA.Add("A");
     Temp.ItemA.Add("B");
     Assert.Throws<NotValid>(() => TestObject.Validate(Temp));
     Temp.ItemA.Clear();
     Assert.DoesNotThrow<NotValid>(() => TestObject.Validate(Temp));
 }
Example #6
0
        public Field(int width = 80, int height = 25)
        {
            Width = width;
            Height = height;

            Tiles = new Tile[width, height];

            for(var w = 0; w < Width; w++)
            {
                for (var h = 0; h < Height; h++)
                {
                    Tile tile;

                    if(w == 0 || w == Width - 1 || h == 0 || h == Height - 1)
                        tile = new Empty();
                    else if (w == 1 || w == Width - 2 || h == 1 || h == Height - 2)
                        tile = new Wall { Glyph = "#" };
                    else
                        tile = new Ground();

                    Tiles[w, h] = tile;
                }
            }
        }
 private void DamageFx(Empty empty)
 {
     damageFx.GetComponent <ParticleSystem>().Play();
 }
Example #8
0
    public bool NegTest1()
    {
        bool retVal = true;

        TestLibrary.TestFramework.BeginScenario("NegTest1: Get hash code for an empty struct");

        try
        {
            Empty test = new Empty();
            Empty test1 = new Empty();

            if (test.GetHashCode() != test1.GetHashCode())
            {
                TestLibrary.TestFramework.LogError("101", "Hash code for two Empty struct instances does not equal");
                retVal = false;
            }
        }
        catch (Exception e)
        {
            TestLibrary.TestFramework.LogError("102", "Unexpected exception: " + e);
            TestLibrary.TestFramework.LogInformation(e.StackTrace);
            retVal = false;
        }

        return retVal;
    }
 /// <inheritdoc />
 internal override Task <TrafficResult> InterPreCall(Empty context)
 {
     return(Task.FromResult(new TrafficResult(SignalFlag.Green_Pass, string.Empty, string.Empty)));
 }
Example #10
0
 public override TokenInfo GetNativeTokenInfo(Empty input)
 {
     return(State.TokenInfos[State.NativeTokenSymbol.Value]);
 }
Example #11
0
 public override AddressList GetDeployedContractAddressList(Empty input)
 {
     return(State.DeployedContractAddressList.Value);
 }
Example #12
0
 public override Empty Quit(Empty input)
 {
     State.PlayerInformation.Remove(Context.Sender);
     return(new Empty());
 }
 public FallbackReferencePrice(XmlNode xmlNode)
 {
     XmlNodeList valuationPostponementNodeList = xmlNode.SelectNodes("valuationPostponement");
     if (valuationPostponementNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in valuationPostponementNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 valuationPostponementIDRef = item.Attributes["id"].Name;
                 ValuationPostponement ob = ValuationPostponement();
                 IDManager.SetID(valuationPostponementIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 valuationPostponementIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 valuationPostponement = new ValuationPostponement(item);
             }
         }
     }
     
 
     XmlNodeList fallbackSettlementRateOptionNodeList = xmlNode.SelectNodes("fallbackSettlementRateOption");
     
     foreach (XmlNode item in fallbackSettlementRateOptionNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 fallbackSettlementRateOptionIDRef = item.Attributes["id"].Name;
                 List<SettlementRateOption> ob = new List<SettlementRateOption>();
                 ob.Add(new SettlementRateOption(item));
                 IDManager.SetID(fallbackSettlementRateOptionIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 fallbackSettlementRateOptionIDRef = item.Attributes["href"].Name;
             }
             else
             {
             fallbackSettlementRateOption.Add(new SettlementRateOption(item));
             }
         }
     }
     
 
     XmlNodeList fallbackSurveyValuationPostponenmentNodeList = xmlNode.SelectNodes("fallbackSurveyValuationPostponenment");
     if (fallbackSurveyValuationPostponenmentNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in fallbackSurveyValuationPostponenmentNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 fallbackSurveyValuationPostponenmentIDRef = item.Attributes["id"].Name;
                 Empty ob = Empty();
                 IDManager.SetID(fallbackSurveyValuationPostponenmentIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 fallbackSurveyValuationPostponenmentIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 fallbackSurveyValuationPostponenment = new Empty(item);
             }
         }
     }
     
 
     XmlNodeList calculationAgentDeterminationNodeList = xmlNode.SelectNodes("calculationAgentDetermination");
     if (calculationAgentDeterminationNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in calculationAgentDeterminationNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 calculationAgentDeterminationIDRef = item.Attributes["id"].Name;
                 CalculationAgent ob = CalculationAgent();
                 IDManager.SetID(calculationAgentDeterminationIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 calculationAgentDeterminationIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 calculationAgentDetermination = new CalculationAgent(item);
             }
         }
     }
     
 
 }
Example #14
0
        public void Move(Scene scene)
        {
            if (isRunning)
            {
                Block nextBlock = Next(scene);
                if (nextBlock.IsEatable() && nextBlock.IsReachable())
                {
                    eatBean = true;
                    //将pacman所在块清空
                    scene[r, c] = new Empty(r, c);
                    //pacman移动到下一位置
                    this.r = nextBlock.R;
                    this.c = nextBlock.C;
                    //下一位置置为空块
                    scene[r, c] = new Empty(r, c);
                    //吃金豆,并加分
                    scene.BeanNum--;
                    scene.Score += 10;

                }
                else if (nextBlock.IsReachable())
                {
                    this.r = nextBlock.R;
                    this.c = nextBlock.C;
                }
                else
                {
                    isRunning = false;
                }
            }
        }
Example #15
0
 public void OnUserLoggedOut(Empty empty)
 {
 }
 public void Read(TProtocol iprot)
 {
     TField field;
     iprot.ReadStructBegin();
     while (true)
     {
         field = iprot.ReadFieldBegin();
         if (field.Type == TType.Stop) { 
             break;
         }
         switch (field.ID)
         {
             case 1:
                 if (field.Type == TType.Byte) {
                     AByte = iprot.ReadByte();
                 } else {
                     TProtocolUtil.Skip(iprot, field.Type);
                 }
                 break;
             case 2:
                 if (field.Type == TType.I16) {
                     AI16 = iprot.ReadI16();
                 } else {
                     TProtocolUtil.Skip(iprot, field.Type);
                 }
                 break;
             case 3:
                 if (field.Type == TType.I32) {
                     AI32 = iprot.ReadI32();
                 } else {
                     TProtocolUtil.Skip(iprot, field.Type);
                 }
                 break;
             case 4:
                 if (field.Type == TType.I64) {
                     AI64 = iprot.ReadI64();
                 } else {
                     TProtocolUtil.Skip(iprot, field.Type);
                 }
                 break;
             case 5:
                 if (field.Type == TType.Double) {
                     ADouble = iprot.ReadDouble();
                 } else {
                     TProtocolUtil.Skip(iprot, field.Type);
                 }
                 break;
             case 6:
                 if (field.Type == TType.String) {
                     AString = iprot.ReadString();
                 } else {
                     TProtocolUtil.Skip(iprot, field.Type);
                 }
                 break;
             case 7:
                 if (field.Type == TType.String) {
                     ABinary = iprot.ReadBinary();
                 } else {
                     TProtocolUtil.Skip(iprot, field.Type);
                 }
                 break;
             case 8:
                 if (field.Type == TType.Bool) {
                     TrueField = iprot.ReadBool();
                 } else {
                     TProtocolUtil.Skip(iprot, field.Type);
                 }
                 break;
             case 9:
                 if (field.Type == TType.Bool) {
                     FalseField = iprot.ReadBool();
                 } else {
                     TProtocolUtil.Skip(iprot, field.Type);
                 }
                 break;
             case 10:
                 if (field.Type == TType.Struct) {
                     EmptyStructField = new Empty();
                     EmptyStructField.Read(iprot);
                 } else {
                     TProtocolUtil.Skip(iprot, field.Type);
                 }
                 break;
             case 11:
                 if (field.Type == TType.List) {
                     {
                         ByteList = new List<sbyte?>();
                         TList _list0 = iprot.ReadListBegin();
                         for(int _i1 = 0; _i1 < _list0.Count; ++_i1)
                         {
                             sbyte? _elem2 = 0;
                             _elem2 = iprot.ReadByte();
                             ByteList.Add(_elem2);
                         }
                         iprot.ReadListEnd();
                     }
                 } else {
                     TProtocolUtil.Skip(iprot, field.Type);
                 }
                 break;
             case 12:
                 if (field.Type == TType.List) {
                     {
                         I16List = new List<short?>();
                         TList _list3 = iprot.ReadListBegin();
                         for(int _i4 = 0; _i4 < _list3.Count; ++_i4)
                         {
                             short? _elem5 = 0;
                             _elem5 = iprot.ReadI16();
                             I16List.Add(_elem5);
                         }
                         iprot.ReadListEnd();
                     }
                 } else {
                     TProtocolUtil.Skip(iprot, field.Type);
                 }
                 break;
             case 13:
                 if (field.Type == TType.List) {
                     {
                         I32List = new List<int?>();
                         TList _list6 = iprot.ReadListBegin();
                         for(int _i7 = 0; _i7 < _list6.Count; ++_i7)
                         {
                             int? _elem8 = 0;
                             _elem8 = iprot.ReadI32();
                             I32List.Add(_elem8);
                         }
                         iprot.ReadListEnd();
                     }
                 } else {
                     TProtocolUtil.Skip(iprot, field.Type);
                 }
                 break;
             case 14:
                 if (field.Type == TType.List) {
                     {
                         I64List = new List<long?>();
                         TList _list9 = iprot.ReadListBegin();
                         for(int _i10 = 0; _i10 < _list9.Count; ++_i10)
                         {
                             long? _elem11 = 0;
                             _elem11 = iprot.ReadI64();
                             I64List.Add(_elem11);
                         }
                         iprot.ReadListEnd();
                     }
                 } else {
                     TProtocolUtil.Skip(iprot, field.Type);
                 }
                 break;
             case 15:
                 if (field.Type == TType.List) {
                     {
                         DoubleList = new List<double?>();
                         TList _list12 = iprot.ReadListBegin();
                         for(int _i13 = 0; _i13 < _list12.Count; ++_i13)
                         {
                             double? _elem14 = (double)0;
                             _elem14 = iprot.ReadDouble();
                             DoubleList.Add(_elem14);
                         }
                         iprot.ReadListEnd();
                     }
                 } else {
                     TProtocolUtil.Skip(iprot, field.Type);
                 }
                 break;
             case 16:
                 if (field.Type == TType.List) {
                     {
                         StringList = new List<string>();
                         TList _list15 = iprot.ReadListBegin();
                         for(int _i16 = 0; _i16 < _list15.Count; ++_i16)
                         {
                             string _elem17 = null;
                             _elem17 = iprot.ReadString();
                             StringList.Add(_elem17);
                         }
                         iprot.ReadListEnd();
                     }
                 } else {
                     TProtocolUtil.Skip(iprot, field.Type);
                 }
                 break;
             case 17:
                 if (field.Type == TType.List) {
                     {
                         BinaryList = new List<byte[]>();
                         TList _list18 = iprot.ReadListBegin();
                         for(int _i19 = 0; _i19 < _list18.Count; ++_i19)
                         {
                             byte[] _elem20;
                             _elem20 = iprot.ReadBinary();
                             BinaryList.Add(_elem20);
                         }
                         iprot.ReadListEnd();
                     }
                 } else {
                     TProtocolUtil.Skip(iprot, field.Type);
                 }
                 break;
             case 18:
                 if (field.Type == TType.List) {
                     {
                         BooleanList = new List<bool?>();
                         TList _list21 = iprot.ReadListBegin();
                         for(int _i22 = 0; _i22 < _list21.Count; ++_i22)
                         {
                             bool? _elem23 = false;
                             _elem23 = iprot.ReadBool();
                             BooleanList.Add(_elem23);
                         }
                         iprot.ReadListEnd();
                     }
                 } else {
                     TProtocolUtil.Skip(iprot, field.Type);
                 }
                 break;
             case 19:
                 if (field.Type == TType.List) {
                     {
                         StructList = new List<Empty>();
                         TList _list24 = iprot.ReadListBegin();
                         for(int _i25 = 0; _i25 < _list24.Count; ++_i25)
                         {
                             Empty _elem26 = new Empty();
                             _elem26 = new Empty();
                             _elem26.Read(iprot);
                             StructList.Add(_elem26);
                         }
                         iprot.ReadListEnd();
                     }
                 } else {
                     TProtocolUtil.Skip(iprot, field.Type);
                 }
                 break;
             case 20:
                 if (field.Type == TType.Set) {
                     {
                         ByteSet = new HashSet<sbyte?>();
                         TSet _set27 = iprot.ReadSetBegin();
                         for(int _i28 = 0; _i28 < _set27.Count; ++_i28)
                         {
                             sbyte? _elem29 = 0;
                             _elem29 = iprot.ReadByte();
                             ByteSet.Add(_elem29);
                         }
                         iprot.ReadSetEnd();
                     }
                 } else {
                     TProtocolUtil.Skip(iprot, field.Type);
                 }
                 break;
             case 21:
                 if (field.Type == TType.Set) {
                     {
                         I16Set = new HashSet<short?>();
                         TSet _set30 = iprot.ReadSetBegin();
                         for(int _i31 = 0; _i31 < _set30.Count; ++_i31)
                         {
                             short? _elem32 = 0;
                             _elem32 = iprot.ReadI16();
                             I16Set.Add(_elem32);
                         }
                         iprot.ReadSetEnd();
                     }
                 } else {
                     TProtocolUtil.Skip(iprot, field.Type);
                 }
                 break;
             case 22:
                 if (field.Type == TType.Set) {
                     {
                         I32Set = new HashSet<int?>();
                         TSet _set33 = iprot.ReadSetBegin();
                         for(int _i34 = 0; _i34 < _set33.Count; ++_i34)
                         {
                             int? _elem35 = 0;
                             _elem35 = iprot.ReadI32();
                             I32Set.Add(_elem35);
                         }
                         iprot.ReadSetEnd();
                     }
                 } else {
                     TProtocolUtil.Skip(iprot, field.Type);
                 }
                 break;
             case 23:
                 if (field.Type == TType.Set) {
                     {
                         I64Set = new HashSet<long?>();
                         TSet _set36 = iprot.ReadSetBegin();
                         for(int _i37 = 0; _i37 < _set36.Count; ++_i37)
                         {
                             long? _elem38 = 0;
                             _elem38 = iprot.ReadI64();
                             I64Set.Add(_elem38);
                         }
                         iprot.ReadSetEnd();
                     }
                 } else {
                     TProtocolUtil.Skip(iprot, field.Type);
                 }
                 break;
             case 24:
                 if (field.Type == TType.Set) {
                     {
                         DoubleSet = new HashSet<double?>();
                         TSet _set39 = iprot.ReadSetBegin();
                         for(int _i40 = 0; _i40 < _set39.Count; ++_i40)
                         {
                             double? _elem41 = (double)0;
                             _elem41 = iprot.ReadDouble();
                             DoubleSet.Add(_elem41);
                         }
                         iprot.ReadSetEnd();
                     }
                 } else {
                     TProtocolUtil.Skip(iprot, field.Type);
                 }
                 break;
             case 25:
                 if (field.Type == TType.Set) {
                     {
                         StringSet = new HashSet<string>();
                         TSet _set42 = iprot.ReadSetBegin();
                         for(int _i43 = 0; _i43 < _set42.Count; ++_i43)
                         {
                             string _elem44 = null;
                             _elem44 = iprot.ReadString();
                             StringSet.Add(_elem44);
                         }
                         iprot.ReadSetEnd();
                     }
                 } else {
                     TProtocolUtil.Skip(iprot, field.Type);
                 }
                 break;
             case 26:
                 if (field.Type == TType.Set) {
                     {
                         BinarySet = new HashSet<byte[]>();
                         TSet _set45 = iprot.ReadSetBegin();
                         for(int _i46 = 0; _i46 < _set45.Count; ++_i46)
                         {
                             byte[] _elem47;
                             _elem47 = iprot.ReadBinary();
                             BinarySet.Add(_elem47);
                         }
                         iprot.ReadSetEnd();
                     }
                 } else {
                     TProtocolUtil.Skip(iprot, field.Type);
                 }
                 break;
             case 27:
                 if (field.Type == TType.Set) {
                     {
                         BooleanSet = new HashSet<bool?>();
                         TSet _set48 = iprot.ReadSetBegin();
                         for(int _i49 = 0; _i49 < _set48.Count; ++_i49)
                         {
                             bool? _elem50 = false;
                             _elem50 = iprot.ReadBool();
                             BooleanSet.Add(_elem50);
                         }
                         iprot.ReadSetEnd();
                     }
                 } else {
                     TProtocolUtil.Skip(iprot, field.Type);
                 }
                 break;
             case 28:
                 if (field.Type == TType.Set) {
                     {
                         StructSet = new HashSet<Empty>();
                         TSet _set51 = iprot.ReadSetBegin();
                         for(int _i52 = 0; _i52 < _set51.Count; ++_i52)
                         {
                             Empty _elem53 = new Empty();
                             _elem53 = new Empty();
                             _elem53.Read(iprot);
                             StructSet.Add(_elem53);
                         }
                         iprot.ReadSetEnd();
                     }
                 } else {
                     TProtocolUtil.Skip(iprot, field.Type);
                 }
                 break;
             case 29:
                 if (field.Type == TType.Map) {
                     {
                         ByteByteMap = new Dictionary<sbyte?, sbyte?>();
                         TMap _map54 = iprot.ReadMapBegin();
                         for(int _i55 = 0; _i55 < _map54.Count; ++_i55)
                         {
                             sbyte? _key56;
                             sbyte? _val57;
                             _key56 = iprot.ReadByte();
                             _val57 = iprot.ReadByte();
                             ByteByteMap[_key56] = _val57;
                         }
                         iprot.ReadMapEnd();
                     }
                 } else {
                     TProtocolUtil.Skip(iprot, field.Type);
                 }
                 break;
             case 30:
                 if (field.Type == TType.Map) {
                     {
                         I16ByteMap = new Dictionary<short?, sbyte?>();
                         TMap _map58 = iprot.ReadMapBegin();
                         for(int _i59 = 0; _i59 < _map58.Count; ++_i59)
                         {
                             short? _key60;
                             sbyte? _val61;
                             _key60 = iprot.ReadI16();
                             _val61 = iprot.ReadByte();
                             I16ByteMap[_key60] = _val61;
                         }
                         iprot.ReadMapEnd();
                     }
                 } else {
                     TProtocolUtil.Skip(iprot, field.Type);
                 }
                 break;
             case 31:
                 if (field.Type == TType.Map) {
                     {
                         I32ByteMap = new Dictionary<int?, sbyte?>();
                         TMap _map62 = iprot.ReadMapBegin();
                         for(int _i63 = 0; _i63 < _map62.Count; ++_i63)
                         {
                             int? _key64;
                             sbyte? _val65;
                             _key64 = iprot.ReadI32();
                             _val65 = iprot.ReadByte();
                             I32ByteMap[_key64] = _val65;
                         }
                         iprot.ReadMapEnd();
                     }
                 } else {
                     TProtocolUtil.Skip(iprot, field.Type);
                 }
                 break;
             case 32:
                 if (field.Type == TType.Map) {
                     {
                         I64ByteMap = new Dictionary<long?, sbyte?>();
                         TMap _map66 = iprot.ReadMapBegin();
                         for(int _i67 = 0; _i67 < _map66.Count; ++_i67)
                         {
                             long? _key68;
                             sbyte? _val69;
                             _key68 = iprot.ReadI64();
                             _val69 = iprot.ReadByte();
                             I64ByteMap[_key68] = _val69;
                         }
                         iprot.ReadMapEnd();
                     }
                 } else {
                     TProtocolUtil.Skip(iprot, field.Type);
                 }
                 break;
             case 33:
                 if (field.Type == TType.Map) {
                     {
                         DoubleByteMap = new Dictionary<double?, sbyte?>();
                         TMap _map70 = iprot.ReadMapBegin();
                         for(int _i71 = 0; _i71 < _map70.Count; ++_i71)
                         {
                             double? _key72;
                             sbyte? _val73;
                             _key72 = iprot.ReadDouble();
                             _val73 = iprot.ReadByte();
                             DoubleByteMap[_key72] = _val73;
                         }
                         iprot.ReadMapEnd();
                     }
                 } else {
                     TProtocolUtil.Skip(iprot, field.Type);
                 }
                 break;
             case 34:
                 if (field.Type == TType.Map) {
                     {
                         StringByteMap = new Dictionary<string, sbyte?>();
                         TMap _map74 = iprot.ReadMapBegin();
                         for(int _i75 = 0; _i75 < _map74.Count; ++_i75)
                         {
                             string _key76;
                             sbyte? _val77;
                             _key76 = iprot.ReadString();
                             _val77 = iprot.ReadByte();
                             StringByteMap[_key76] = _val77;
                         }
                         iprot.ReadMapEnd();
                     }
                 } else {
                     TProtocolUtil.Skip(iprot, field.Type);
                 }
                 break;
             case 35:
                 if (field.Type == TType.Map) {
                     {
                         BinaryByteMap = new Dictionary<byte[], sbyte?>();
                         TMap _map78 = iprot.ReadMapBegin();
                         for(int _i79 = 0; _i79 < _map78.Count; ++_i79)
                         {
                             byte[] _key80;
                             sbyte? _val81;
                             _key80 = iprot.ReadBinary();
                             _val81 = iprot.ReadByte();
                             BinaryByteMap[_key80] = _val81;
                         }
                         iprot.ReadMapEnd();
                     }
                 } else {
                     TProtocolUtil.Skip(iprot, field.Type);
                 }
                 break;
             case 36:
                 if (field.Type == TType.Map) {
                     {
                         BooleanByteMap = new Dictionary<bool?, sbyte?>();
                         TMap _map82 = iprot.ReadMapBegin();
                         for(int _i83 = 0; _i83 < _map82.Count; ++_i83)
                         {
                             bool? _key84;
                             sbyte? _val85;
                             _key84 = iprot.ReadBool();
                             _val85 = iprot.ReadByte();
                             BooleanByteMap[_key84] = _val85;
                         }
                         iprot.ReadMapEnd();
                     }
                 } else {
                     TProtocolUtil.Skip(iprot, field.Type);
                 }
                 break;
             case 37:
                 if (field.Type == TType.Map) {
                     {
                         ByteI16Map = new Dictionary<sbyte?, short?>();
                         TMap _map86 = iprot.ReadMapBegin();
                         for(int _i87 = 0; _i87 < _map86.Count; ++_i87)
                         {
                             sbyte? _key88;
                             short? _val89;
                             _key88 = iprot.ReadByte();
                             _val89 = iprot.ReadI16();
                             ByteI16Map[_key88] = _val89;
                         }
                         iprot.ReadMapEnd();
                     }
                 } else {
                     TProtocolUtil.Skip(iprot, field.Type);
                 }
                 break;
             case 38:
                 if (field.Type == TType.Map) {
                     {
                         ByteI32Map = new Dictionary<sbyte?, int?>();
                         TMap _map90 = iprot.ReadMapBegin();
                         for(int _i91 = 0; _i91 < _map90.Count; ++_i91)
                         {
                             sbyte? _key92;
                             int? _val93;
                             _key92 = iprot.ReadByte();
                             _val93 = iprot.ReadI32();
                             ByteI32Map[_key92] = _val93;
                         }
                         iprot.ReadMapEnd();
                     }
                 } else {
                     TProtocolUtil.Skip(iprot, field.Type);
                 }
                 break;
             case 39:
                 if (field.Type == TType.Map) {
                     {
                         ByteI64Map = new Dictionary<sbyte?, long?>();
                         TMap _map94 = iprot.ReadMapBegin();
                         for(int _i95 = 0; _i95 < _map94.Count; ++_i95)
                         {
                             sbyte? _key96;
                             long? _val97;
                             _key96 = iprot.ReadByte();
                             _val97 = iprot.ReadI64();
                             ByteI64Map[_key96] = _val97;
                         }
                         iprot.ReadMapEnd();
                     }
                 } else {
                     TProtocolUtil.Skip(iprot, field.Type);
                 }
                 break;
             case 40:
                 if (field.Type == TType.Map) {
                     {
                         ByteDoubleMap = new Dictionary<sbyte?, double?>();
                         TMap _map98 = iprot.ReadMapBegin();
                         for(int _i99 = 0; _i99 < _map98.Count; ++_i99)
                         {
                             sbyte? _key100;
                             double? _val101;
                             _key100 = iprot.ReadByte();
                             _val101 = iprot.ReadDouble();
                             ByteDoubleMap[_key100] = _val101;
                         }
                         iprot.ReadMapEnd();
                     }
                 } else {
                     TProtocolUtil.Skip(iprot, field.Type);
                 }
                 break;
             case 41:
                 if (field.Type == TType.Map) {
                     {
                         ByteStringMap = new Dictionary<sbyte?, string>();
                         TMap _map102 = iprot.ReadMapBegin();
                         for(int _i103 = 0; _i103 < _map102.Count; ++_i103)
                         {
                             sbyte? _key104;
                             string _val105;
                             _key104 = iprot.ReadByte();
                             _val105 = iprot.ReadString();
                             ByteStringMap[_key104] = _val105;
                         }
                         iprot.ReadMapEnd();
                     }
                 } else {
                     TProtocolUtil.Skip(iprot, field.Type);
                 }
                 break;
             case 42:
                 if (field.Type == TType.Map) {
                     {
                         ByteBinaryMap = new Dictionary<sbyte?, byte[]>();
                         TMap _map106 = iprot.ReadMapBegin();
                         for(int _i107 = 0; _i107 < _map106.Count; ++_i107)
                         {
                             sbyte? _key108;
                             byte[] _val109;
                             _key108 = iprot.ReadByte();
                             _val109 = iprot.ReadBinary();
                             ByteBinaryMap[_key108] = _val109;
                         }
                         iprot.ReadMapEnd();
                     }
                 } else {
                     TProtocolUtil.Skip(iprot, field.Type);
                 }
                 break;
             case 43:
                 if (field.Type == TType.Map) {
                     {
                         ByteBooleanMap = new Dictionary<sbyte?, bool?>();
                         TMap _map110 = iprot.ReadMapBegin();
                         for(int _i111 = 0; _i111 < _map110.Count; ++_i111)
                         {
                             sbyte? _key112;
                             bool? _val113;
                             _key112 = iprot.ReadByte();
                             _val113 = iprot.ReadBool();
                             ByteBooleanMap[_key112] = _val113;
                         }
                         iprot.ReadMapEnd();
                     }
                 } else {
                     TProtocolUtil.Skip(iprot, field.Type);
                 }
                 break;
             case 44:
                 if (field.Type == TType.Map) {
                     {
                         ListByteMap = new Dictionary<List<sbyte?>, sbyte?>();
                         TMap _map114 = iprot.ReadMapBegin();
                         for(int _i115 = 0; _i115 < _map114.Count; ++_i115)
                         {
                             List<sbyte?> _key116;
                             sbyte? _val117;
                             {
                                 _key116 = new List<sbyte?>();
                                 TList _list118 = iprot.ReadListBegin();
                                 for(int _i119 = 0; _i119 < _list118.Count; ++_i119)
                                 {
                                     sbyte? _elem120 = 0;
                                     _elem120 = iprot.ReadByte();
                                     _key116.Add(_elem120);
                                 }
                                 iprot.ReadListEnd();
                             }
                             _val117 = iprot.ReadByte();
                             ListByteMap[_key116] = _val117;
                         }
                         iprot.ReadMapEnd();
                     }
                 } else {
                     TProtocolUtil.Skip(iprot, field.Type);
                 }
                 break;
             case 45:
                 if (field.Type == TType.Map) {
                     {
                         SetByteMap = new Dictionary<HashSet<sbyte?>, sbyte?>();
                         TMap _map121 = iprot.ReadMapBegin();
                         for(int _i122 = 0; _i122 < _map121.Count; ++_i122)
                         {
                             HashSet<sbyte?> _key123;
                             sbyte? _val124;
                             {
                                 _key123 = new HashSet<sbyte?>();
                                 TSet _set125 = iprot.ReadSetBegin();
                                 for(int _i126 = 0; _i126 < _set125.Count; ++_i126)
                                 {
                                     sbyte? _elem127 = 0;
                                     _elem127 = iprot.ReadByte();
                                     _key123.Add(_elem127);
                                 }
                                 iprot.ReadSetEnd();
                             }
                             _val124 = iprot.ReadByte();
                             SetByteMap[_key123] = _val124;
                         }
                         iprot.ReadMapEnd();
                     }
                 } else {
                     TProtocolUtil.Skip(iprot, field.Type);
                 }
                 break;
             case 46:
                 if (field.Type == TType.Map) {
                     {
                         MapByteMap = new Dictionary<Dictionary<sbyte?, sbyte?>, sbyte?>();
                         TMap _map128 = iprot.ReadMapBegin();
                         for(int _i129 = 0; _i129 < _map128.Count; ++_i129)
                         {
                             Dictionary<sbyte?, sbyte?> _key130;
                             sbyte? _val131;
                             {
                                 _key130 = new Dictionary<sbyte?, sbyte?>();
                                 TMap _map132 = iprot.ReadMapBegin();
                                 for(int _i133 = 0; _i133 < _map132.Count; ++_i133)
                                 {
                                     sbyte? _key134;
                                     sbyte? _val135;
                                     _key134 = iprot.ReadByte();
                                     _val135 = iprot.ReadByte();
                                     _key130[_key134] = _val135;
                                 }
                                 iprot.ReadMapEnd();
                             }
                             _val131 = iprot.ReadByte();
                             MapByteMap[_key130] = _val131;
                         }
                         iprot.ReadMapEnd();
                     }
                 } else {
                     TProtocolUtil.Skip(iprot, field.Type);
                 }
                 break;
             case 47:
                 if (field.Type == TType.Map) {
                     {
                         ByteMapMap = new Dictionary<sbyte?, Dictionary<sbyte?, sbyte?>>();
                         TMap _map136 = iprot.ReadMapBegin();
                         for(int _i137 = 0; _i137 < _map136.Count; ++_i137)
                         {
                             sbyte? _key138;
                             Dictionary<sbyte?, sbyte?> _val139;
                             _key138 = iprot.ReadByte();
                             {
                                 _val139 = new Dictionary<sbyte?, sbyte?>();
                                 TMap _map140 = iprot.ReadMapBegin();
                                 for(int _i141 = 0; _i141 < _map140.Count; ++_i141)
                                 {
                                     sbyte? _key142;
                                     sbyte? _val143;
                                     _key142 = iprot.ReadByte();
                                     _val143 = iprot.ReadByte();
                                     _val139[_key142] = _val143;
                                 }
                                 iprot.ReadMapEnd();
                             }
                             ByteMapMap[_key138] = _val139;
                         }
                         iprot.ReadMapEnd();
                     }
                 } else {
                     TProtocolUtil.Skip(iprot, field.Type);
                 }
                 break;
             case 48:
                 if (field.Type == TType.Map) {
                     {
                         ByteSetMap = new Dictionary<sbyte?, HashSet<sbyte?>>();
                         TMap _map144 = iprot.ReadMapBegin();
                         for(int _i145 = 0; _i145 < _map144.Count; ++_i145)
                         {
                             sbyte? _key146;
                             HashSet<sbyte?> _val147;
                             _key146 = iprot.ReadByte();
                             {
                                 _val147 = new HashSet<sbyte?>();
                                 TSet _set148 = iprot.ReadSetBegin();
                                 for(int _i149 = 0; _i149 < _set148.Count; ++_i149)
                                 {
                                     sbyte? _elem150 = 0;
                                     _elem150 = iprot.ReadByte();
                                     _val147.Add(_elem150);
                                 }
                                 iprot.ReadSetEnd();
                             }
                             ByteSetMap[_key146] = _val147;
                         }
                         iprot.ReadMapEnd();
                     }
                 } else {
                     TProtocolUtil.Skip(iprot, field.Type);
                 }
                 break;
             case 49:
                 if (field.Type == TType.Map) {
                     {
                         ByteListMap = new Dictionary<sbyte?, List<sbyte?>>();
                         TMap _map151 = iprot.ReadMapBegin();
                         for(int _i152 = 0; _i152 < _map151.Count; ++_i152)
                         {
                             sbyte? _key153;
                             List<sbyte?> _val154;
                             _key153 = iprot.ReadByte();
                             {
                                 _val154 = new List<sbyte?>();
                                 TList _list155 = iprot.ReadListBegin();
                                 for(int _i156 = 0; _i156 < _list155.Count; ++_i156)
                                 {
                                     sbyte? _elem157 = 0;
                                     _elem157 = iprot.ReadByte();
                                     _val154.Add(_elem157);
                                 }
                                 iprot.ReadListEnd();
                             }
                             ByteListMap[_key153] = _val154;
                         }
                         iprot.ReadMapEnd();
                     }
                 } else {
                     TProtocolUtil.Skip(iprot, field.Type);
                 }
                 break;
             default:
                 TProtocolUtil.Skip(iprot, field.Type);
                 break;
         }
         iprot.ReadFieldEnd();
     }
     iprot.ReadStructEnd();
 }
 public CompactProtoTestStruct(
     sbyte? aByte,
     short? aI16,
     int? aI32,
     long? aI64,
     double? aDouble,
     string aString,
     byte[] aBinary,
     bool? trueField,
     bool? falseField,
     Empty emptyStructField,
     List<sbyte?> byteList,
     List<short?> i16List,
     List<int?> i32List,
     List<long?> i64List,
     List<double?> doubleList,
     List<string> stringList,
     List<byte[]> binaryList,
     List<bool?> booleanList,
     List<Empty> structList,
     HashSet<sbyte?> byteSet,
     HashSet<short?> i16Set,
     HashSet<int?> i32Set,
     HashSet<long?> i64Set,
     HashSet<double?> doubleSet,
     HashSet<string> stringSet,
     HashSet<byte[]> binarySet,
     HashSet<bool?> booleanSet,
     HashSet<Empty> structSet,
     Dictionary<sbyte?, sbyte?> byteByteMap,
     Dictionary<short?, sbyte?> i16ByteMap,
     Dictionary<int?, sbyte?> i32ByteMap,
     Dictionary<long?, sbyte?> i64ByteMap,
     Dictionary<double?, sbyte?> doubleByteMap,
     Dictionary<string, sbyte?> stringByteMap,
     Dictionary<byte[], sbyte?> binaryByteMap,
     Dictionary<bool?, sbyte?> booleanByteMap,
     Dictionary<sbyte?, short?> byteI16Map,
     Dictionary<sbyte?, int?> byteI32Map,
     Dictionary<sbyte?, long?> byteI64Map,
     Dictionary<sbyte?, double?> byteDoubleMap,
     Dictionary<sbyte?, string> byteStringMap,
     Dictionary<sbyte?, byte[]> byteBinaryMap,
     Dictionary<sbyte?, bool?> byteBooleanMap,
     Dictionary<List<sbyte?>, sbyte?> listByteMap,
     Dictionary<HashSet<sbyte?>, sbyte?> setByteMap,
     Dictionary<Dictionary<sbyte?, sbyte?>, sbyte?> mapByteMap,
     Dictionary<sbyte?, Dictionary<sbyte?, sbyte?>> byteMapMap,
     Dictionary<sbyte?, HashSet<sbyte?>> byteSetMap,
     Dictionary<sbyte?, List<sbyte?>> byteListMap
 ) {
     this.AByte = aByte;
     this.AI16 = aI16;
     this.AI32 = aI32;
     this.AI64 = aI64;
     this.ADouble = aDouble;
     this.AString = aString;
     this.ABinary = aBinary;
     this.TrueField = trueField;
     this.FalseField = falseField;
     this.EmptyStructField = emptyStructField;
     this.ByteList = byteList;
     this.I16List = i16List;
     this.I32List = i32List;
     this.I64List = i64List;
     this.DoubleList = doubleList;
     this.StringList = stringList;
     this.BinaryList = binaryList;
     this.BooleanList = booleanList;
     this.StructList = structList;
     this.ByteSet = byteSet;
     this.I16Set = i16Set;
     this.I32Set = i32Set;
     this.I64Set = i64Set;
     this.DoubleSet = doubleSet;
     this.StringSet = stringSet;
     this.BinarySet = binarySet;
     this.BooleanSet = booleanSet;
     this.StructSet = structSet;
     this.ByteByteMap = byteByteMap;
     this.I16ByteMap = i16ByteMap;
     this.I32ByteMap = i32ByteMap;
     this.I64ByteMap = i64ByteMap;
     this.DoubleByteMap = doubleByteMap;
     this.StringByteMap = stringByteMap;
     this.BinaryByteMap = binaryByteMap;
     this.BooleanByteMap = booleanByteMap;
     this.ByteI16Map = byteI16Map;
     this.ByteI32Map = byteI32Map;
     this.ByteI64Map = byteI64Map;
     this.ByteDoubleMap = byteDoubleMap;
     this.ByteStringMap = byteStringMap;
     this.ByteBinaryMap = byteBinaryMap;
     this.ByteBooleanMap = byteBooleanMap;
     this.ListByteMap = listByteMap;
     this.SetByteMap = setByteMap;
     this.MapByteMap = mapByteMap;
     this.ByteMapMap = byteMapMap;
     this.ByteSetMap = byteSetMap;
     this.ByteListMap = byteListMap;
 }
 private static void SetAttachedValue(IBindingMemberInfo member, TTarget source, TType value)
 {
     GetAttachedProperty((IAttachedBindingMemberInternal)member, source)
     .SetValue(source, value, Empty.Array <object>());
 }
Example #19
0
        public IEnumerable <BotCase> GetMyOpenCases(string userId)
        {
            if (string.IsNullOrEmpty(userId))
            {
                return(Empty <BotCase> .DefaultList());
            }

            var caseStatus = Get.ContextACLBypassed.CodeTableCasestatus.Where(cs => cs.Closed == 0 && cs.Voided == 0).Select(cs => cs.Recno).ToArray();

            //EnumCodeTableCasestatus enumCaseStatus;
            //Enum.TryParse<EnumCodeTableCasestatus>("B_5", out enumCaseStatus);
            var caa      = Get.Context.Case.Where(f => f.ToCaseStatusKey == EnumCodeTableCasestatus.B_5).Select(x => new { x.Recno, x.ToCaseStatusKey });
            var caseList = Get.Context.Case.Where(ca => ca.ToCaseStatusKey.OprIn(caseStatus) &&
                                                  ca.OurRef.OprJoin(JoinType.EqualJoin)
                                                  //&& ca.OurRef.User.OprJoin(JoinType.EqualJoin)
                                                  //&& ca.OurRef.UserKey == Convert.ToInt32(userId)
                                                  && ca.ToOrgUnit.OprJoin(JoinType.LeftJoin) &&
                                                  ca.ToScrapCode.OprJoin(JoinType.LeftJoin))
                           .Select(ca => new
            {
                Recno             = ca.Recno,
                Title             = ca.UnofficialTitle,
                Description       = ca.Description,
                Notes             = ca.Notes,
                OurRefRecno       = ca.OurRefKey,
                OurRefSearchName  = ca.OurRef.SearchName,
                OurRefEmail       = ca.OurRef.Email,
                OrgUnitRecno      = ca.ToOrgUnitKey,
                OrgUnitSearchName = ca.ToOrgUnit.SearchName,
                OrgUnitEmail      = ca.ToOrgUnit.Email,
                ScrapCode         = ca.ToScrapCode.Code,
                PreserveYears     = ca.PreserveYears
            });

            var botCases = new List <BotCase>();

            caseList.ForEach(caseInfo =>
            {
                botCases.Add(caseInfo == null
                         ? Empty <BotCase> .Default()
                         : new BotCase
                {
                    Recno = caseInfo.Recno
                    ,
                    Title = caseInfo.Title
                    ,
                    Description = caseInfo.Description
                    ,
                    Notes = caseInfo.Notes
                    ,
                    OurRef = new BotContact
                    {
                        Recno = caseInfo.OurRefRecno.HasValue ? caseInfo.OurRefRecno.Value : -1
                        ,
                        SearchName = caseInfo.OurRefSearchName
                        ,
                        Email = caseInfo.OurRefSearchName
                    }
                    ,
                    OrgUnit = new BotContact
                    {
                        Recno = caseInfo.OrgUnitRecno.HasValue ? caseInfo.OrgUnitRecno.Value : -1
                        ,
                        SearchName = caseInfo.OrgUnitSearchName
                        ,
                        Email = caseInfo.OrgUnitEmail
                    }
                });
            });


            return(botCases);
        }
Example #20
0
 public void OnOrderPlaced(Empty empty)
 {
     this.UpdateOrders();
 }
Example #21
0
 public override Empty SupposedToFail(Empty input)
 {
     Assert(false, "Fate!");
     return(new Empty());
 }
Example #22
0
		public Board(int x, int y, int nsize)
		{
			Random r = new Random();
			double temp = 0;
			this.positions = new Token[x,y];
			this.xsize = x;
			this.ysize = y;
			this.nsize = nsize;
			for (int i = 0; i < x; i++)
			{
				for (int j = 0; j < y; j++)
				{
					temp = r.NextDouble();
					if (temp < (.4))
						positions[i,j] = new Person(TokenType.W, i, j);
					else if (temp < (.8))
						positions[i,j] = new Person(TokenType.B, i, j);
					else
						positions[i,j] = new Empty(i, j);
				}
			}
		}
Example #23
0
        private static Delegate CreateDelegateForEvent(EventInfo eventInfo)
        {
            Delegate value;

            if (!CachedDelegates.TryGetValue(eventInfo, out value))
            {
                var parameters = eventInfo
                                 .EventHandlerType
                                 .GetMethodEx(nameof(Action.Invoke))
                                 .GetParameters()
                                 .ToArrayEx(parameter => System.Linq.Expressions.Expression.Parameter(parameter.ParameterType));

                var callExpression = System.Linq.Expressions.Expression
                                     .Call(System.Linq.Expressions.Expression.Constant(NoDoFunc, typeof(Func <object>)), nameof(Action.Invoke), Empty.Array <Type>());
                value = System.Linq.Expressions.Expression
                        .Lambda(eventInfo.EventHandlerType, callExpression, parameters)
                        .Compile();
            }
            return(value);
        }
Example #24
0
		public void Move(int x, int y)
		{
			if (!positions[x,y].IsSatisfied())
			{
				foreach (Token candidate in free)
				{
					if(positions[x,y].TestSatisfied(candidate.NPeek()))
					{
						taken.Remove(positions[x,y]);
						free.Add(positions[x,y]);
						positions[candidate.Xpos,candidate.Ypos] = new Person(positions[x,y].Type, candidate.Xpos, candidate.Ypos);
						taken.Add(candidate);
						free.Add(positions[x,y]);
						positions[x,y] = new Empty(x,y);
						movements += 1;
						break;
					}
				}
			}
		}
Example #25
0
        public async Task UpdateContract_With_Two_Branch()
        {
            var blockHeader = await _blockchainService.GetBestChainLastBlockHeaderAsync();

            var startBlockHeight = blockHeader.Height;
            var startBlockHash   = blockHeader.GetHash();

            var transactionResult = (await BasicContractZeroStub.UpdateSmartContract.SendAsync(
                                         new Acs0.ContractUpdateInput
            {
                Address = BasicFunctionContractAddress,
                Code = ByteString.CopyFrom(Codes.Single(kv => kv.Key.EndsWith("BasicUpdate")).Value)
            }
                                         )).TransactionResult;

            transactionResult.Status.ShouldBe(TransactionResultStatus.Mined);

            var basic11ContractStub = GetTestBasicUpdateContractStub(DefaultSenderKeyPair);
//            //execute new action method
            var transactionResult1 = (await basic11ContractStub.UpdateStopBet.SendAsync(
                                          new Empty())).TransactionResult;

            transactionResult1.Status.ShouldBe(TransactionResultStatus.Mined);

            var transaction = CreateTransaction(DefaultSender, BasicFunctionContractAddress,
                                                nameof(TestBasicFunctionContractStub.QueryWinMoney), new Empty().ToByteString(), startBlockHeight, startBlockHash);
            var block = await ExecuteAsync(transaction, startBlockHeight, startBlockHash);

            await _blockAttachService.AttachBlockAsync(block);

            transaction = CreateTransaction(DefaultSender, BasicFunctionContractAddress,
                                            nameof(TestBasicFunctionContractStub.QueryWinMoney), new Empty().ToByteString(), block.Height,
                                            block.GetHash());
            block = await ExecuteAsync(transaction, block.Height, block.GetHash());

            await _blockAttachService.AttachBlockAsync(block);

            var input             = new Empty().ToByteString();
            var failedTransaction = CreateTransaction(DefaultSender, BasicFunctionContractAddress,
                                                      nameof(basic11ContractStub.UpdateStopBet), input, block.Height, block.GetHash());

            block = await ExecuteAsync(failedTransaction, block.Height, block.GetHash());

            await _blockAttachService.AttachBlockAsync(block);

            transactionResult =
                await _transactionResultManager.GetTransactionResultAsync(failedTransaction.GetHash(),
                                                                          block.Header.GetPreMiningHash());

            transactionResult.Status.ShouldBe(TransactionResultStatus.Failed);
            transactionResult.Error.ShouldContain("Failed to find handler for UpdateStopBet.");

            input = new Acs0.ContractUpdateInput
            {
                Address = BasicFunctionContractAddress,
                Code    = ByteString.CopyFrom(Codes.Single(kv => kv.Key.EndsWith("BasicFunction")).Value)
            }.ToByteString();
            var updateTransaction = CreateTransaction(DefaultSender, ContractZeroAddress,
                                                      nameof(BasicContractZeroStub.UpdateSmartContract), input, block.Height, block.GetHash());
            var updateBlock = await ExecuteAsync(updateTransaction, block.Height, block.GetHash());

            await _blockAttachService.AttachBlockAsync(updateBlock);

//
            transactionResult =
                await _transactionResultManager.GetTransactionResultAsync(updateTransaction.GetHash(),
                                                                          updateBlock.Header.GetPreMiningHash());

            transactionResult.Status.ShouldBe(TransactionResultStatus.Failed);
            transactionResult.Error.Contains("Code is not changed").ShouldBeTrue();

            input = new Acs0.ContractUpdateInput
            {
                Address = BasicFunctionContractAddress,
                Code    = ByteString.CopyFrom(Codes.Single(kv => kv.Key.EndsWith("BasicUpdate")).Value)
            }.ToByteString();
            updateTransaction = CreateTransaction(DefaultSender, ContractZeroAddress,
                                                  nameof(BasicContractZeroStub.UpdateSmartContract), input, updateBlock.Height, updateBlock.GetHash());
            updateBlock = await ExecuteAsync(updateTransaction, updateBlock.Height, updateBlock.GetHash());

            await _blockAttachService.AttachBlockAsync(updateBlock);

            transactionResult =
                await _transactionResultManager.GetTransactionResultAsync(updateTransaction.GetHash(),
                                                                          updateBlock.Header.GetPreMiningHash());

            transactionResult.Status.ShouldBe(TransactionResultStatus.Mined);

            basic11ContractStub = GetTestBasicUpdateContractStub(DefaultSenderKeyPair);
            //execute new action method
            transactionResult = (await basic11ContractStub.UpdateStopBet.SendAsync(
                                     new Empty())).TransactionResult;
            transactionResult.Status.ShouldBe(TransactionResultStatus.Mined);

            //call new view method
            var result = (await basic11ContractStub.QueryBetStatus.CallAsync(
                              new Empty())).BoolValue;

            result.ShouldBeTrue();
        }
Example #26
0
        private void InitCell(Point point, char c)
        {
            KilledAntsMap[point] = new List<Cell>();
            if (c >= '0' && c <= '9')
            {
                int command = c - '0';
                var hill = new Hill(point, command, this);
                Armies[command].Hills.Add(hill);
                OriginalMap[point] = hill;
                ObjectsMap[point] = new Empty(point, this);

            }
            else if (c >= 'a' && c <= 'j')
            {
                int command = c - 'a';
                var ant = new Ant(point, command, this);
                Armies[command].Ants.Add(ant);
                OriginalMap[point] = new UnMovableCell(point, Cell.CellType.Land, this);
                ObjectsMap[point] = ant;
            }
            else if (c >= 'A' && c <= 'J')
            {
                int command = c - 'A';
                var hill = new Hill(point, command, this);
                Armies[command].Hills.Add(hill);
                var ant = new Ant(point, command, this);
                Armies[command].Ants.Add(ant);
                OriginalMap[point] = hill;
                ObjectsMap[point] = ant;
            }
            else if (c == '*')
            {
                var food = new Food(point, this);
                Food.Add(food);
                OriginalMap[point] = new UnMovableCell(point, Cell.CellType.Land, this);
                ObjectsMap[point] = food;
            }
            else if (c == '!')
            {
                OriginalMap[point] = new UnMovableCell(point, Cell.CellType.Land, this);
                ObjectsMap[point] = new Empty(point, this);
                KilledAntsMap[point].Add(new Ant(point, -1, this).GetDead());
            }
            else if (c == '%')
            {
                OriginalMap[point] = new UnMovableCell(point, Cell.CellType.Water, this);
                ObjectsMap[point] = new Empty(point, this);
            }
            else if (c == '.')
            {
                OriginalMap[point] = new UnMovableCell(point, Cell.CellType.Land, this);
                ObjectsMap[point] = new Empty(point, this);
            }
            else
            {
                OriginalMap[point] = new UnMovableCell(point, Cell.CellType.Unseen, this);
                ObjectsMap[point] = new Empty(point, this);
            }
        }
 public FallbackReferencePrice(XmlNode xmlNode)
 {
     XmlNode valuationPostponementNode = xmlNode.SelectSingleNode("valuationPostponement");
     
     if (valuationPostponementNode != null)
     {
         if (valuationPostponementNode.Attributes["href"] != null || valuationPostponementNode.Attributes["id"] != null) 
         {
             if (valuationPostponementNode.Attributes["id"] != null) 
             {
                 valuationPostponementIDRef_ = valuationPostponementNode.Attributes["id"].Value;
                 ValuationPostponement ob = new ValuationPostponement(valuationPostponementNode);
                 IDManager.SetID(valuationPostponementIDRef_, ob);
             }
             else if (valuationPostponementNode.Attributes["href"] != null)
             {
                 valuationPostponementIDRef_ = valuationPostponementNode.Attributes["href"].Value;
             }
             else
             {
                 valuationPostponement_ = new ValuationPostponement(valuationPostponementNode);
             }
         }
         else
         {
             valuationPostponement_ = new ValuationPostponement(valuationPostponementNode);
         }
     }
     
 
     XmlNodeList fallbackSettlementRateOptionNodeList = xmlNode.SelectNodes("fallbackSettlementRateOption");
     
     if (fallbackSettlementRateOptionNodeList != null)
     {
         this.fallbackSettlementRateOption_ = new List<SettlementRateOption>();
         foreach (XmlNode item in fallbackSettlementRateOptionNodeList)
         {
             if (item.Attributes["href"] != null || item.Attributes["id"] != null) 
             {
                 if (item.Attributes["id"] != null) 
                 {
                     fallbackSettlementRateOptionIDRef_ = item.Attributes["id"].Value;
                     fallbackSettlementRateOption_.Add(new SettlementRateOption(item));
                     IDManager.SetID(fallbackSettlementRateOptionIDRef_, fallbackSettlementRateOption_[fallbackSettlementRateOption_.Count - 1 ]);
                 }
                 else if (item.Attributes["href"] != null)
                 {
                     fallbackSettlementRateOptionIDRef_ = item.Attributes["href"].Value;
                 }
                 else
                 {
                 fallbackSettlementRateOption_.Add(new SettlementRateOption(item));
                 }
             }
             else
             {
                 fallbackSettlementRateOption_.Add(new SettlementRateOption(item));
             }
         }
     }
     
 
     XmlNode fallbackSurveyValuationPostponenmentNode = xmlNode.SelectSingleNode("fallbackSurveyValuationPostponenment");
     
     if (fallbackSurveyValuationPostponenmentNode != null)
     {
         if (fallbackSurveyValuationPostponenmentNode.Attributes["href"] != null || fallbackSurveyValuationPostponenmentNode.Attributes["id"] != null) 
         {
             if (fallbackSurveyValuationPostponenmentNode.Attributes["id"] != null) 
             {
                 fallbackSurveyValuationPostponenmentIDRef_ = fallbackSurveyValuationPostponenmentNode.Attributes["id"].Value;
                 Empty ob = new Empty(fallbackSurveyValuationPostponenmentNode);
                 IDManager.SetID(fallbackSurveyValuationPostponenmentIDRef_, ob);
             }
             else if (fallbackSurveyValuationPostponenmentNode.Attributes["href"] != null)
             {
                 fallbackSurveyValuationPostponenmentIDRef_ = fallbackSurveyValuationPostponenmentNode.Attributes["href"].Value;
             }
             else
             {
                 fallbackSurveyValuationPostponenment_ = new Empty(fallbackSurveyValuationPostponenmentNode);
             }
         }
         else
         {
             fallbackSurveyValuationPostponenment_ = new Empty(fallbackSurveyValuationPostponenmentNode);
         }
     }
     
 
     XmlNode calculationAgentDeterminationNode = xmlNode.SelectSingleNode("calculationAgentDetermination");
     
     if (calculationAgentDeterminationNode != null)
     {
         if (calculationAgentDeterminationNode.Attributes["href"] != null || calculationAgentDeterminationNode.Attributes["id"] != null) 
         {
             if (calculationAgentDeterminationNode.Attributes["id"] != null) 
             {
                 calculationAgentDeterminationIDRef_ = calculationAgentDeterminationNode.Attributes["id"].Value;
                 CalculationAgent ob = new CalculationAgent(calculationAgentDeterminationNode);
                 IDManager.SetID(calculationAgentDeterminationIDRef_, ob);
             }
             else if (calculationAgentDeterminationNode.Attributes["href"] != null)
             {
                 calculationAgentDeterminationIDRef_ = calculationAgentDeterminationNode.Attributes["href"].Value;
             }
             else
             {
                 calculationAgentDetermination_ = new CalculationAgent(calculationAgentDeterminationNode);
             }
         }
         else
         {
             calculationAgentDetermination_ = new CalculationAgent(calculationAgentDeterminationNode);
         }
     }
     
 
 }
 public override Task <ListTopicSubscriptionsResponse> ListTopicSubscriptions(Empty request, ServerCallContext context)
 {
     return(Task.FromResult(new ListTopicSubscriptionsResponse()));
 }
Example #29
0
 private void initializeFunction(AggregateFunction aggregateFunction)
 {
     switch (aggregateFunction)
     {
         case AggregateFunction.Average:
             ColumnAggregateFunction = new Average { DisplayFormatFormula = DisplayFormatFormula };
             break;
         case AggregateFunction.Maximum:
             ColumnAggregateFunction = new Maximum { DisplayFormatFormula = DisplayFormatFormula };
             break;
         case AggregateFunction.Minimum:
             ColumnAggregateFunction = new Minimum { DisplayFormatFormula = DisplayFormatFormula };
             break;
         case AggregateFunction.StdDev:
             ColumnAggregateFunction = new StdDev { DisplayFormatFormula = DisplayFormatFormula };
             break;
         case AggregateFunction.Sum:
             ColumnAggregateFunction = new Sum { DisplayFormatFormula = DisplayFormatFormula };
             break;
         case AggregateFunction.Variance:
             ColumnAggregateFunction = new Variance { DisplayFormatFormula = DisplayFormatFormula };
             break;
         case AggregateFunction.Empty:
             ColumnAggregateFunction = new Empty { DisplayFormatFormula = DisplayFormatFormula };
             break;
         default:
             throw new NotSupportedException("Please select a defined IAggregateFunction.");
     }
 }
Example #30
0
        public void fillBord(String filepath)
        {
            try {
                using (StreamReader sr = new StreamReader(filepath)) {
                    rows = 0;
                    cols = 0;
                    List<String> regels = new List<String>();
                    while (sr.ReadLine() != null) {
                        rows++;
                    }

                    sr.BaseStream.Position = 0;
                    sr.DiscardBufferedData();

                    cols = sr.ReadLine().ToCharArray().Length;

                    sr.BaseStream.Position = 0;
                    sr.DiscardBufferedData();

                    bordje = new char[rows, cols];
                    bord = new Hokje[rows, cols];

                   int rownumber = 0;
                    while (!sr.EndOfStream && rownumber < rows) {
                        String currentLine = sr.ReadLine();
                        char[] characters = currentLine.ToCharArray();

                        for (int i = 0; i < cols; i++) {
                            bordje[rownumber, i] = characters[i];
                        }
                        rownumber++;
                    }
                }
            }
            catch (Exception e) {
                MessageBox.Show("File could not be read");
                MessageBox.Show(e.Message);
            }

            for (int j = 0; j < rows; j++) {
                for (int i = 0; i < cols; i++) {
                    switch (bordje[j, i]) {
                        case '#':
                            bord[j, i] = new Wall();
                            break;
                        case 'o':
                            bord[j, i] = new Box();
                            break;
                        case 'x':
                            bord[j, i] = new Destination();
                            break;
                        case ' ':
                            bord[j, i] = new Empty();
                            break;
                        case '@':
                            bord[j, i] = new Player();
                            break;
                    }
                    Console.Write(bordje[j, i]);
                }
                Console.Write("\n");
            }
        }
Example #31
0
 public EventListenerList()
 {
     _listeners = Empty.Array <WeakEventListenerWrapper>();
 }
Example #32
0
 public void InitMember3()
 {
     row = data3.GetLength(0);
     col = data3.GetLength(1);
     map = new Block[row, col];
     for (int i = 0; i < row; i++)
     {
         for (int j = 0; j < col; j++)
         {
             if (data3[i, j] == 0)
             {
                 map[i, j] = new Empty(i, j);
             }
             if (data3[i, j] == 1)
             {
                 map[i, j] = new Wall(i, j);
             }
             if (data3[i, j] == 2)
             {
                 map[i, j] = new Bean(i, j);
                 beanNum++;
             }
         }
     }
     pacman = new Pacman(1, 1);
     monster[0] = new Monster(7, 2);
     monster[1] = new Monster(6, 1);
     monster[2] = new Monster(8, 10);
 }
 private void FireMachineGunFx(Empty empty)
 {
     machineGunFx.GetComponent <ParticleSystem>().Play();
 }
 public TradeNovationContent(XmlNode xmlNode)
 : base(xmlNode)
 {
     XmlNodeList newTradeIdentifierNodeList = xmlNode.SelectNodes("newTradeIdentifier");
     
     if (newTradeIdentifierNodeList != null)
     {
         this.newTradeIdentifier_ = new List<PartyTradeIdentifier>();
         foreach (XmlNode item in newTradeIdentifierNodeList)
         {
             if (item.Attributes["href"] != null || item.Attributes["id"] != null) 
             {
                 if (item.Attributes["id"] != null) 
                 {
                     newTradeIdentifierIDRef_ = item.Attributes["id"].Value;
                     newTradeIdentifier_.Add(new PartyTradeIdentifier(item));
                     IDManager.SetID(newTradeIdentifierIDRef_, newTradeIdentifier_[newTradeIdentifier_.Count - 1 ]);
                 }
                 else if (item.Attributes["href"] != null)
                 {
                     newTradeIdentifierIDRef_ = item.Attributes["href"].Value;
                 }
                 else
                 {
                 newTradeIdentifier_.Add(new PartyTradeIdentifier(item));
                 }
             }
             else
             {
                 newTradeIdentifier_.Add(new PartyTradeIdentifier(item));
             }
         }
     }
     
 
     XmlNode newTradeNode = xmlNode.SelectSingleNode("newTrade");
     
     if (newTradeNode != null)
     {
         if (newTradeNode.Attributes["href"] != null || newTradeNode.Attributes["id"] != null) 
         {
             if (newTradeNode.Attributes["id"] != null) 
             {
                 newTradeIDRef_ = newTradeNode.Attributes["id"].Value;
                 Trade ob = new Trade(newTradeNode);
                 IDManager.SetID(newTradeIDRef_, ob);
             }
             else if (newTradeNode.Attributes["href"] != null)
             {
                 newTradeIDRef_ = newTradeNode.Attributes["href"].Value;
             }
             else
             {
                 newTrade_ = new Trade(newTradeNode);
             }
         }
         else
         {
             newTrade_ = new Trade(newTradeNode);
         }
     }
     
 
     XmlNodeList oldTradeIdentifierNodeList = xmlNode.SelectNodes("oldTradeIdentifier");
     
     if (oldTradeIdentifierNodeList != null)
     {
         this.oldTradeIdentifier_ = new List<PartyTradeIdentifier>();
         foreach (XmlNode item in oldTradeIdentifierNodeList)
         {
             if (item.Attributes["href"] != null || item.Attributes["id"] != null) 
             {
                 if (item.Attributes["id"] != null) 
                 {
                     oldTradeIdentifierIDRef_ = item.Attributes["id"].Value;
                     oldTradeIdentifier_.Add(new PartyTradeIdentifier(item));
                     IDManager.SetID(oldTradeIdentifierIDRef_, oldTradeIdentifier_[oldTradeIdentifier_.Count - 1 ]);
                 }
                 else if (item.Attributes["href"] != null)
                 {
                     oldTradeIdentifierIDRef_ = item.Attributes["href"].Value;
                 }
                 else
                 {
                 oldTradeIdentifier_.Add(new PartyTradeIdentifier(item));
                 }
             }
             else
             {
                 oldTradeIdentifier_.Add(new PartyTradeIdentifier(item));
             }
         }
     }
     
 
     XmlNode oldTradeNode = xmlNode.SelectSingleNode("oldTrade");
     
     if (oldTradeNode != null)
     {
         if (oldTradeNode.Attributes["href"] != null || oldTradeNode.Attributes["id"] != null) 
         {
             if (oldTradeNode.Attributes["id"] != null) 
             {
                 oldTradeIDRef_ = oldTradeNode.Attributes["id"].Value;
                 Trade ob = new Trade(oldTradeNode);
                 IDManager.SetID(oldTradeIDRef_, ob);
             }
             else if (oldTradeNode.Attributes["href"] != null)
             {
                 oldTradeIDRef_ = oldTradeNode.Attributes["href"].Value;
             }
             else
             {
                 oldTrade_ = new Trade(oldTradeNode);
             }
         }
         else
         {
             oldTrade_ = new Trade(oldTradeNode);
         }
     }
     
 
     XmlNode feeTradeIdentifierNode = xmlNode.SelectSingleNode("feeTradeIdentifier");
     
     if (feeTradeIdentifierNode != null)
     {
         if (feeTradeIdentifierNode.Attributes["href"] != null || feeTradeIdentifierNode.Attributes["id"] != null) 
         {
             if (feeTradeIdentifierNode.Attributes["id"] != null) 
             {
                 feeTradeIdentifierIDRef_ = feeTradeIdentifierNode.Attributes["id"].Value;
                 PartyTradeIdentifier ob = new PartyTradeIdentifier(feeTradeIdentifierNode);
                 IDManager.SetID(feeTradeIdentifierIDRef_, ob);
             }
             else if (feeTradeIdentifierNode.Attributes["href"] != null)
             {
                 feeTradeIdentifierIDRef_ = feeTradeIdentifierNode.Attributes["href"].Value;
             }
             else
             {
                 feeTradeIdentifier_ = new PartyTradeIdentifier(feeTradeIdentifierNode);
             }
         }
         else
         {
             feeTradeIdentifier_ = new PartyTradeIdentifier(feeTradeIdentifierNode);
         }
     }
     
 
     XmlNode feeTradeNode = xmlNode.SelectSingleNode("feeTrade");
     
     if (feeTradeNode != null)
     {
         if (feeTradeNode.Attributes["href"] != null || feeTradeNode.Attributes["id"] != null) 
         {
             if (feeTradeNode.Attributes["id"] != null) 
             {
                 feeTradeIDRef_ = feeTradeNode.Attributes["id"].Value;
                 Trade ob = new Trade(feeTradeNode);
                 IDManager.SetID(feeTradeIDRef_, ob);
             }
             else if (feeTradeNode.Attributes["href"] != null)
             {
                 feeTradeIDRef_ = feeTradeNode.Attributes["href"].Value;
             }
             else
             {
                 feeTrade_ = new Trade(feeTradeNode);
             }
         }
         else
         {
             feeTrade_ = new Trade(feeTradeNode);
         }
     }
     
 
     XmlNode transferorNode = xmlNode.SelectSingleNode("transferor");
     
     if (transferorNode != null)
     {
         if (transferorNode.Attributes["href"] != null || transferorNode.Attributes["id"] != null) 
         {
             if (transferorNode.Attributes["id"] != null) 
             {
                 transferorIDRef_ = transferorNode.Attributes["id"].Value;
                 PartyReference ob = new PartyReference(transferorNode);
                 IDManager.SetID(transferorIDRef_, ob);
             }
             else if (transferorNode.Attributes["href"] != null)
             {
                 transferorIDRef_ = transferorNode.Attributes["href"].Value;
             }
             else
             {
                 transferor_ = new PartyReference(transferorNode);
             }
         }
         else
         {
             transferor_ = new PartyReference(transferorNode);
         }
     }
     
 
     XmlNode transferorAccountNode = xmlNode.SelectSingleNode("transferorAccount");
     
     if (transferorAccountNode != null)
     {
         if (transferorAccountNode.Attributes["href"] != null || transferorAccountNode.Attributes["id"] != null) 
         {
             if (transferorAccountNode.Attributes["id"] != null) 
             {
                 transferorAccountIDRef_ = transferorAccountNode.Attributes["id"].Value;
                 AccountReference ob = new AccountReference(transferorAccountNode);
                 IDManager.SetID(transferorAccountIDRef_, ob);
             }
             else if (transferorAccountNode.Attributes["href"] != null)
             {
                 transferorAccountIDRef_ = transferorAccountNode.Attributes["href"].Value;
             }
             else
             {
                 transferorAccount_ = new AccountReference(transferorAccountNode);
             }
         }
         else
         {
             transferorAccount_ = new AccountReference(transferorAccountNode);
         }
     }
     
 
     XmlNode transfereeNode = xmlNode.SelectSingleNode("transferee");
     
     if (transfereeNode != null)
     {
         if (transfereeNode.Attributes["href"] != null || transfereeNode.Attributes["id"] != null) 
         {
             if (transfereeNode.Attributes["id"] != null) 
             {
                 transfereeIDRef_ = transfereeNode.Attributes["id"].Value;
                 PartyReference ob = new PartyReference(transfereeNode);
                 IDManager.SetID(transfereeIDRef_, ob);
             }
             else if (transfereeNode.Attributes["href"] != null)
             {
                 transfereeIDRef_ = transfereeNode.Attributes["href"].Value;
             }
             else
             {
                 transferee_ = new PartyReference(transfereeNode);
             }
         }
         else
         {
             transferee_ = new PartyReference(transfereeNode);
         }
     }
     
 
     XmlNode otherTransfereeNode = xmlNode.SelectSingleNode("otherTransferee");
     
     if (otherTransfereeNode != null)
     {
         if (otherTransfereeNode.Attributes["href"] != null || otherTransfereeNode.Attributes["id"] != null) 
         {
             if (otherTransfereeNode.Attributes["id"] != null) 
             {
                 otherTransfereeIDRef_ = otherTransfereeNode.Attributes["id"].Value;
                 PartyReference ob = new PartyReference(otherTransfereeNode);
                 IDManager.SetID(otherTransfereeIDRef_, ob);
             }
             else if (otherTransfereeNode.Attributes["href"] != null)
             {
                 otherTransfereeIDRef_ = otherTransfereeNode.Attributes["href"].Value;
             }
             else
             {
                 otherTransferee_ = new PartyReference(otherTransfereeNode);
             }
         }
         else
         {
             otherTransferee_ = new PartyReference(otherTransfereeNode);
         }
     }
     
 
     XmlNode transfereeAccountNode = xmlNode.SelectSingleNode("transfereeAccount");
     
     if (transfereeAccountNode != null)
     {
         if (transfereeAccountNode.Attributes["href"] != null || transfereeAccountNode.Attributes["id"] != null) 
         {
             if (transfereeAccountNode.Attributes["id"] != null) 
             {
                 transfereeAccountIDRef_ = transfereeAccountNode.Attributes["id"].Value;
                 AccountReference ob = new AccountReference(transfereeAccountNode);
                 IDManager.SetID(transfereeAccountIDRef_, ob);
             }
             else if (transfereeAccountNode.Attributes["href"] != null)
             {
                 transfereeAccountIDRef_ = transfereeAccountNode.Attributes["href"].Value;
             }
             else
             {
                 transfereeAccount_ = new AccountReference(transfereeAccountNode);
             }
         }
         else
         {
             transfereeAccount_ = new AccountReference(transfereeAccountNode);
         }
     }
     
 
     XmlNode otherTransfereeAccountNode = xmlNode.SelectSingleNode("otherTransfereeAccount");
     
     if (otherTransfereeAccountNode != null)
     {
         if (otherTransfereeAccountNode.Attributes["href"] != null || otherTransfereeAccountNode.Attributes["id"] != null) 
         {
             if (otherTransfereeAccountNode.Attributes["id"] != null) 
             {
                 otherTransfereeAccountIDRef_ = otherTransfereeAccountNode.Attributes["id"].Value;
                 AccountReference ob = new AccountReference(otherTransfereeAccountNode);
                 IDManager.SetID(otherTransfereeAccountIDRef_, ob);
             }
             else if (otherTransfereeAccountNode.Attributes["href"] != null)
             {
                 otherTransfereeAccountIDRef_ = otherTransfereeAccountNode.Attributes["href"].Value;
             }
             else
             {
                 otherTransfereeAccount_ = new AccountReference(otherTransfereeAccountNode);
             }
         }
         else
         {
             otherTransfereeAccount_ = new AccountReference(otherTransfereeAccountNode);
         }
     }
     
 
     XmlNode remainingPartyNode = xmlNode.SelectSingleNode("remainingParty");
     
     if (remainingPartyNode != null)
     {
         if (remainingPartyNode.Attributes["href"] != null || remainingPartyNode.Attributes["id"] != null) 
         {
             if (remainingPartyNode.Attributes["id"] != null) 
             {
                 remainingPartyIDRef_ = remainingPartyNode.Attributes["id"].Value;
                 PartyReference ob = new PartyReference(remainingPartyNode);
                 IDManager.SetID(remainingPartyIDRef_, ob);
             }
             else if (remainingPartyNode.Attributes["href"] != null)
             {
                 remainingPartyIDRef_ = remainingPartyNode.Attributes["href"].Value;
             }
             else
             {
                 remainingParty_ = new PartyReference(remainingPartyNode);
             }
         }
         else
         {
             remainingParty_ = new PartyReference(remainingPartyNode);
         }
     }
     
 
     XmlNode remainingPartyAccountNode = xmlNode.SelectSingleNode("remainingPartyAccount");
     
     if (remainingPartyAccountNode != null)
     {
         if (remainingPartyAccountNode.Attributes["href"] != null || remainingPartyAccountNode.Attributes["id"] != null) 
         {
             if (remainingPartyAccountNode.Attributes["id"] != null) 
             {
                 remainingPartyAccountIDRef_ = remainingPartyAccountNode.Attributes["id"].Value;
                 AccountReference ob = new AccountReference(remainingPartyAccountNode);
                 IDManager.SetID(remainingPartyAccountIDRef_, ob);
             }
             else if (remainingPartyAccountNode.Attributes["href"] != null)
             {
                 remainingPartyAccountIDRef_ = remainingPartyAccountNode.Attributes["href"].Value;
             }
             else
             {
                 remainingPartyAccount_ = new AccountReference(remainingPartyAccountNode);
             }
         }
         else
         {
             remainingPartyAccount_ = new AccountReference(remainingPartyAccountNode);
         }
     }
     
 
     XmlNode otherRemainingPartyNode = xmlNode.SelectSingleNode("otherRemainingParty");
     
     if (otherRemainingPartyNode != null)
     {
         if (otherRemainingPartyNode.Attributes["href"] != null || otherRemainingPartyNode.Attributes["id"] != null) 
         {
             if (otherRemainingPartyNode.Attributes["id"] != null) 
             {
                 otherRemainingPartyIDRef_ = otherRemainingPartyNode.Attributes["id"].Value;
                 PartyReference ob = new PartyReference(otherRemainingPartyNode);
                 IDManager.SetID(otherRemainingPartyIDRef_, ob);
             }
             else if (otherRemainingPartyNode.Attributes["href"] != null)
             {
                 otherRemainingPartyIDRef_ = otherRemainingPartyNode.Attributes["href"].Value;
             }
             else
             {
                 otherRemainingParty_ = new PartyReference(otherRemainingPartyNode);
             }
         }
         else
         {
             otherRemainingParty_ = new PartyReference(otherRemainingPartyNode);
         }
     }
     
 
     XmlNode otherRemainingPartyAccountNode = xmlNode.SelectSingleNode("otherRemainingPartyAccount");
     
     if (otherRemainingPartyAccountNode != null)
     {
         if (otherRemainingPartyAccountNode.Attributes["href"] != null || otherRemainingPartyAccountNode.Attributes["id"] != null) 
         {
             if (otherRemainingPartyAccountNode.Attributes["id"] != null) 
             {
                 otherRemainingPartyAccountIDRef_ = otherRemainingPartyAccountNode.Attributes["id"].Value;
                 AccountReference ob = new AccountReference(otherRemainingPartyAccountNode);
                 IDManager.SetID(otherRemainingPartyAccountIDRef_, ob);
             }
             else if (otherRemainingPartyAccountNode.Attributes["href"] != null)
             {
                 otherRemainingPartyAccountIDRef_ = otherRemainingPartyAccountNode.Attributes["href"].Value;
             }
             else
             {
                 otherRemainingPartyAccount_ = new AccountReference(otherRemainingPartyAccountNode);
             }
         }
         else
         {
             otherRemainingPartyAccount_ = new AccountReference(otherRemainingPartyAccountNode);
         }
     }
     
 
     XmlNode novationDateNode = xmlNode.SelectSingleNode("novationDate");
     
     if (novationDateNode != null)
     {
         if (novationDateNode.Attributes["href"] != null || novationDateNode.Attributes["id"] != null) 
         {
             if (novationDateNode.Attributes["id"] != null) 
             {
                 novationDateIDRef_ = novationDateNode.Attributes["id"].Value;
                 XsdTypeDate ob = new XsdTypeDate(novationDateNode);
                 IDManager.SetID(novationDateIDRef_, ob);
             }
             else if (novationDateNode.Attributes["href"] != null)
             {
                 novationDateIDRef_ = novationDateNode.Attributes["href"].Value;
             }
             else
             {
                 novationDate_ = new XsdTypeDate(novationDateNode);
             }
         }
         else
         {
             novationDate_ = new XsdTypeDate(novationDateNode);
         }
     }
     
 
     XmlNode executionDateTimeNode = xmlNode.SelectSingleNode("executionDateTime");
     
     if (executionDateTimeNode != null)
     {
         if (executionDateTimeNode.Attributes["href"] != null || executionDateTimeNode.Attributes["id"] != null) 
         {
             if (executionDateTimeNode.Attributes["id"] != null) 
             {
                 executionDateTimeIDRef_ = executionDateTimeNode.Attributes["id"].Value;
                 ExecutionDateTime ob = new ExecutionDateTime(executionDateTimeNode);
                 IDManager.SetID(executionDateTimeIDRef_, ob);
             }
             else if (executionDateTimeNode.Attributes["href"] != null)
             {
                 executionDateTimeIDRef_ = executionDateTimeNode.Attributes["href"].Value;
             }
             else
             {
                 executionDateTime_ = new ExecutionDateTime(executionDateTimeNode);
             }
         }
         else
         {
             executionDateTime_ = new ExecutionDateTime(executionDateTimeNode);
         }
     }
     
 
     XmlNode novationTradeDateNode = xmlNode.SelectSingleNode("novationTradeDate");
     
     if (novationTradeDateNode != null)
     {
         if (novationTradeDateNode.Attributes["href"] != null || novationTradeDateNode.Attributes["id"] != null) 
         {
             if (novationTradeDateNode.Attributes["id"] != null) 
             {
                 novationTradeDateIDRef_ = novationTradeDateNode.Attributes["id"].Value;
                 XsdTypeDate ob = new XsdTypeDate(novationTradeDateNode);
                 IDManager.SetID(novationTradeDateIDRef_, ob);
             }
             else if (novationTradeDateNode.Attributes["href"] != null)
             {
                 novationTradeDateIDRef_ = novationTradeDateNode.Attributes["href"].Value;
             }
             else
             {
                 novationTradeDate_ = new XsdTypeDate(novationTradeDateNode);
             }
         }
         else
         {
             novationTradeDate_ = new XsdTypeDate(novationTradeDateNode);
         }
     }
     
 
     XmlNodeList novatedAmountNodeList = xmlNode.SelectNodes("novatedAmount");
     
     if (novatedAmountNodeList != null)
     {
         this.novatedAmount_ = new List<Money>();
         foreach (XmlNode item in novatedAmountNodeList)
         {
             if (item.Attributes["href"] != null || item.Attributes["id"] != null) 
             {
                 if (item.Attributes["id"] != null) 
                 {
                     novatedAmountIDRef_ = item.Attributes["id"].Value;
                     novatedAmount_.Add(new Money(item));
                     IDManager.SetID(novatedAmountIDRef_, novatedAmount_[novatedAmount_.Count - 1 ]);
                 }
                 else if (item.Attributes["href"] != null)
                 {
                     novatedAmountIDRef_ = item.Attributes["href"].Value;
                 }
                 else
                 {
                 novatedAmount_.Add(new Money(item));
                 }
             }
             else
             {
                 novatedAmount_.Add(new Money(item));
             }
         }
     }
     
 
     XmlNodeList remainingAmountNodeList = xmlNode.SelectNodes("remainingAmount");
     
     if (remainingAmountNodeList != null)
     {
         this.remainingAmount_ = new List<Money>();
         foreach (XmlNode item in remainingAmountNodeList)
         {
             if (item.Attributes["href"] != null || item.Attributes["id"] != null) 
             {
                 if (item.Attributes["id"] != null) 
                 {
                     remainingAmountIDRef_ = item.Attributes["id"].Value;
                     remainingAmount_.Add(new Money(item));
                     IDManager.SetID(remainingAmountIDRef_, remainingAmount_[remainingAmount_.Count - 1 ]);
                 }
                 else if (item.Attributes["href"] != null)
                 {
                     remainingAmountIDRef_ = item.Attributes["href"].Value;
                 }
                 else
                 {
                 remainingAmount_.Add(new Money(item));
                 }
             }
             else
             {
                 remainingAmount_.Add(new Money(item));
             }
         }
     }
     
 
     XmlNode novatedNumberOfOptionsNode = xmlNode.SelectSingleNode("novatedNumberOfOptions");
     
     if (novatedNumberOfOptionsNode != null)
     {
         if (novatedNumberOfOptionsNode.Attributes["href"] != null || novatedNumberOfOptionsNode.Attributes["id"] != null) 
         {
             if (novatedNumberOfOptionsNode.Attributes["id"] != null) 
             {
                 novatedNumberOfOptionsIDRef_ = novatedNumberOfOptionsNode.Attributes["id"].Value;
                 XsdTypeDecimal ob = new XsdTypeDecimal(novatedNumberOfOptionsNode);
                 IDManager.SetID(novatedNumberOfOptionsIDRef_, ob);
             }
             else if (novatedNumberOfOptionsNode.Attributes["href"] != null)
             {
                 novatedNumberOfOptionsIDRef_ = novatedNumberOfOptionsNode.Attributes["href"].Value;
             }
             else
             {
                 novatedNumberOfOptions_ = new XsdTypeDecimal(novatedNumberOfOptionsNode);
             }
         }
         else
         {
             novatedNumberOfOptions_ = new XsdTypeDecimal(novatedNumberOfOptionsNode);
         }
     }
     
 
     XmlNode remainingNumberOfOptionsNode = xmlNode.SelectSingleNode("remainingNumberOfOptions");
     
     if (remainingNumberOfOptionsNode != null)
     {
         if (remainingNumberOfOptionsNode.Attributes["href"] != null || remainingNumberOfOptionsNode.Attributes["id"] != null) 
         {
             if (remainingNumberOfOptionsNode.Attributes["id"] != null) 
             {
                 remainingNumberOfOptionsIDRef_ = remainingNumberOfOptionsNode.Attributes["id"].Value;
                 XsdTypeDecimal ob = new XsdTypeDecimal(remainingNumberOfOptionsNode);
                 IDManager.SetID(remainingNumberOfOptionsIDRef_, ob);
             }
             else if (remainingNumberOfOptionsNode.Attributes["href"] != null)
             {
                 remainingNumberOfOptionsIDRef_ = remainingNumberOfOptionsNode.Attributes["href"].Value;
             }
             else
             {
                 remainingNumberOfOptions_ = new XsdTypeDecimal(remainingNumberOfOptionsNode);
             }
         }
         else
         {
             remainingNumberOfOptions_ = new XsdTypeDecimal(remainingNumberOfOptionsNode);
         }
     }
     
 
     XmlNode novatedNumberOfUnitsNode = xmlNode.SelectSingleNode("novatedNumberOfUnits");
     
     if (novatedNumberOfUnitsNode != null)
     {
         if (novatedNumberOfUnitsNode.Attributes["href"] != null || novatedNumberOfUnitsNode.Attributes["id"] != null) 
         {
             if (novatedNumberOfUnitsNode.Attributes["id"] != null) 
             {
                 novatedNumberOfUnitsIDRef_ = novatedNumberOfUnitsNode.Attributes["id"].Value;
                 XsdTypeDecimal ob = new XsdTypeDecimal(novatedNumberOfUnitsNode);
                 IDManager.SetID(novatedNumberOfUnitsIDRef_, ob);
             }
             else if (novatedNumberOfUnitsNode.Attributes["href"] != null)
             {
                 novatedNumberOfUnitsIDRef_ = novatedNumberOfUnitsNode.Attributes["href"].Value;
             }
             else
             {
                 novatedNumberOfUnits_ = new XsdTypeDecimal(novatedNumberOfUnitsNode);
             }
         }
         else
         {
             novatedNumberOfUnits_ = new XsdTypeDecimal(novatedNumberOfUnitsNode);
         }
     }
     
 
     XmlNode remainingNumberOfUnitsNode = xmlNode.SelectSingleNode("remainingNumberOfUnits");
     
     if (remainingNumberOfUnitsNode != null)
     {
         if (remainingNumberOfUnitsNode.Attributes["href"] != null || remainingNumberOfUnitsNode.Attributes["id"] != null) 
         {
             if (remainingNumberOfUnitsNode.Attributes["id"] != null) 
             {
                 remainingNumberOfUnitsIDRef_ = remainingNumberOfUnitsNode.Attributes["id"].Value;
                 XsdTypeDecimal ob = new XsdTypeDecimal(remainingNumberOfUnitsNode);
                 IDManager.SetID(remainingNumberOfUnitsIDRef_, ob);
             }
             else if (remainingNumberOfUnitsNode.Attributes["href"] != null)
             {
                 remainingNumberOfUnitsIDRef_ = remainingNumberOfUnitsNode.Attributes["href"].Value;
             }
             else
             {
                 remainingNumberOfUnits_ = new XsdTypeDecimal(remainingNumberOfUnitsNode);
             }
         }
         else
         {
             remainingNumberOfUnits_ = new XsdTypeDecimal(remainingNumberOfUnitsNode);
         }
     }
     
 
     XmlNode fullFirstCalculationPeriodNode = xmlNode.SelectSingleNode("fullFirstCalculationPeriod");
     
     if (fullFirstCalculationPeriodNode != null)
     {
         if (fullFirstCalculationPeriodNode.Attributes["href"] != null || fullFirstCalculationPeriodNode.Attributes["id"] != null) 
         {
             if (fullFirstCalculationPeriodNode.Attributes["id"] != null) 
             {
                 fullFirstCalculationPeriodIDRef_ = fullFirstCalculationPeriodNode.Attributes["id"].Value;
                 XsdTypeBoolean ob = new XsdTypeBoolean(fullFirstCalculationPeriodNode);
                 IDManager.SetID(fullFirstCalculationPeriodIDRef_, ob);
             }
             else if (fullFirstCalculationPeriodNode.Attributes["href"] != null)
             {
                 fullFirstCalculationPeriodIDRef_ = fullFirstCalculationPeriodNode.Attributes["href"].Value;
             }
             else
             {
                 fullFirstCalculationPeriod_ = new XsdTypeBoolean(fullFirstCalculationPeriodNode);
             }
         }
         else
         {
             fullFirstCalculationPeriod_ = new XsdTypeBoolean(fullFirstCalculationPeriodNode);
         }
     }
     
 
     XmlNodeList firstPeriodStartDateNodeList = xmlNode.SelectNodes("firstPeriodStartDate");
     
     if (firstPeriodStartDateNodeList != null)
     {
         this.firstPeriodStartDate_ = new List<FirstPeriodStartDate>();
         foreach (XmlNode item in firstPeriodStartDateNodeList)
         {
             if (item.Attributes["href"] != null || item.Attributes["id"] != null) 
             {
                 if (item.Attributes["id"] != null) 
                 {
                     firstPeriodStartDateIDRef_ = item.Attributes["id"].Value;
                     firstPeriodStartDate_.Add(new FirstPeriodStartDate(item));
                     IDManager.SetID(firstPeriodStartDateIDRef_, firstPeriodStartDate_[firstPeriodStartDate_.Count - 1 ]);
                 }
                 else if (item.Attributes["href"] != null)
                 {
                     firstPeriodStartDateIDRef_ = item.Attributes["href"].Value;
                 }
                 else
                 {
                 firstPeriodStartDate_.Add(new FirstPeriodStartDate(item));
                 }
             }
             else
             {
                 firstPeriodStartDate_.Add(new FirstPeriodStartDate(item));
             }
         }
     }
     
 
     XmlNode nonRelianceNode = xmlNode.SelectSingleNode("nonReliance");
     
     if (nonRelianceNode != null)
     {
         if (nonRelianceNode.Attributes["href"] != null || nonRelianceNode.Attributes["id"] != null) 
         {
             if (nonRelianceNode.Attributes["id"] != null) 
             {
                 nonRelianceIDRef_ = nonRelianceNode.Attributes["id"].Value;
                 Empty ob = new Empty(nonRelianceNode);
                 IDManager.SetID(nonRelianceIDRef_, ob);
             }
             else if (nonRelianceNode.Attributes["href"] != null)
             {
                 nonRelianceIDRef_ = nonRelianceNode.Attributes["href"].Value;
             }
             else
             {
                 nonReliance_ = new Empty(nonRelianceNode);
             }
         }
         else
         {
             nonReliance_ = new Empty(nonRelianceNode);
         }
     }
     
 
     XmlNode creditDerivativesNoticesNode = xmlNode.SelectSingleNode("creditDerivativesNotices");
     
     if (creditDerivativesNoticesNode != null)
     {
         if (creditDerivativesNoticesNode.Attributes["href"] != null || creditDerivativesNoticesNode.Attributes["id"] != null) 
         {
             if (creditDerivativesNoticesNode.Attributes["id"] != null) 
             {
                 creditDerivativesNoticesIDRef_ = creditDerivativesNoticesNode.Attributes["id"].Value;
                 CreditDerivativesNotices ob = new CreditDerivativesNotices(creditDerivativesNoticesNode);
                 IDManager.SetID(creditDerivativesNoticesIDRef_, ob);
             }
             else if (creditDerivativesNoticesNode.Attributes["href"] != null)
             {
                 creditDerivativesNoticesIDRef_ = creditDerivativesNoticesNode.Attributes["href"].Value;
             }
             else
             {
                 creditDerivativesNotices_ = new CreditDerivativesNotices(creditDerivativesNoticesNode);
             }
         }
         else
         {
             creditDerivativesNotices_ = new CreditDerivativesNotices(creditDerivativesNoticesNode);
         }
     }
     
 
     XmlNodeList contractualDefinitionsNodeList = xmlNode.SelectNodes("contractualDefinitions");
     
     if (contractualDefinitionsNodeList != null)
     {
         this.contractualDefinitions_ = new List<ContractualDefinitions>();
         foreach (XmlNode item in contractualDefinitionsNodeList)
         {
             if (item.Attributes["href"] != null || item.Attributes["id"] != null) 
             {
                 if (item.Attributes["id"] != null) 
                 {
                     contractualDefinitionsIDRef_ = item.Attributes["id"].Value;
                     contractualDefinitions_.Add(new ContractualDefinitions(item));
                     IDManager.SetID(contractualDefinitionsIDRef_, contractualDefinitions_[contractualDefinitions_.Count - 1 ]);
                 }
                 else if (item.Attributes["href"] != null)
                 {
                     contractualDefinitionsIDRef_ = item.Attributes["href"].Value;
                 }
                 else
                 {
                 contractualDefinitions_.Add(new ContractualDefinitions(item));
                 }
             }
             else
             {
                 contractualDefinitions_.Add(new ContractualDefinitions(item));
             }
         }
     }
     
 
     XmlNodeList contractualTermsSupplementNodeList = xmlNode.SelectNodes("contractualTermsSupplement");
     
     if (contractualTermsSupplementNodeList != null)
     {
         this.contractualTermsSupplement_ = new List<ContractualTermsSupplement>();
         foreach (XmlNode item in contractualTermsSupplementNodeList)
         {
             if (item.Attributes["href"] != null || item.Attributes["id"] != null) 
             {
                 if (item.Attributes["id"] != null) 
                 {
                     contractualTermsSupplementIDRef_ = item.Attributes["id"].Value;
                     contractualTermsSupplement_.Add(new ContractualTermsSupplement(item));
                     IDManager.SetID(contractualTermsSupplementIDRef_, contractualTermsSupplement_[contractualTermsSupplement_.Count - 1 ]);
                 }
                 else if (item.Attributes["href"] != null)
                 {
                     contractualTermsSupplementIDRef_ = item.Attributes["href"].Value;
                 }
                 else
                 {
                 contractualTermsSupplement_.Add(new ContractualTermsSupplement(item));
                 }
             }
             else
             {
                 contractualTermsSupplement_.Add(new ContractualTermsSupplement(item));
             }
         }
     }
     
 
     XmlNode paymentNode = xmlNode.SelectSingleNode("payment");
     
     if (paymentNode != null)
     {
         if (paymentNode.Attributes["href"] != null || paymentNode.Attributes["id"] != null) 
         {
             if (paymentNode.Attributes["id"] != null) 
             {
                 paymentIDRef_ = paymentNode.Attributes["id"].Value;
                 Payment ob = new Payment(paymentNode);
                 IDManager.SetID(paymentIDRef_, ob);
             }
             else if (paymentNode.Attributes["href"] != null)
             {
                 paymentIDRef_ = paymentNode.Attributes["href"].Value;
             }
             else
             {
                 payment_ = new Payment(paymentNode);
             }
         }
         else
         {
             payment_ = new Payment(paymentNode);
         }
     }
     
 
 }
 private void HealFx(Empty empty)
 {
     healFx.GetComponent <ParticleSystem>().Play();
 }
Example #36
0
 public override AuthorityInfo GetMethodFeeController(Empty input)
 {
     RequiredMethodFeeControllerSet();
     return(State.MethodFeeController.Value);
 }
Example #37
0
        IList <DataConstantValue> IDataContext.ToList()
        {
            if (_lazyContext == null || _lazyContext == DataContext.Empty)
            {
                return new List <DataConstantValue> {
                           BindingConstants.Binding.ToValue(this)
                }
            }
            ;
            return(_lazyContext.ToList());
        }

        #endregion

        #region Implementation of ICollection<IBindingBehavior>

        IEnumerator <IBindingBehavior> IEnumerable <IBindingBehavior> .GetEnumerator()
        {
            return(GetBehaviorEnumerator());
        }

        IEnumerator IEnumerable.GetEnumerator()
        {
            return(GetBehaviorEnumerator());
        }

        void ICollection <IBindingBehavior> .Add(IBindingBehavior item)
        {
            if (IsDisposed)
            {
                return;
            }
            CheckBehavior(item);
            if (!item.Attach(this))
            {
                return;
            }
            if (_size == _items.Length)
            {
                EnsureCapacity(_size + 1);
            }
            _items[_size++] = item;
            OnBehaviorAdded(item);
        }

        void ICollection <IBindingBehavior> .Clear()
        {
            for (int i = 0; i < _size; i++)
            {
                var behavior = _items[i];
                behavior.Detach(this);
                OnBehaviorRemoved(behavior);
            }
            _size  = 0;
            _items = Empty.Array <IBindingBehavior>();
        }

        bool ICollection <IBindingBehavior> .Contains(IBindingBehavior item)
        {
            Should.NotBeNull(item, nameof(item));
            return(IndexOf(item) >= 0);
        }

        void ICollection <IBindingBehavior> .CopyTo(IBindingBehavior[] array, int arrayIndex)
        {
            Array.Copy(_items, 0, array, arrayIndex, _size);
        }

        bool ICollection <IBindingBehavior> .Remove(IBindingBehavior item)
        {
            Should.NotBeNull(item, nameof(item));
            int index = IndexOf(item);

            if (index < 0)
            {
                return(false);
            }
            IBindingBehavior behavior = _items[index];

            --_size;
            if (index < _size)
            {
                Array.Copy(_items, index + 1, _items, index, _size - index);
            }
            _items[_size] = null;
            behavior.Detach(this);
            OnBehaviorRemoved(behavior);
            return(true);
        }

        int ICollection <IBindingBehavior> .Count => _size;

        bool ICollection <IBindingBehavior> .IsReadOnly => false;

        #endregion
    }
Example #38
0
        private void handleBrewProcess(GrainBrainStatus status)
        {
            if (status.State == BrewStep.StrikeWaterTempReached)
            {
                //dispatcherTimer.Tick -= brewProcessTimer_Tick;
                dispatcherTimer.IsEnabled = false;

                var swrw = new StrikeWaterReachedWindow();
                swrw.ShowDialog();

                IPAddress ipAddr;
                if (!GrainbrainNetDiscovery.GetGrainBrainAddress(out ipAddr))
                {
                    return;
                }

                string  addr = String.Format("{0}:50051", ipAddr);
                Channel ch   = new Channel(addr, ChannelCredentials.Insecure);

                McServer.McServerClient cl = new McServer.McServerClient(ch);

                GrainsAddedNotify req  = new GrainsAddedNotify();
                Empty             resp = cl.GrainsAdded(req);
                ch.ShutdownAsync().Wait();

                //dispatcherTimer.Tick += brewProcessTimer_Tick;
                dispatcherTimer.IsEnabled = true;
            }

            if (status.State == BrewStep.MashDoneStartSparge)
            {
                dispatcherTimer.IsEnabled = false;

                var sdw = new SpargeDoneWindow();
                sdw.ShowDialog();

                IPAddress ipAddr;
                if (!GrainbrainNetDiscovery.GetGrainBrainAddress(out ipAddr))
                {
                    return;
                }

                string addr = String.Format("{0}:50051", ipAddr);

                Channel ch = new Channel(addr, ChannelCredentials.Insecure);

                McServer.McServerClient cl = new McServer.McServerClient(ch);

                SpargeDoneNotify req  = new SpargeDoneNotify();
                Empty            resp = cl.SpargeDone(req);
                ch.ShutdownAsync().Wait();

                dispatcherTimer.IsEnabled = true;
            }

            if (status.State == BrewStep.BoilDone)
            {
                dispatcherTimer.IsEnabled = false;

                var wcsw = new WortChillerSanitizedWindow();
                wcsw.ShowDialog();

                IPAddress ipAddr;
                if (!GrainbrainNetDiscovery.GetGrainBrainAddress(out ipAddr))
                {
                    return;
                }

                string addr = String.Format("{0}:50051", ipAddr);

                Channel ch = new Channel(addr, ChannelCredentials.Insecure);

                McServer.McServerClient cl = new McServer.McServerClient(ch);

                WortChillerSanitizedDoneNotify req = new WortChillerSanitizedDoneNotify();
                Empty resp = cl.WortChillerSanitizedDone(req);
                ch.ShutdownAsync().Wait();

                dispatcherTimer.IsEnabled = true;
            }
        }
Example #39
0
 public override Empty DummyMethod(Empty input)
 {
     return(new Empty());
 }
Example #40
0
 public override Task <CounterReply> IncrementCountReturnNull(Empty request, ServerCallContext context)
 {
     return(Task.FromResult <CounterReply>(null));
 }
Example #41
0
 public override Empty SendForFun(Empty input)
 {
     return(new Empty());
 }
Example #42
0
 public IList <IDataBinding> SetBindings(string bind)
 {
     _bind = bind;
     return(Empty.Array <IDataBinding>());
 }
Example #43
0
 public ImmutableList(IEnumerable <T> items)
 {
     this.root = Empty.InsertAt(0, items).root;
 }
Example #44
0
 public override void ReadCompletionCallback(ref long key, ref long input, ref long output, Empty ctx, Status status, RecordMetadata recordMetadata)
 {
     Assert.IsTrue(status.Found, $"status = {status}");
     Assert.AreEqual(key, output, $"output = {output}");
 }
 public void OnUserLoggedOut(Empty empty)
 {
     this.ResetFilter();
 }
Example #46
0
 public override void ReadCompletionCallback(ref long key, ref long input, ref long output, Empty ctx, Status status, RecordMetadata recordMetadata)
 {
     Verify(status, key, output);
 }
Example #47
0
 public override SInt64Value GetTransactionSizeFeeUnitPrice(Empty input)
 {
     return(new SInt64Value {
         Value = State.TransactionFeeUnitPrice.Value
     });
 }
Example #48
0
        public static IGPrx allTests(TestHelper helper)
        {
            Communicator?communicator = helper.Communicator();

            TestHelper.Assert(communicator != null);
            System.IO.TextWriter output = helper.GetWriter();
            output.Write("testing Ice.Admin.Facets property... ");
            TestHelper.Assert(communicator.GetPropertyAsList("Ice.Admin.Facets") == null);
            communicator.SetProperty("Ice.Admin.Facets", "foobar");
            string[]? facetFilter = communicator.GetPropertyAsList("Ice.Admin.Facets");
            TestHelper.Assert(facetFilter != null && facetFilter.Length == 1 && facetFilter[0].Equals("foobar"));
            communicator.SetProperty("Ice.Admin.Facets", "foo\\'bar");
            facetFilter = communicator.GetPropertyAsList("Ice.Admin.Facets");
            TestHelper.Assert(facetFilter != null && facetFilter.Length == 1 && facetFilter[0].Equals("foo'bar"));
            communicator.SetProperty("Ice.Admin.Facets", "'foo bar' toto 'titi'");
            facetFilter = communicator.GetPropertyAsList("Ice.Admin.Facets");
            TestHelper.Assert(facetFilter != null && facetFilter.Length == 3 && facetFilter[0].Equals("foo bar") &&
                              facetFilter[1].Equals("toto") && facetFilter[2].Equals("titi"));
            communicator.SetProperty("Ice.Admin.Facets", "'foo bar\\' toto' 'titi'");
            facetFilter = communicator.GetPropertyAsList("Ice.Admin.Facets");
            TestHelper.Assert(facetFilter != null && facetFilter.Length == 2 && facetFilter[0].Equals("foo bar' toto") &&
                              facetFilter[1].Equals("titi"));
            // communicator.SetProperty("Ice.Admin.Facets", "'foo bar' 'toto titi");
            // facetFilter = communicator.Properties.getPropertyAsList("Ice.Admin.Facets");
            // TestHelper.Assert(facetFilter.Length == 0);
            communicator.SetProperty("Ice.Admin.Facets", "");
            output.WriteLine("ok");

            output.Write("testing facet registration exceptions... ");
            communicator.SetProperty("FacetExceptionTestAdapter.Endpoints", "tcp -h *");
            ObjectAdapter adapter = communicator.CreateObjectAdapter("FacetExceptionTestAdapter");

            var obj = new Empty();

            adapter.Add("d", obj);
            adapter.Add("d", "facetABCD", obj);
            try
            {
                adapter.Add("d", "facetABCD", obj);
                TestHelper.Assert(false);
            }
            catch (System.ArgumentException)
            {
            }
            adapter.Remove("d", "facetABCD");
            adapter.Remove("d", "facetABCD"); // multiple Remove are fine as of Ice 4.0
            output.WriteLine("ok");

            adapter.Deactivate();

            var   prx = IObjectPrx.Parse($"d:{helper.GetTestEndpoint(0)}", communicator);
            IDPrx?d;
            IDPrx?df2;
            IDPrx?df3;

            output.Write("testing unchecked cast... ");
            output.Flush();
            d = IDPrx.UncheckedCast(prx);
            TestHelper.Assert(d != null);
            TestHelper.Assert(d.Facet.Length == 0);
            IDPrx df = prx.Clone("facetABCD", IDPrx.Factory);

            TestHelper.Assert(df.Facet == "facetABCD");
            df2 = IDPrx.UncheckedCast(df);
            TestHelper.Assert(df2 != null);
            TestHelper.Assert(df2.Facet == "facetABCD");
            df3 = df.Clone(facet: "", IDPrx.Factory);
            TestHelper.Assert(df3 != null);
            TestHelper.Assert(df3.Facet.Length == 0);
            output.WriteLine("ok");

            output.Write("testing checked cast... ");
            output.Flush();
            d = IDPrx.CheckedCast(prx);
            TestHelper.Assert(d != null);
            TestHelper.Assert(d.Facet.Length == 0);
            df = prx.Clone(facet: "facetABCD", IDPrx.Factory);
            TestHelper.Assert(df.Facet == "facetABCD");
            df2 = IDPrx.CheckedCast(df);
            TestHelper.Assert(df2 != null);
            TestHelper.Assert(df2.Facet == "facetABCD");
            df3 = df.Clone(facet: "", IDPrx.Factory);
            TestHelper.Assert(df3.Facet.Length == 0);
            output.WriteLine("ok");

            output.Write("testing non-facets A, B, C, and D... ");
            output.Flush();
            d = IDPrx.CheckedCast(prx);
            TestHelper.Assert(d != null);
            TestHelper.Assert(d.Equals(prx));
            TestHelper.Assert(d.callA().Equals("A"));
            TestHelper.Assert(d.callB().Equals("B"));
            TestHelper.Assert(d.callC().Equals("C"));
            TestHelper.Assert(d.callD().Equals("D"));
            output.WriteLine("ok");

            output.Write("testing facets A, B, C, and D... ");
            output.Flush();
            df = d.Clone(facet: "facetABCD", IDPrx.Factory);
            TestHelper.Assert(df != null);
            TestHelper.Assert(df.callA().Equals("A"));
            TestHelper.Assert(df.callB().Equals("B"));
            TestHelper.Assert(df.callC().Equals("C"));
            TestHelper.Assert(df.callD().Equals("D"));
            output.WriteLine("ok");

            output.Write("testing facets E and F... ");
            output.Flush();
            IFPrx ff = d.Clone(facet: "facetEF", IFPrx.Factory);

            TestHelper.Assert(ff.callE().Equals("E"));
            TestHelper.Assert(ff.callF().Equals("F"));
            output.WriteLine("ok");

            output.Write("testing facet G... ");
            output.Flush();
            IGPrx gf = ff.Clone(facet: "facetGH", IGPrx.Factory);

            TestHelper.Assert(gf.callG().Equals("G"));
            output.WriteLine("ok");

            output.Write("testing whether casting preserves the facet... ");
            output.Flush();
            var hf = IHPrx.CheckedCast(gf);

            TestHelper.Assert(hf != null);
            TestHelper.Assert(hf.callG().Equals("G"));
            TestHelper.Assert(hf.callH().Equals("H"));
            output.WriteLine("ok");
            return(gf);
        }
 private void HandleCollisionEvent(Empty empty)
 {
     collideTime = Time.time;
     flashing    = true;
     meshRenderer.SetPropertyBlock(flashingMaterial);
 }
 public void OnUserLoggedOut(Empty empty)
 {
     this.UserContext.Reset();
     _statusBar.Clear();
 }
Example #51
0
 public override Hash GetTreasurySchemeId(Empty input)
 {
     return(State.TreasuryHash.Value ?? Hash.Empty);
 }
 private void OnAccountUpdated(Empty empty)
 {
     UpdateAccountSummaries();
 }
		void CreateEmptyViewTemplatePreprocessor()
		{
			mvcHost = new TestableMvcTextTemplateHost();
			emptyViewTemplate = new Empty();
			emptyViewTemplate.Host = mvcHost;
		}
 private void OnAllAccountsUpdate(Empty empty)
 {
     UpdateAccountSummaries();
 }
 public TradeNovationContent(XmlNode xmlNode)
 : base(xmlNode)
 {
     XmlNodeList newTradeIdentifierNodeList = xmlNode.SelectNodes("newTradeIdentifier");
     
     foreach (XmlNode item in newTradeIdentifierNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 newTradeIdentifierIDRef = item.Attributes["id"].Name;
                 List<PartyTradeIdentifier> ob = new List<PartyTradeIdentifier>();
                 ob.Add(new PartyTradeIdentifier(item));
                 IDManager.SetID(newTradeIdentifierIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 newTradeIdentifierIDRef = item.Attributes["href"].Name;
             }
             else
             {
             newTradeIdentifier.Add(new PartyTradeIdentifier(item));
             }
         }
     }
     
 
     XmlNodeList newTradeNodeList = xmlNode.SelectNodes("newTrade");
     if (newTradeNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in newTradeNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 newTradeIDRef = item.Attributes["id"].Name;
                 Trade ob = Trade();
                 IDManager.SetID(newTradeIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 newTradeIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 newTrade = new Trade(item);
             }
         }
     }
     
 
     XmlNodeList oldTradeIdentifierNodeList = xmlNode.SelectNodes("oldTradeIdentifier");
     
     foreach (XmlNode item in oldTradeIdentifierNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 oldTradeIdentifierIDRef = item.Attributes["id"].Name;
                 List<PartyTradeIdentifier> ob = new List<PartyTradeIdentifier>();
                 ob.Add(new PartyTradeIdentifier(item));
                 IDManager.SetID(oldTradeIdentifierIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 oldTradeIdentifierIDRef = item.Attributes["href"].Name;
             }
             else
             {
             oldTradeIdentifier.Add(new PartyTradeIdentifier(item));
             }
         }
     }
     
 
     XmlNodeList oldTradeNodeList = xmlNode.SelectNodes("oldTrade");
     if (oldTradeNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in oldTradeNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 oldTradeIDRef = item.Attributes["id"].Name;
                 Trade ob = Trade();
                 IDManager.SetID(oldTradeIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 oldTradeIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 oldTrade = new Trade(item);
             }
         }
     }
     
 
     XmlNodeList feeTradeIdentifierNodeList = xmlNode.SelectNodes("feeTradeIdentifier");
     if (feeTradeIdentifierNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in feeTradeIdentifierNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 feeTradeIdentifierIDRef = item.Attributes["id"].Name;
                 PartyTradeIdentifier ob = PartyTradeIdentifier();
                 IDManager.SetID(feeTradeIdentifierIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 feeTradeIdentifierIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 feeTradeIdentifier = new PartyTradeIdentifier(item);
             }
         }
     }
     
 
     XmlNodeList feeTradeNodeList = xmlNode.SelectNodes("feeTrade");
     if (feeTradeNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in feeTradeNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 feeTradeIDRef = item.Attributes["id"].Name;
                 Trade ob = Trade();
                 IDManager.SetID(feeTradeIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 feeTradeIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 feeTrade = new Trade(item);
             }
         }
     }
     
 
     XmlNodeList transferorNodeList = xmlNode.SelectNodes("transferor");
     if (transferorNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in transferorNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 transferorIDRef = item.Attributes["id"].Name;
                 PartyReference ob = PartyReference();
                 IDManager.SetID(transferorIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 transferorIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 transferor = new PartyReference(item);
             }
         }
     }
     
 
     XmlNodeList transferorAccountNodeList = xmlNode.SelectNodes("transferorAccount");
     if (transferorAccountNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in transferorAccountNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 transferorAccountIDRef = item.Attributes["id"].Name;
                 AccountReference ob = AccountReference();
                 IDManager.SetID(transferorAccountIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 transferorAccountIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 transferorAccount = new AccountReference(item);
             }
         }
     }
     
 
     XmlNodeList transfereeNodeList = xmlNode.SelectNodes("transferee");
     if (transfereeNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in transfereeNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 transfereeIDRef = item.Attributes["id"].Name;
                 PartyReference ob = PartyReference();
                 IDManager.SetID(transfereeIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 transfereeIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 transferee = new PartyReference(item);
             }
         }
     }
     
 
     XmlNodeList otherTransfereeNodeList = xmlNode.SelectNodes("otherTransferee");
     if (otherTransfereeNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in otherTransfereeNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 otherTransfereeIDRef = item.Attributes["id"].Name;
                 PartyReference ob = PartyReference();
                 IDManager.SetID(otherTransfereeIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 otherTransfereeIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 otherTransferee = new PartyReference(item);
             }
         }
     }
     
 
     XmlNodeList transfereeAccountNodeList = xmlNode.SelectNodes("transfereeAccount");
     if (transfereeAccountNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in transfereeAccountNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 transfereeAccountIDRef = item.Attributes["id"].Name;
                 AccountReference ob = AccountReference();
                 IDManager.SetID(transfereeAccountIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 transfereeAccountIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 transfereeAccount = new AccountReference(item);
             }
         }
     }
     
 
     XmlNodeList otherTransfereeAccountNodeList = xmlNode.SelectNodes("otherTransfereeAccount");
     if (otherTransfereeAccountNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in otherTransfereeAccountNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 otherTransfereeAccountIDRef = item.Attributes["id"].Name;
                 AccountReference ob = AccountReference();
                 IDManager.SetID(otherTransfereeAccountIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 otherTransfereeAccountIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 otherTransfereeAccount = new AccountReference(item);
             }
         }
     }
     
 
     XmlNodeList remainingPartyNodeList = xmlNode.SelectNodes("remainingParty");
     if (remainingPartyNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in remainingPartyNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 remainingPartyIDRef = item.Attributes["id"].Name;
                 PartyReference ob = PartyReference();
                 IDManager.SetID(remainingPartyIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 remainingPartyIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 remainingParty = new PartyReference(item);
             }
         }
     }
     
 
     XmlNodeList remainingPartyAccountNodeList = xmlNode.SelectNodes("remainingPartyAccount");
     if (remainingPartyAccountNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in remainingPartyAccountNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 remainingPartyAccountIDRef = item.Attributes["id"].Name;
                 AccountReference ob = AccountReference();
                 IDManager.SetID(remainingPartyAccountIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 remainingPartyAccountIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 remainingPartyAccount = new AccountReference(item);
             }
         }
     }
     
 
     XmlNodeList otherRemainingPartyNodeList = xmlNode.SelectNodes("otherRemainingParty");
     if (otherRemainingPartyNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in otherRemainingPartyNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 otherRemainingPartyIDRef = item.Attributes["id"].Name;
                 PartyReference ob = PartyReference();
                 IDManager.SetID(otherRemainingPartyIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 otherRemainingPartyIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 otherRemainingParty = new PartyReference(item);
             }
         }
     }
     
 
     XmlNodeList otherRemainingPartyAccountNodeList = xmlNode.SelectNodes("otherRemainingPartyAccount");
     if (otherRemainingPartyAccountNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in otherRemainingPartyAccountNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 otherRemainingPartyAccountIDRef = item.Attributes["id"].Name;
                 AccountReference ob = AccountReference();
                 IDManager.SetID(otherRemainingPartyAccountIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 otherRemainingPartyAccountIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 otherRemainingPartyAccount = new AccountReference(item);
             }
         }
     }
     
 
     XmlNodeList novationDateNodeList = xmlNode.SelectNodes("novationDate");
     if (novationDateNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in novationDateNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 novationDateIDRef = item.Attributes["id"].Name;
                 XsdTypeDate ob = XsdTypeDate();
                 IDManager.SetID(novationDateIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 novationDateIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 novationDate = new XsdTypeDate(item);
             }
         }
     }
     
 
     XmlNodeList executionDateTimeNodeList = xmlNode.SelectNodes("executionDateTime");
     if (executionDateTimeNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in executionDateTimeNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 executionDateTimeIDRef = item.Attributes["id"].Name;
                 ExecutionDateTime ob = ExecutionDateTime();
                 IDManager.SetID(executionDateTimeIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 executionDateTimeIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 executionDateTime = new ExecutionDateTime(item);
             }
         }
     }
     
 
     XmlNodeList novationTradeDateNodeList = xmlNode.SelectNodes("novationTradeDate");
     if (novationTradeDateNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in novationTradeDateNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 novationTradeDateIDRef = item.Attributes["id"].Name;
                 XsdTypeDate ob = XsdTypeDate();
                 IDManager.SetID(novationTradeDateIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 novationTradeDateIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 novationTradeDate = new XsdTypeDate(item);
             }
         }
     }
     
 
     XmlNodeList novatedAmountNodeList = xmlNode.SelectNodes("novatedAmount");
     
     foreach (XmlNode item in novatedAmountNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 novatedAmountIDRef = item.Attributes["id"].Name;
                 List<Money> ob = new List<Money>();
                 ob.Add(new Money(item));
                 IDManager.SetID(novatedAmountIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 novatedAmountIDRef = item.Attributes["href"].Name;
             }
             else
             {
             novatedAmount.Add(new Money(item));
             }
         }
     }
     
 
     XmlNodeList remainingAmountNodeList = xmlNode.SelectNodes("remainingAmount");
     
     foreach (XmlNode item in remainingAmountNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 remainingAmountIDRef = item.Attributes["id"].Name;
                 List<Money> ob = new List<Money>();
                 ob.Add(new Money(item));
                 IDManager.SetID(remainingAmountIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 remainingAmountIDRef = item.Attributes["href"].Name;
             }
             else
             {
             remainingAmount.Add(new Money(item));
             }
         }
     }
     
 
     XmlNodeList novatedNumberOfOptionsNodeList = xmlNode.SelectNodes("novatedNumberOfOptions");
     if (novatedNumberOfOptionsNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in novatedNumberOfOptionsNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 novatedNumberOfOptionsIDRef = item.Attributes["id"].Name;
                 XsdTypeDecimal ob = XsdTypeDecimal();
                 IDManager.SetID(novatedNumberOfOptionsIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 novatedNumberOfOptionsIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 novatedNumberOfOptions = new XsdTypeDecimal(item);
             }
         }
     }
     
 
     XmlNodeList remainingNumberOfOptionsNodeList = xmlNode.SelectNodes("remainingNumberOfOptions");
     if (remainingNumberOfOptionsNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in remainingNumberOfOptionsNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 remainingNumberOfOptionsIDRef = item.Attributes["id"].Name;
                 XsdTypeDecimal ob = XsdTypeDecimal();
                 IDManager.SetID(remainingNumberOfOptionsIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 remainingNumberOfOptionsIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 remainingNumberOfOptions = new XsdTypeDecimal(item);
             }
         }
     }
     
 
     XmlNodeList novatedNumberOfUnitsNodeList = xmlNode.SelectNodes("novatedNumberOfUnits");
     if (novatedNumberOfUnitsNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in novatedNumberOfUnitsNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 novatedNumberOfUnitsIDRef = item.Attributes["id"].Name;
                 XsdTypeDecimal ob = XsdTypeDecimal();
                 IDManager.SetID(novatedNumberOfUnitsIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 novatedNumberOfUnitsIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 novatedNumberOfUnits = new XsdTypeDecimal(item);
             }
         }
     }
     
 
     XmlNodeList remainingNumberOfUnitsNodeList = xmlNode.SelectNodes("remainingNumberOfUnits");
     if (remainingNumberOfUnitsNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in remainingNumberOfUnitsNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 remainingNumberOfUnitsIDRef = item.Attributes["id"].Name;
                 XsdTypeDecimal ob = XsdTypeDecimal();
                 IDManager.SetID(remainingNumberOfUnitsIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 remainingNumberOfUnitsIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 remainingNumberOfUnits = new XsdTypeDecimal(item);
             }
         }
     }
     
 
     XmlNodeList fullFirstCalculationPeriodNodeList = xmlNode.SelectNodes("fullFirstCalculationPeriod");
     if (fullFirstCalculationPeriodNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in fullFirstCalculationPeriodNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 fullFirstCalculationPeriodIDRef = item.Attributes["id"].Name;
                 XsdTypeBoolean ob = XsdTypeBoolean();
                 IDManager.SetID(fullFirstCalculationPeriodIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 fullFirstCalculationPeriodIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 fullFirstCalculationPeriod = new XsdTypeBoolean(item);
             }
         }
     }
     
 
     XmlNodeList firstPeriodStartDateNodeList = xmlNode.SelectNodes("firstPeriodStartDate");
     
     foreach (XmlNode item in firstPeriodStartDateNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 firstPeriodStartDateIDRef = item.Attributes["id"].Name;
                 List<FirstPeriodStartDate> ob = new List<FirstPeriodStartDate>();
                 ob.Add(new FirstPeriodStartDate(item));
                 IDManager.SetID(firstPeriodStartDateIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 firstPeriodStartDateIDRef = item.Attributes["href"].Name;
             }
             else
             {
             firstPeriodStartDate.Add(new FirstPeriodStartDate(item));
             }
         }
     }
     
 
     XmlNodeList nonRelianceNodeList = xmlNode.SelectNodes("nonReliance");
     if (nonRelianceNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in nonRelianceNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 nonRelianceIDRef = item.Attributes["id"].Name;
                 Empty ob = Empty();
                 IDManager.SetID(nonRelianceIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 nonRelianceIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 nonReliance = new Empty(item);
             }
         }
     }
     
 
     XmlNodeList creditDerivativesNoticesNodeList = xmlNode.SelectNodes("creditDerivativesNotices");
     if (creditDerivativesNoticesNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in creditDerivativesNoticesNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 creditDerivativesNoticesIDRef = item.Attributes["id"].Name;
                 CreditDerivativesNotices ob = CreditDerivativesNotices();
                 IDManager.SetID(creditDerivativesNoticesIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 creditDerivativesNoticesIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 creditDerivativesNotices = new CreditDerivativesNotices(item);
             }
         }
     }
     
 
     XmlNodeList contractualDefinitionsNodeList = xmlNode.SelectNodes("contractualDefinitions");
     
     foreach (XmlNode item in contractualDefinitionsNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 contractualDefinitionsIDRef = item.Attributes["id"].Name;
                 List<ContractualDefinitions> ob = new List<ContractualDefinitions>();
                 ob.Add(new ContractualDefinitions(item));
                 IDManager.SetID(contractualDefinitionsIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 contractualDefinitionsIDRef = item.Attributes["href"].Name;
             }
             else
             {
             contractualDefinitions.Add(new ContractualDefinitions(item));
             }
         }
     }
     
 
     XmlNodeList contractualTermsSupplementNodeList = xmlNode.SelectNodes("contractualTermsSupplement");
     
     foreach (XmlNode item in contractualTermsSupplementNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 contractualTermsSupplementIDRef = item.Attributes["id"].Name;
                 List<ContractualTermsSupplement> ob = new List<ContractualTermsSupplement>();
                 ob.Add(new ContractualTermsSupplement(item));
                 IDManager.SetID(contractualTermsSupplementIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 contractualTermsSupplementIDRef = item.Attributes["href"].Name;
             }
             else
             {
             contractualTermsSupplement.Add(new ContractualTermsSupplement(item));
             }
         }
     }
     
 
     XmlNodeList paymentNodeList = xmlNode.SelectNodes("payment");
     if (paymentNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in paymentNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 paymentIDRef = item.Attributes["id"].Name;
                 Payment ob = Payment();
                 IDManager.SetID(paymentIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 paymentIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 payment = new Payment(item);
             }
         }
     }
     
 
 }
 public void OnUserLoggedIn(Empty empty)
 {
     UpdateAccountSummaries();
 }
Example #57
0
        public override Task <WeatherResponse> GetWeather(Empty request, ServerCallContext context)
        {
            var forecast = _cache.Get <Models.Weather.WeatherResults>(Constants.LATEST_FORECAST_CACHE_KEY);

            return(Task.FromResult(ConvertToCurrentWeatherResponse(forecast)));
        }
Example #58
0
 IConfigureProcessors IConfigureProcessors.ForEndpoint(IConfigureHostedEndpoint endpoint, Action <IConfigureProcessingService> cfg)
 {
     endpoint.MustNotBeNull();
     _points.Add(endpoint, cfg ?? Empty.ActionOf <IConfigureProcessingService>());
     return(this);
 }
		void CreateTemplatePreprocessor()
		{
			mvcHost = new TestableMvcTextTemplateHost();
			templatePreprocessor = new Empty();
			templatePreprocessor.Host = mvcHost;
		}
Example #60
0
 public void OnUserLoggedOut(Empty empty)
 {
     // Do nothing
 }