示例#1
0
        public override ResetOtherTypeNestedOutput TestResetOtherTypeFields(ResetNestedInput input)
        {
            _basicTestType = new BasicContractTestType();
            _basicTestType.SetBasicContractTestType(input.Int32Value);
            var s        = _basicTestType.CheckFunc().Invoke(input.StringValue);
            var testType = _basicTestType.CheckTypeValue();

            _basicTestType.SetStaticField();
            BasicContractTestType.BasicContractTestTypePublicStaticField = new BasicContractTestType();

            var innerTestTypeObj = new BasicContractTestType.InnerTestType(1);

            innerTestTypeObj.SetStaticField();
            BasicContractTestType.InnerTestType.InnerTestTypePublicStaticField =
                new BasicContractTestType.InnerTestType(2);

            var innerContractTypeObj = new InnerContractType();

            innerContractTypeObj.SetStaticField();
            InnerContractType.InnerContractTypePublicStaticField = new InnerContractType();

            return(new ResetOtherTypeNestedOutput
            {
                TypeConst = testType.CheckConstNumberValue(),
                TypeNumber = testType.CheckNumberValue(),
                BasicTypeNumber = _basicTestType.CheckNumberValue(),
                BasicTypeStaticNumber = _basicTestType.CheckStaticNumberValue(),
                StringValue = s
            });
        }
示例#2
0
 public override ResetNestedOutput QueryNestedFields(Empty input)
 {
     _innerContractType = new InnerContractType();
     return(new ResetNestedOutput
     {
         Int32Value = _innerContractType.CheckNumberValue(),
         StringValue = _innerContractType.CheckStaticValue() ?? string.Empty
     });
 }
示例#3
0
        public override BoolValue CheckNonContractTypesStaticFieldsReset(Empty input)
        {
            var res = InnerContractType.CheckAllStaticFieldsReset() &&
                      BasicContractTestType.CheckAllStaticFieldsReset() &&
                      BasicContractTestType.InnerTestType.CheckInnerTypeStaticFieldsReset();

            return(new BoolValue {
                Value = res
            });
        }
示例#4
0
        public override ResetNestedOutput TestResetNestedFields(ResetNestedInput input)
        {
            _innerContractType = new InnerContractType();
            _innerContractType.SetValue(input.Int32Value, input.StringValue);
            var number       = _innerContractType.CheckNumberValue();
            var staticString = _innerContractType.CheckStaticValue();

            return(new ResetNestedOutput
            {
                Int32Value = number,
                StringValue = staticString
            });
        }
示例#5
0
 public void SetStaticField()
 {
     _innerContractTypePrivateStaticField = this;
 }