Exemplo n.º 1
0
 public Assignment(Expression identifier, Expression value, AssignmentType op)
     : base(2)
 {
     Identifier = identifier;
     Value      = value;
     Operation  = op;
 }
Exemplo n.º 2
0
        //--------------------------------------------------------------------------------------------------
        // Constructor
        //--------------------------------------------------------------------------------------------------

        #region Constructor

        /// <summary>
        /// Basic constructor
        /// </summary>
        /// <param name="id">ID of staff</param>
        /// <param name="skillSet">Skill of staff</param>
        /// <param name="assignmentType">Assignment type of staff to organizational unit</param>
        public EntityHealthCareStaff(int id, SkillSet skillSet, AssignmentType assignmentType = AssignmentType.Fixed)
            : base(id, skillSet)
        {
            _currentPatients   = new List <EntityPatient>();
            _staffOutsideShift = true;
            _assignmentType    = assignmentType;
        } // end of EntityDoctor
Exemplo n.º 3
0
 public Assignment(Host Host, Statement Parent, string LibName, string VarName, AssignmentType Affinity)
     : base(Host, Parent)
 {
     this._LibName  = LibName;
     this._VarName  = VarName;
     this._Affinity = Affinity;
 }
Exemplo n.º 4
0
        public ISymbol Assign(IScriptContext context, AssignmentType assignmentType,
                              ISymbol right)
        {
            if (right.Type() != localVariable.Type)
            {
                Debug.LogError($"LocalVariableExpression({localVariable.Name}).Assign : " +
                               $"type mismatch ({right.Type()} instead of {localVariable.Type}.");
                return(null);
            }
            Symbol <T> rightValue = right as Symbol <T>;

            Assert.IsNotNull(rightValue);
            Symbol <T> localValue = localVariable.Value as Symbol <T>;

            Assert.IsNotNull(localValue);
            Symbol <T> assignmentResult = localValue.Assignment(rightValue,
                                                                assignmentType);

            if (assignmentResult == null)
            {
                Debug.LogError($"LocalVariableExpression({localVariable.Name}).Assign : " +
                               "error while evaluating assignment.");
                return(null);
            }
            localVariable.Value = assignmentResult;
            return(assignmentResult);
        }
 partial void upcomingSwitchPressed(UIButton sender)
 {
     upcomingButton.Selected  = true;
     completedButton.Selected = false;
     Mode = AssignmentType.Upcoming;
     assignmentsTable.ReloadData();
     assignmentsTable.Hidden = (upcomingAssignments.Count == 0);
 }
Exemplo n.º 6
0
    public Postcondition(ref ConditionList.Condition condition, ConditionList glovalConditionList)
    {
        refrencedCondition = condition;

        conditionList = glovalConditionList;

        assignmentType = AssignmentType.INCREMENT;
    }
 protected override void AnalyzeAssignments()
 {
     foreach (VariableDefinition variable in this.context.MethodContext.Variables)
     {
         AssignmentType analysisResult = AnalyzeAssignmentType(new VariableUsageFinder(variable));
         this.context.MethodContext.VariableAssignmentData.Add(variable, analysisResult);
     }
 }
        private void RenderAssignments()
        {
            Mode = AssignmentType.Upcoming;
            assignmentsTable.Source = new OSAssignmentTableSource(this);
            assignmentsTable.Hidden = (upcomingAssignments.Count == 0);

            noAssignmentsImage.Hidden = (upcomingAssignments.Count > 0 || completedAssignments.Count > 0);
        }
Exemplo n.º 9
0
 public AssignmentChoiceListAttribute(AssignmentType type = AssignmentType.Optional) : base(
         type == AssignmentType.Optional ? new object[] { 'N', 'A', 'E' } :
         type == AssignmentType.Required ? new object[] { 'A', 'E' } :
         type == AssignmentType.EntryOnly ? new object[] { 'N', 'E' } : throw new Exception("Unknown AssignmentType"),
         type == AssignmentType.Optional ? new string[] { "Assignment_N", "Assignment_A", "Assignment_E" } :
         type == AssignmentType.Required ? new string[] { "Assignment_A", "Assignment_E" } :
         type == AssignmentType.EntryOnly ? new string[] { "Assignment_N", "Assignment_E" } : throw new Exception("Unknown AssignmentType"))
 {
 }
