コード例 #1
0
        public void SetIsRecursive(bool value)
        {
            if (!value)
            {
                throw new System.NotImplementedException();
            }

            BindingKeyword.NotNull().AddTokenAfter(FSharpTokenType.REC);
        }
コード例 #2
0
        /// <summary>
        /// Determines if the Rebar target supports a given model definition type.
        /// </summary>
        /// <param name="modelDefinitionType">The model type.</param>
        /// <param name="overridingModelDefinitionType">The overriding model type.</param>
        /// <returns>True if it's a supported type, otherwise false.</returns>
        private static bool CanHandleType(BindingKeyword modelDefinitionType, BindingKeyword overridingModelDefinitionType)
        {
            modelDefinitionType = overridingModelDefinitionType.IsEmpty() ? modelDefinitionType : overridingModelDefinitionType;

#if FALSE
            if (CodeReadinessSupport.AllowReadiness(CodeReadiness.Incomplete))
            {
                if (modelDefinitionType == ExternalCode.SourceModel.SharedLibraryDefinition.ModelDefinitionTypeKeyword)
                {
                    return(true);
                }
            }
#endif

            return(modelDefinitionType == Function.FunctionDefinitionType
                   // || modelDefinitionType == ComponentDefinition.ModelDefinitionTypeString
                   // || modelDefinitionType == GTypeDefinition.ModelDefinitionTypeString
                   // || modelDefinitionType == PaletteDocumentType.PaletteDocumentTypeString
                   || modelDefinitionType == string.Empty); // Model definition type is empty when adding an item to a component under a target
        }
 /// <inheritdoc/>
 public override bool CanBeAlwaysIncluded(BindingKeyword modelDefinitionType)
 {
     return(true);
 }
 /// <inheritdoc/>
 public override bool CanBeTopLevel(BindingKeyword modelDefinitionType)
 {
     return(modelDefinitionType.LocalName == Function.FunctionDefinitionType);
 }
 /// <inheritdoc/>
 public override bool CanBeExported(BindingKeyword modelDefinitionType)
 {
     return(false);
 }
コード例 #6
0
 /// <inheritdoc/>
 public override bool CanBeExported(BindingKeyword modelDefinitionType) => false;
コード例 #7
0
 /// <inheritdoc />
 public bool SupportsModelDefinitionType(BindingKeyword modelDefinitionType, BindingKeyword overridingModelDefinitionType)
 => CanHandleType(modelDefinitionType, overridingModelDefinitionType);
コード例 #8
0
 /// <inheritdoc />
 public bool DisallowEditDocumentType(BindingKeyword modelDefinitionType, BindingKeyword overridingModelDefinitionType)
 {
     return(!CanHandleType(modelDefinitionType, overridingModelDefinitionType));
 }