Exemplo n.º 1
0
        private bool PropertySetterSupportRequires(out string parameterName, out IClrTypeName parameterType,
                                                   out ReadOnlyCollection <ICSharpFunctionDeclaration> functionsToInsertPrecondition)
        {
            parameterName = null;
            parameterType = null;
            functionsToInsertPrecondition = null;

            var propertySetterAvailability = new PropertySetterRequiresAvailability(_provider);

            if (!propertySetterAvailability.IsAvailable)
            {
                return(false);
            }

            parameterName = propertySetterAvailability.ParameterName;
            parameterType = propertySetterAvailability.PropertyType;

            var func = new FunctionRequiresAvailability(_provider, parameterName,
                                                        propertySetterAvailability.GetSelectedFunctions());

            if (func.IsAvailable)
            {
                functionsToInsertPrecondition = func.FunctionsToInsertPrecondition;
                return(true);
            }

            return(false);
        }