Exemplo n.º 10
0
        public override Symbol <Id> Assignment(Symbol <Id> right, AssignmentType type)
        {
            switch (type)
            {
            case AssignmentType.Assign: Value = new Id(right.Value.Identifier); return(this);

            default: return(IllegalAssignment(right, type.ToString()));
            }
        }
Exemplo n.º 11
0
        public override Symbol <DateTime> Assignment(Symbol <DateTime> right, AssignmentType type)
        {
            switch (type)
            {
            case AssignmentType.Assign: Value = right.Value; return(this);

            default: return(IllegalAssignment(right, type.ToString()));
            }
        }
        /// <summary>
        /// get all submitted assignments of the <see cref="CourseMember"/>
        /// </summary>
        /// <param name="assignmentType">type of the assingments to obtain</param>
        /// <param name="courseMemberId">identifier of the <see cref="CourseMember"/></param>
        /// <returns></returns>
        private IEnumerable <TestSubmission> GetAllAssignmentsOf(AssignmentType assignmentType, string courseMemberId)
        {
            var allAssignmentsOfCourseMember = GetAllSubmittedWithTestAndStudent()
                                               .Where(ts => ts.Student.Id.ToString() == courseMemberId);

            return(assignmentType == AssignmentType.Test
                ? allAssignmentsOfCourseMember.Where(ts => ts.Test.IsGraded)
                : allAssignmentsOfCourseMember.Where(ts => !ts.Test.IsGraded));
        }
Exemplo n.º 13
0
 public Assignment(string name, string ds, AssignmentType type, int spv, AssignmentStatus status, string creator, DateTime endTime)
 {
     this.assignmentStatus  = status;
     this.Description       = ds;
     this.Type              = type;
     this.StudentPointValue = spv;
     this.CreatedBy         = creator;
     this.EndTime           = endTime;
     this.startTime         = DateTime.Today;
 }
Exemplo n.º 14
0
        private static AssignmentType createRoleAssignment(String roleOid)
        {
            AssignmentType      roleAssignment = new AssignmentType();
            ObjectReferenceType roleRef        = new ObjectReferenceType();

            roleRef.oid         = roleOid;
            roleRef.type        = ROLE_TYPE;
            roleAssignment.Item = roleRef;
            return(roleAssignment);
        }
        protected override void AnalyzeAssignments()
        {
            Dictionary <FieldDefinition, AssignmentType> fieldToAssignmentTypeMap = dataSelector(this.context).FieldAssignmentData;

            foreach (FieldDefinition field in this.context.TypeContext.CurrentType.Fields)
            {
                AssignmentType analysisResult = AnalyzeAssignmentType(new FieldUsageFinder(field));
                fieldToAssignmentTypeMap.Add(field, analysisResult);
            }
        }
Exemplo n.º 16
0
        public UDMFUnknownAssignment(double value)
        {
            Type       = AssignmentType.Float;
            floatValue = value;

            intValue          = 0;
            stringValueSource = null;
            stringValueStart  = 0;
            stringValueLength = 0;
        }
Exemplo n.º 17
0
        public UDMFUnknownAssignment(string source, int start, int length, bool identifier)
        {
            Type = identifier ? AssignmentType.Identifier : AssignmentType.String;
            stringValueSource = source;
            stringValueStart  = start;
            stringValueLength = length;

            intValue   = 0;
            floatValue = float.NaN;
        }
Exemplo n.º 18
0
        public UDMFUnknownAssignment(bool value)
        {
            Type     = AssignmentType.Bool;
            intValue = value ? 1 : 0;

            floatValue        = float.NaN;
            stringValueSource = null;
            stringValueStart  = 0;
            stringValueLength = 0;
        }
Exemplo n.º 19
0
        public UDMFUnknownAssignment(long value)
        {
            Type     = AssignmentType.Int;
            intValue = value;

            floatValue        = float.NaN;
            stringValueSource = null;
            stringValueStart  = 0;
            stringValueLength = 0;
        }
Exemplo n.º 20
0
        public override Symbol <string> Assignment(Symbol <string> right, AssignmentType type)
        {
            switch (type)
            {
            case AssignmentType.Assign: Value = right.Value; return(this);

            case AssignmentType.AddDifference: Value += right.Value; return(this);

            default: return(IllegalAssignment(right, type.ToString()));
            }
        }
