Ejemplo n.º 1
0
        public void OnNavigatedTo(NavigationContext navigationContext)
        {
            var equipment = navigationContext.Parameters["Equipment"] as EquipmentDTO;

            if (equipment != null)
            {
                CurrentEquipment = equipment;
                var parameterList = _deviceParameterInfoService.GetDeviceParameterList(equipment.equipmentId.ToString());
                ParameterTypes.Clear();
                ParameterTypes.AddRange(parameterList);
                SelectedParameterType = ParameterTypes.Count == 0 ? null : ParameterTypes[0];
            }
        }
Ejemplo n.º 2
0
        internal BfMethod(BfCache cache, MethodDefinition methodDef, BfType type)
            : base(cache, methodDef, type)
        {
            _methodDefinition = methodDef;
            _methodName       = GetSignature(_methodDefinition);

            if (!type.IsInCoreAssembly)
            {
                return;
            }

            ReturnType = cache.GetBfType(methodDef.ReturnType);

            _typesUsed.AddRange(_cache.GetTypeCollection(methodDef.ReturnType));
            _typesUsed.Add(ReturnType);
            _typesUsed.AddRange(_cache.GetTypeCollection(_methodDefinition));

            if (methodDef.Body != null)
            {
                foreach (var variableDefinition in methodDef.Body.Variables)
                {
                    _typesUsed.AddRange(_cache.GetTypeCollection(variableDefinition.VariableType));
                    _typesUsed.Add(_cache.GetBfType(variableDefinition.VariableType));
                }
            }

            foreach (var parameterDefinition in methodDef.Parameters)
            {
                _typesUsed.AddRange(_cache.GetTypeCollection(parameterDefinition.ParameterType));
                _typesUsed.Add(_cache.GetBfType(parameterDefinition.ParameterType));

                ParameterTypes.AddRange(_cache.GetTypeCollection(parameterDefinition.ParameterType));
                ParameterTypes.Add(_cache.GetBfType(parameterDefinition.ParameterType));
            }

            ParameterTypes.Clear();
        }