예제 #1
0
        private static bool IsPropertyFeatureReady(IPropertyFeature feature, out ITypeName resolvedPathTypeName, out ICompiledType resolvedPathType)
        {
            bool Result = false;

            resolvedPathTypeName = null;
            resolvedPathType     = null;

            if (feature.ResolvedEntityTypeName.IsAssigned && feature.ResolvedEntityType.IsAssigned)
            {
                resolvedPathTypeName = feature.ResolvedEntityTypeName.Item;
                resolvedPathType     = feature.ResolvedEntityType.Item;
                Result = true;
            }

            return(Result);
        }
        private static bool ResolveCallProperty(IPrecursorExpression node, IFeatureInstance selectedPrecursor, IPropertyType callType, List <IExpressionType> mergedArgumentList, TypeArgumentStyles argumentStyle, IErrorList errorList, ref ResolvedExpression resolvedExpression, out ISealableList <IParameter> selectedParameterList, out ISealableList <IParameter> selectedResultList, out List <IExpressionType> resolvedArgumentList)
        {
            selectedParameterList = null;
            selectedResultList    = null;
            resolvedArgumentList  = null;

            IList <IArgument> ArgumentList = node.ArgumentList;

            if (ArgumentList.Count > 0)
            {
                errorList.AddError(new ErrorInvalidExpression(node));
                return(false);
            }
            else
            {
                ICompiledFeature OperatorFeature = selectedPrecursor.Feature;
                IList <ISealableList <IParameter> > ParameterTableList = new List <ISealableList <IParameter> >();
                IPropertyFeature Property     = (IPropertyFeature)OperatorFeature;
                string           PropertyName = ((IFeatureWithName)Property).EntityName.Text;

                resolvedExpression.ResolvedResult = new ResultType(callType.ResolvedEntityTypeName.Item, callType.ResolvedEntityType.Item, PropertyName);

                resolvedExpression.ResolvedException = new ResultException();

                if (Property.GetterBody.IsAssigned)
                {
                    IBody GetterBody = (IBody)Property.GetterBody.Item;
                    resolvedExpression.ResolvedException = new ResultException(GetterBody.ExceptionIdentifierList);
                }

                selectedParameterList = new SealableList <IParameter>();
                selectedResultList    = new SealableList <IParameter>();
                resolvedArgumentList  = new List <IExpressionType>();

                return(true);
            }
        }
 public PropertyFeaturesService(IPropertyFeature repository, ILoggerManager logger)
 {
     this.repository = repository;
     this.logger     = logger;
 }
예제 #4
0
        private static ISealableDictionary <string, IScopeAttributeFeature> CurrentPropertyScope(IPropertyFeature propertyFeature, ISource childSource)
        {
            ISealableDictionary <string, IScopeAttributeFeature> Result = null;
            bool IsHandled = false;

            if (propertyFeature.GetterBody.IsAssigned && propertyFeature.GetterBody.Item == childSource)
            {
                Result    = propertyFeature.FullGetScope;
                IsHandled = true;
            }
            else if (propertyFeature.SetterBody.IsAssigned && propertyFeature.SetterBody.Item == childSource)
            {
                Result    = propertyFeature.FullSetScope;
                IsHandled = true;
            }

            Debug.Assert(IsHandled);

            return(Result);
        }