Exemplo n.º 21
0
 public ArrayAssignmentExpression(AssignmentType type, IVariableExpression variable,
                                  ArrayExpression <T, Array <T> > expression)
     : base($"{variable.Representation()} {type} {expression.Script()}", variable.VariableType())
 {
     this.type       = type;
     this.variable   = variable;
     this.expression = expression;
     arrayType       = expression.ArrayType();
     // type checking
     Assert.IsTrue(variable.VariableType() == expression.Type());
 }
        protected AssignmentType AnalyzeAssignmentType(BaseUsageFinder usageFinder)
        {
            PrepareNodes();

            AssignmentAnalyzer analyzer = new AssignmentAnalyzer(usageFinder, this.context.MethodContext.Expressions);

            AssignmentType regularControlFlowResult = analyzer.CheckAssignmentType(mappedNodes[0]);

            if (regularControlFlowResult == AssignmentType.NotAssigned)
            {
                return(AssignmentType.NotAssigned);
            }

            AssignmentType result = regularControlFlowResult;

            List <ExceptionHandler> exceptionHandlers = new List <ExceptionHandler>(this.context.MethodContext.ControlFlowGraph.RawExceptionHandlers);
            int initialCount;

            do
            {
                initialCount = exceptionHandlers.Count;
                for (int i = 0; i < exceptionHandlers.Count; i++)
                {
                    ExceptionHandler handler = exceptionHandlers[i];

                    AssignmentFlowNode tryEntryNode = GetNodeFromBlockOffset(handler.TryStart.Offset);
                    if (tryEntryNode.NodeState == AssignmentNodeState.Unknown)
                    {
                        continue;
                    }

                    exceptionHandlers.RemoveAt(i--);

                    CheckHandler(GetNodeFromBlockOffset(handler.HandlerStart.Offset), analyzer, ref result);
                    if (result == AssignmentType.NotAssigned)
                    {
                        return(AssignmentType.NotAssigned);
                    }

                    if (handler.HandlerType != ExceptionHandlerType.Filter)
                    {
                        continue;
                    }

                    CheckHandler(GetNodeFromBlockOffset(handler.FilterStart.Offset), analyzer, ref result);
                    if (result == AssignmentType.NotAssigned)
                    {
                        return(AssignmentType.NotAssigned);
                    }
                }
            } while (initialCount != exceptionHandlers.Count);

            return(result);
        }
 private AssignmentTypeField GetAssignmentTypeField(AssignmentType assignmentType, string fieldTitle)
 {
     foreach (AssignmentTypeField field in assignmentType.Fields)
     {
         if (field.Title.Trim().Replace(" ", "").ToLower() == fieldTitle.Trim().Replace(" ", "").ToLower())
         {
             return(field);
         }
     }
     return(null);
 }
Exemplo n.º 24
0
        public AssignmentBase CreateAssignmentWithSenser(DateTime date, AssignmentType type)
        {
            var applyType = type.Sense(date);

            return(Term.New(date.AddMinutes(applyType.TimeRange.StartValue), applyType, applyType.TimeRange.Length)
                   .Self <AssignmentBase>(a =>
            {
                a.HrDate = date;
                a.NativeName = type.Name;
            }));
        }
 protected override void AnalyzeAssignments()
 {
     foreach (ParameterDefinition parameter in outParameters)
     {
         OutParameterUsageFinder usageFinder = new OutParameterUsageFinder(parameter);
         AssignmentType          result      = AnalyzeAssignmentType(usageFinder);
         if (result == AssignmentType.NotAssigned || result == AssignmentType.NotUsed)
         {
             this.context.MethodContext.OutParametersToAssign.Add(parameter);
         }
     }
 }
Exemplo n.º 26
0
 public void Add(AssignmentType type, TimeSpan timeSpan)
 {
     switch (type)
     {
     case AssignmentType.Backup:
     {
         Assignment assignment = new BackupAssignment(timeSpan);
         this.mAssignments.Add(assignment);
         break;
     }
     }
 }
 /// <summary>
 /// Pick an available, unassigned kerbal matching the assignment, or null if none is available.
 /// </summary>
 /// <param name="type"></param>
 /// <param name="chooser"></param>
 /// <returns></returns>
 public ProtoCrewMember PickAvailable(AssignmentType type, KerbalChooser chooser = null)
 {
     while ((Head != null) && (Head.Type == type))
     {
         ProtoCrewMember crew = Pop().PickAvailable(chooser);
         if (crew != null)
         {
             return(crew);
         }
     }
     return(null);
 }
