private void Create() { belongToProjectField = GetBelognToProjectField(); documentResponsibleField = GetDocumentResponsibleField(); documentTypeField = GetDocumentTypeField(); expirationDateField = GetExpirationDateField(); projectDocumentsList = GetProjectDocumentsList(); projectDocumentContemtType = GetProjectDocumentContemtType(); projectDocumentsListView = GetProjectDocumentsListView(); }
public void UserFieldDefinition_AllowMultipleValues_ShouldUpdate_FieldType() { var def = new UserFieldDefinition(); def.AllowMultipleValues = false; Assert.IsTrue(def.FieldType == BuiltInFieldTypes.User); def.AllowMultipleValues = true; Assert.IsTrue(def.FieldType == BuiltInFieldTypes.UserMulti); }
public void Create() { projectStatusField = GetProjectStatusField(); startDateField = GetStartDateField(); teamField = GetTeamField(); departmentField = GetDepartmentField(); endDateField = GetEndDateField(); projectManagerField = GetProjectManagerField(); projectValueField = GetProjectValueField(); projectContemtType = GetProjectContemtType(); projectsList = GetProjectsList(); managedProjectsListView = GetManagedProjectsListView(); }
protected override FieldDefinition GetFieldDefinitionTemplate() { var def = new UserFieldDefinition(); if (Rnd.Bool()) { def.SelectionMode = BuiltInFieldUserSelectionMode.PeopleAndGroups; } else { def.SelectionMode = BuiltInFieldUserSelectionMode.PeopleOnly; } def.Presence = Rnd.Bool(); def.AllowDisplay = Rnd.Bool(); return(def); }
public static TModelNode AddUserField <TModelNode>(this TModelNode model, UserFieldDefinition definition, Action <UserFieldModelNode> action) where TModelNode : ModelNode, IFieldHostModelNode, new() { return(model.AddTypedDefinitionNode(definition, action)); }
public static TModelNode AddUserField <TModelNode>(this TModelNode model, UserFieldDefinition definition) where TModelNode : ModelNode, IFieldHostModelNode, new() { return(AddUserField(model, definition, null)); }
public static ModelNode AddUserField(this ModelNode model, UserFieldDefinition definition, Action <ModelNode> action) { return(model.AddDefinitionNode(definition, action)); }
public static ModelNode AddUserField(this ModelNode model, UserFieldDefinition definition) { return(AddUserField(model, definition, null)); }
public Definition AddDefinition(SyntaxNode node, IdentifierSyntax identifier, DefinitionKind type) { if (this.testModeLayer > 0) { return(null); } if (identifier == null || node == null) { return(null); } Scope definitionScope = new Scope(this.snapshot.CreateTrackingPoint(identifier.Span.GetSpan(this.snapshot).Start), this.scope.Peek().End); Definition definition = null; switch (type) { case DefinitionKind.Function: definition = this.lastFunctionDefinition = new UserFunctionDefinition(node as FunctionHeaderSyntax, identifier, string.Empty, definitionScope); break; case DefinitionKind.Parameter: definition = new UserParameterDefinition(node as ParameterSyntax, identifier, string.Empty, definitionScope); this.lastFunctionDefinition?.InternalParameters.Add(definition as UserParameterDefinition); break; case DefinitionKind.Field: definition = new UserFieldDefinition(node as StructDeclaratorSyntax, identifier, string.Empty, definitionScope); if (this.lastStructDefinition is UserTypeNameDefinition) { (this.lastStructDefinition as UserTypeNameDefinition)?.InternalFields.Add(definition as UserFieldDefinition); } else { (this.lastStructDefinition as UserTypeNameDefinition)?.InternalFields.Add(definition as UserFieldDefinition); } break; case DefinitionKind.GlobalVariable: case DefinitionKind.LocalVariable: switch (node.SyntaxType) { case SyntaxType.InitPart: definition = new UserVariableDefinition(node as InitPartSyntax, identifier, string.Empty, type, definitionScope); break; case SyntaxType.Condition: definition = new UserVariableDefinition(node as ConditionSyntax, identifier, string.Empty, type, definitionScope); break; case SyntaxType.StructDeclarator: definition = new UserVariableDefinition(node as StructDeclaratorSyntax, identifier, string.Empty, type, definitionScope); break; } break; case DefinitionKind.Macro: definition = new UserMacroDefinition(node as DefinePreprocessorSyntax, identifier, string.Empty, definitionScope); break; case DefinitionKind.TypeName: definition = new UserTypeNameDefinition(identifier, string.Empty, definitionScope); this.lastStructDefinition = definition; break; case DefinitionKind.InterfaceBlock: definition = new UserInterfaceBlockDefinition(node as InterfaceBlockSyntax, identifier, string.Empty, definitionScope); this.lastStructDefinition = definition; break; } if (this.definitions.ContainsKey(definition.Name.Text)) { this.definitions[definition.Name.Text].Add(definition); } else { this.definitions.Add(definition.Name.Text, new List <Definition> { definition }); } definition.Overloads = this.definitions[definition.Name.Text]; return(definition); }