Exemplo n.º 28
0
        /// <summary>
        /// Constructor used for special assignments with AssignmentType other than Standard
        /// Special assignments are used to indicate end of rendering, request to reset render client...
        /// Coordinates, dimensions and stride are irrelevant in this case - they are set to -1 for error checking
        /// </summary>
        public Assignment(AssignmentType type)
        {
            x1             =
                y1         =
                    x2     =
                        y2 =
                            bitmapWidth      =
                                bitmapHeight =
                                    stride   = -1;

            this.type = type;
        }
Exemplo n.º 29
0
 public IActionResult Create([FromBody] AssignmentType newmodel)
 {
     if (ModelState.IsValid)
     {
         _context.AssignmentType.Add(newmodel);
         _context.SaveChanges();
         return(CreatedAtRoute("GetAssignmentType", new { id = newmodel.AssignmentTypeID }, newmodel));
     }
     else
     {
         return(BadRequest());
     }
 }
Exemplo n.º 30
0
        /// <summary>
        /// Main constructor for standard assignments
        /// </summary>
        public Assignment(int x1, int y1, int x2, int y2, int bitmapWidth, int bitmapHeight)
        {
            this.x1           = x1;
            this.y1           = y1;
            this.x2           = x2;
            this.y2           = y2;
            this.bitmapWidth  = bitmapWidth;
            this.bitmapHeight = bitmapHeight;
            this.type         = AssignmentType.Standard;

            // stride values: 8 > 4 > 2 > 1; initially always 8
            // decreases at the end of rendering of current assignment and therefore makes another render of this assignment more detailed
            stride = startingStride;
        }
Exemplo n.º 31
0
 public IEnumerable<SubEventInsertRule> LoadSubEventInsertRules(AssignmentType assignmentType)
 {
     //_termStyleRepository.(assignmentType);
     return assignmentType.GetSubEventInsertRules();
 }
Exemplo n.º 32
0
        protected override void InitChildren(ParseTreeNodeList nodes)
        {
            switch(nodes[0].Token.Text)
            {
                case "stringDir":
                    TypeOfAssignment = AssignmentType.StringDirAssignment;
                    Value = (string)nodes[2].Token.Text;
                    break;
                case "stringTable":
                    TypeOfAssignment = AssignmentType.StringTableAssignment;
                    Value = int.Parse(nodes[2].Token.Text);
                    break;
                case "leftArrowImage":
                    TypeOfAssignment = AssignmentType.LeftArrowImageAssignment;
                    Value = (string)nodes[2].Token.Text;
                    break;
                case "rightArrowImage":
                    TypeOfAssignment = AssignmentType.RightArrowImageAssignment;
                    Value = (string)nodes[2].Token.Text;
                    break;
                case "tracking":
                    TypeOfAssignment = AssignmentType.TrackingAssignment;
                    Value = int.Parse(nodes[2].Token.Text);
                    break;
                case "trigger":
                    TypeOfAssignment = AssignmentType.TriggerAssignment;
                    Value = int.Parse(nodes[2].Token.Text);
                    break;
                case "image":
                    TypeOfAssignment = AssignmentType.ImageAssignment;
                    Value = (string)nodes[2].Token.Text;
                    break;
                case "position":
                    TypeOfAssignment = AssignmentType.PositionAssignment;
                    Value = (ArrayListNode)nodes[2].ChildNodes[1].AstNode;
                    break;
                case "size":
                    TypeOfAssignment = AssignmentType.SizeAssignment;
                    Value = (ArrayListNode)nodes[2].ChildNodes[1].AstNode;
                    break;
                case "id":
                    TypeOfAssignment = AssignmentType.IDAssignment;
                    Value = int.Parse(nodes[2].Token.Text);
                    break;
                case "orientation":
                    TypeOfAssignment = AssignmentType.OrientationAssignment;
                    Value = int.Parse(nodes[2].Token.Text);
                    break;
                case "opaque":
                    TypeOfAssignment = AssignmentType.OpaqueAssignment;
                    Value = int.Parse(nodes[2].Token.Text);
                    break;
                case "assetID":
                    TypeOfAssignment = AssignmentType.AssetIDAssignment;
                    Value = (string)nodes[2].Token.Text;
                    break;
                case "stringIndex":
                    TypeOfAssignment = AssignmentType.StringIndexAssignment;
                    Value = int.Parse(nodes[2].Token.Text);
                    break;
                case "text":
                    TypeOfAssignment = AssignmentType.TextAssignment;
                    Value = (string)nodes[2].Token.Text;
                    break;
                case "font":
                    TypeOfAssignment = AssignmentType.FontAssignment;
                    Value = int.Parse(nodes[2].Token.Text);
                    break;
                case "textColorSelected":
                    TypeOfAssignment = AssignmentType.TextColorSelectedAssignment;
                    Value = (ArrayListNode)nodes[2].ChildNodes[1].AstNode;
                    break;
                case "textColorHighlighted":
                    TypeOfAssignment = AssignmentType.TextColorHighlightedAssignment;
                    Value = (ArrayListNode)nodes[2].ChildNodes[1].AstNode;
                    break;
                case "textColorDisabled":
                    TypeOfAssignment = AssignmentType.TextColorDisabledAssignment;
                    Value = (ArrayListNode)nodes[2].ChildNodes[1].AstNode;
                    break;
                case "textButton":
                    TypeOfAssignment = AssignmentType.TextButtonAssignment;
                    Value = int.Parse(nodes[2].Token.Text);
                    break;
                case "color":
                    TypeOfAssignment = AssignmentType.ColorAssignment;
                    Value = (ArrayListNode)nodes[2].ChildNodes[1].AstNode;
                    break;
                case "alignment":
                    TypeOfAssignment = AssignmentType.AlignmentAssignment;
                    Value = int.Parse(nodes[2].Token.Text);
                    break;
                case "backColor":
                    TypeOfAssignment = AssignmentType.BackColorAssignment;
                    Value = (ArrayListNode)nodes[2].ChildNodes[1].AstNode;
                    break;
                case "frameOnFocus":
                    TypeOfAssignment = AssignmentType.FrameOnFocusAssignment;
                    Value = int.Parse(nodes[2].Token.Text);
                    break;
                case "transparent":
                    TypeOfAssignment = AssignmentType.TransparentAssignment;
                    Value = int.Parse(nodes[2].Token.Text);
                    break;
                case "capacity":
                    TypeOfAssignment = AssignmentType.CapacityAssignment;
                    Value = int.Parse(nodes[2].Token.Text);
                    break;
                case "lines":
                    TypeOfAssignment = AssignmentType.LinesAssignment;
                    Value = int.Parse(nodes[2].Token.Text);
                    break;
                case "flashOnEmpty":
                    TypeOfAssignment = AssignmentType.FlashOnEmptyAssignment;
                    Value = int.Parse(nodes[2].Token.Text);
                    break;
                case "thumbImageSize":
                    TypeOfAssignment = AssignmentType.ThumbImageSizeAssignment;
                    Value = (ArrayListNode)nodes[2].ChildNodes[1].AstNode;
                    break;
                case "thumbImageOffsets":
                    TypeOfAssignment = AssignmentType.ThumbImageOffsetsAssignment;
                    Value = (ArrayListNode)nodes[2].ChildNodes[1].AstNode;
                    break;
                case "thumbButtonImage":
                    TypeOfAssignment = AssignmentType.ThumbButtonImageAssignment;
                    Value = (string)nodes[2].Token.Text;
                    break;
                case "wrapped":
                    TypeOfAssignment = AssignmentType.WrappedAssignment;
                    Value = int.Parse(nodes[2].Token.Text);
                    break;
                case "textColor":
                    TypeOfAssignment = AssignmentType.TextColorAssignment;
                    Value = (ArrayListNode)nodes[2].ChildNodes[1].AstNode;
                    break;
                case "mode":
                    TypeOfAssignment = AssignmentType.ModeAssignment;
                    Value = (string)nodes[2].Token.Text;
                    break;
                case "scrollBarImage":
                    TypeOfAssignment = AssignmentType.ScrollBarImageAssignment;
                    Value = (string)nodes[2].Token.Text;
                    break;
                case "scrollBarGutter":
                    TypeOfAssignment = AssignmentType.ScrollBarGutterAssignment;
                    Value = int.Parse(nodes[2].Token.Text);
                    break;
                case "scrollBarType":
                    TypeOfAssignment = AssignmentType.ScrollBarTypeAssignment;
                    Value = Value = int.Parse(nodes[2].Token.Text);
                    break;
                case "enableIME":
                    TypeOfAssignment = AssignmentType.EnableIMEAssignment;
                    Value = int.Parse(nodes[2].Token.Text);
                    break;
                case "highlighted":
                    TypeOfAssignment = AssignmentType.HighlightedAssignment;
                    Value = int.Parse(nodes[2].Token.Text);
                    break;
                case "minValue":
                    TypeOfAssignment = AssignmentType.MinValueAssignment;
                    Value = int.Parse(nodes[2].Token.Text);
                    break;
                case "maxValue":
                    TypeOfAssignment = AssignmentType.MaxValueAssignment;
                    Value = int.Parse(nodes[2].Token.Text);
                    break;
                case "pageSize":
                    TypeOfAssignment = AssignmentType.PageSizeAssignment;
                    Value = int.Parse(nodes[2].Token.Text);
                    break;
                case "cursorColor":
                    TypeOfAssignment = AssignmentType.CursorColorAssignment;
                    Value = (ArrayListNode)nodes[2].ChildNodes[1].AstNode;
                    break;
                case "toolTip":
                    TypeOfAssignment = AssignmentType.TooltipAssignment;
                    Value = (string)nodes[2].Token.Text;
                    break;
                case "tooltip":
                    TypeOfAssignment = AssignmentType.TooltipAssignment;
                    Value = (string)nodes[2].Token.Text;
                    break;
                case "MouseTransparent":
                    TypeOfAssignment = AssignmentType.MouseTransparentAssignment;
                    Value = (int)nodes[2].Token.Value;
                    break;
                case "imagestates":
                    TypeOfAssignment = AssignmentType.ImageStatesAssignment;
                    Value = (int)nodes[2].Token.Value;
                    break;
                case "backgroundColor":
                    TypeOfAssignment = AssignmentType.BackgroundColorAssignment;
                    Value = (ArrayListNode)nodes[2].ChildNodes[1].AstNode;
                    break;
                case "framecolor":
                    TypeOfAssignment = AssignmentType.FrameColorAssignment;
                    Value = (ArrayListNode)nodes[2].ChildNodes[1].AstNode;
                    break;
                case "alignments":
                    TypeOfAssignment = AssignmentType.AlignmentsAssignment;
                    Value = (int)nodes[2].Token.Value;
                    break;
                case "visibleRows":
                    TypeOfAssignment = AssignmentType.VisibleRowsAssignment;
                    Value = (int)nodes[2].Token.Value;
                    break;
                case "columns":
                    TypeOfAssignment = AssignmentType.ColumnsAssignment;
                    Value = (int)nodes[2].Token.Value;
                    break;
                case "rowHeight":
                    TypeOfAssignment = AssignmentType.RowHeightAssignment;
                    Value = (int)nodes[2].Token.Value;
                    break;
                case "fillColor":
                    TypeOfAssignment = AssignmentType.FillColorAssignment;
                    Value = (ArrayListNode)nodes[2].ChildNodes[1].AstNode;
                    break;
                case "selectionFillColor":
                    TypeOfAssignment = AssignmentType.SelectionFillColorAssignment;
                    Value = (ArrayListNode)nodes[2].ChildNodes[1].AstNode;
                    break;
                case "cursor":
                    TypeOfAssignment = AssignmentType.CursorAssignment;
                    Value = (int)nodes[2].Token.Value;
                    break;
                case "lineHeight":
                    TypeOfAssignment = AssignmentType.LineHeightAssignment;
                    Value = (int)nodes[2].Token.Value;
                    break;
                case "edgeOffsetL":
                    TypeOfAssignment = AssignmentType.EdgeOffsetLAssignment;
                    Value = (int)nodes[2].Token.Value;
                    break;
                case "edgeOffsetR":
                    TypeOfAssignment = AssignmentType.EdgeOffsetRAssignment;
                    Value = (int)nodes[2].Token.Value;
                    break;
                case "edgeOffsetT":
                    TypeOfAssignment = AssignmentType.EdgeOffsetTAssignment;
                    Value = (int)nodes[2].Token.Value;
                    break;
                case "edgeOffsetB":
                    TypeOfAssignment = AssignmentType.EdgeOffsetBAssignment;
                    Value = (int)nodes[2].Token.Value;
                    break;
                case "foregroundImage":
                    TypeOfAssignment = AssignmentType.ForegroundImageAssignment;
                    Value = nodes[2].Token.Text;
                    break;
                case "backgroundImage":
                    TypeOfAssignment = AssignmentType.BackgroundImageAssignment;
                    Value = nodes[2].Token.Text;
                    break;
                case "value":
                    TypeOfAssignment = AssignmentType.ValueAssignment;
                    Value = (int)nodes[2].Token.Value;
                    break;
                case "useBackgroundImage":
                    TypeOfAssignment = AssignmentType.UseBackgroundImageAssignment;
                    Value = (int)nodes[2].Token.Value;
                    break;
                case "enabled":
                    TypeOfAssignment = AssignmentType.EnabledAssignment;
                    Value = (int)nodes[2].Token.Value;
                    break;
            }

            AsString = "Assignment";
        }
Exemplo n.º 33
0
        public AssignmentBase CreateAssignmentWithSenser(DateTime date, AssignmentType type)
        {
            var applyType = type.Sense(date);

            return Term.New(date.AddMinutes(applyType.TimeRange.StartValue), applyType, applyType.TimeRange.Length)
                       .Self<AssignmentBase>(a =>
                                                 {
                                                     a.HrDate = date;
                                                     a.NativeName = type.Name;
                                                 });
        }
Exemplo n.º 34
0
 public void GivenAssignmentHasType(string key, AssignmentType type)
 {
     context.For<Assignment>(key)
            .IsTrue(assignment => assignment.Type == type);
 }
 private void CheckHandler(AssignmentFlowNode handlerEntry, AssignmentAnalyzer analyzer, ref AssignmentType result)
 {
     AssignmentType handlerResult = analyzer.CheckAssignmentType(handlerEntry);
     switch (handlerResult)
     {
         case AssignmentType.SingleAssignment:
             if (result != AssignmentType.MultipleAssignments)
             {
                 result = handlerResult;
             }
             break;
         case AssignmentType.NotAssigned:
         case AssignmentType.MultipleAssignments:
             result = handlerResult;
             break;
     }
 }
Exemplo n.º 36
0
 public void IncorporateUpdates(AssignmentEdit vm)
 {
     Description = vm.Description;
     DueDate = vm.DueDate;
     IsActive = vm.IsActive;
     OwnerID = vm.OwnerID;
     Title = vm.Title;
     TopicID = vm.TopicID;
     Type = vm.Type;
 }
 /// <summary>
 /// There are no comments for AssignmentType in the schema.
 /// </summary>
 public void AddToAssignmentType(AssignmentType assignmentType)
 {
     base.AddObject("AssignmentType", assignmentType);
 }
Exemplo n.º 38
0
	    private static AssignmentType createRoleAssignment(String roleOid) 
        {
		    AssignmentType roleAssignment = new AssignmentType();
		    ObjectReferenceType roleRef = new ObjectReferenceType();
		    roleRef.oid = roleOid;
		    roleRef.type = ROLE_TYPE;
		    roleAssignment.Item = roleRef;
		    return roleAssignment;
	    }
 /// <summary>
 /// Create a new AssignmentType object.
 /// </summary>
 /// <param name="assignmentTypeID">Initial value of AssignmentTypeID.</param>
 public static AssignmentType CreateAssignmentType(int assignmentTypeID)
 {
     AssignmentType assignmentType = new AssignmentType();
     assignmentType.AssignmentTypeID = assignmentTypeID;
     return assignmentType;
 }
Exemplo n.º 40
0
 public override void Initial()
 {
     Types = _termStyleRepository.GetAssignmentTypesWithInsertRules();
     QueryType = Types.FirstOrDefault();
 }