Ejemplo n.º 1
0
        protected override void triggerChangeDelegate(ChangedBy changedBy)
        {
            if (_enumChangedDelegate == null)
            {
                return;
            }

            _enumChangedDelegate(_value, changedBy);
        }
Ejemplo n.º 2
0
        public static void triggerChangeDelegate(SimCapiNumber simCapiNumber, ChangedBy changedBy)
        {
            if (simCapiNumber._numberChangedDelegate == null)
            {
                return;
            }

            simCapiNumber._numberChangedDelegate(simCapiNumber._value, changedBy);
        }
Ejemplo n.º 3
0
        public static void triggerChangeDelegate(SimCapiBoolean simCapiBoolean, ChangedBy changedBy)
        {
            if (simCapiBoolean._booleanChangedDelegate == null)
            {
                return;
            }

            simCapiBoolean._booleanChangedDelegate(simCapiBoolean._value, changedBy);
        }
Ejemplo n.º 4
0
        public static void triggerChangeDelegate(SimCapiString simCapiString, ChangedBy changedBy)
        {
            if (simCapiString._stringChangedDelegate == null)
            {
                return;
            }

            simCapiString._stringChangedDelegate(simCapiString._value, changedBy);
        }
 /// <summary>
 /// Gets the hash code
 /// </summary>
 /// <returns>Hash code</returns>
 public override int GetHashCode()
 {
     unchecked // Overflow is fine, just wrap
     {
         var hashCode = 41;
         // Suitable nullity checks etc, of course :)
         if (InventoryOrderId != null)
         {
             hashCode = hashCode * 59 + InventoryOrderId.GetHashCode();
         }
         if (Checked != null)
         {
             hashCode = hashCode * 59 + Checked.GetHashCode();
         }
         if (LastModified != null)
         {
             hashCode = hashCode * 59 + LastModified.GetHashCode();
         }
         if (Created != null)
         {
             hashCode = hashCode * 59 + Created.GetHashCode();
         }
         if (ChangedBy != null)
         {
             hashCode = hashCode * 59 + ChangedBy.GetHashCode();
         }
         if (CommentOther != null)
         {
             hashCode = hashCode * 59 + CommentOther.GetHashCode();
         }
         if (CommentCostCenter != null)
         {
             hashCode = hashCode * 59 + CommentCostCenter.GetHashCode();
         }
         if (CommentPlant != null)
         {
             hashCode = hashCode * 59 + CommentPlant.GetHashCode();
         }
         if (CommentLocation != null)
         {
             hashCode = hashCode * 59 + CommentLocation.GetHashCode();
         }
         if (Status != null)
         {
             hashCode = hashCode * 59 + Status.GetHashCode();
         }
         if (Asset != null)
         {
             hashCode = hashCode * 59 + Asset.GetHashCode();
         }
         if (AssetNumber != null)
         {
             hashCode = hashCode * 59 + AssetNumber.GetHashCode();
         }
         if (SubNumber != null)
         {
             hashCode = hashCode * 59 + SubNumber.GetHashCode();
         }
         if (CompanyCode != null)
         {
             hashCode = hashCode * 59 + CompanyCode.GetHashCode();
         }
         return(hashCode);
     }
 }
        /// <summary>
        /// Returns true if InventoryOrderAsset instances are equal
        /// </summary>
        /// <param name="other">Instance of InventoryOrderAsset to be compared</param>
        /// <returns>Boolean</returns>
        public bool Equals(InventoryOrderAsset other)
        {
            if (ReferenceEquals(null, other))
            {
                return(false);
            }
            if (ReferenceEquals(this, other))
            {
                return(true);
            }

            return
                ((
                     InventoryOrderId == other.InventoryOrderId ||
                     InventoryOrderId != null &&
                     InventoryOrderId.Equals(other.InventoryOrderId)
                     ) &&
                 (
                     Checked == other.Checked ||
                     Checked != null &&
                     Checked.Equals(other.Checked)
                 ) &&
                 (
                     LastModified == other.LastModified ||
                     LastModified != null &&
                     LastModified.Equals(other.LastModified)
                 ) &&
                 (
                     Created == other.Created ||
                     Created != null &&
                     Created.Equals(other.Created)
                 ) &&
                 (
                     ChangedBy == other.ChangedBy ||
                     ChangedBy != null &&
                     ChangedBy.Equals(other.ChangedBy)
                 ) &&
                 (
                     CommentOther == other.CommentOther ||
                     CommentOther != null &&
                     CommentOther.Equals(other.CommentOther)
                 ) &&
                 (
                     CommentCostCenter == other.CommentCostCenter ||
                     CommentCostCenter != null &&
                     CommentCostCenter.Equals(other.CommentCostCenter)
                 ) &&
                 (
                     CommentPlant == other.CommentPlant ||
                     CommentPlant != null &&
                     CommentPlant.Equals(other.CommentPlant)
                 ) &&
                 (
                     CommentLocation == other.CommentLocation ||
                     CommentLocation != null &&
                     CommentLocation.Equals(other.CommentLocation)
                 ) &&
                 (
                     Status == other.Status ||
                     Status != null &&
                     Status.Equals(other.Status)
                 ) &&
                 (
                     Asset == other.Asset ||
                     Asset != null &&
                     Asset.Equals(other.Asset)
                 ) &&
                 (
                     AssetNumber == other.AssetNumber ||
                     AssetNumber != null &&
                     AssetNumber.Equals(other.AssetNumber)
                 ) &&
                 (
                     SubNumber == other.SubNumber ||
                     SubNumber != null &&
                     SubNumber.Equals(other.SubNumber)
                 ) &&
                 (
                     CompanyCode == other.CompanyCode ||
                     CompanyCode != null &&
                     CompanyCode.Equals(other.CompanyCode)
                 ));
        }
Ejemplo n.º 7
0
        public void PopulateShapeDataFromInfo(Visio.Shape shape, WorkItemShapeVersion shapeVersion)
        {
            // These changed between V1 and V2

            if (shapeVersion.Equals(WorkItemShapeVersion.V1))
            {
                shape.CellsU["Prop.CreatedBy"].FormulaU   = CreatedBy.WrapInDblQuotes();
                shape.CellsU["Prop.CreatedDate"].FormulaU = CreatedDate.WrapInDblQuotes();

                shape.CellsU["Prop.TeamProject"].FormulaU = TeamProject.WrapInDblQuotes();

                shape.CellsU["Prop.PageName"].FormulaU = WorkItemType.WrapInDblQuotes();

                shape.CellsU["Prop.State"].FormulaU = State.WrapInDblQuotes();

                shape.CellsU["Prop.ChangedBy"].FormulaU   = ChangedBy.WrapInDblQuotes();
                shape.CellsU["Prop.ChangedDate"].FormulaU = ChangedDate.WrapInDblQuotes();
            }
            else
            {
                // Map the properties to the corresponding Prop Data fields on the generic shape

                shape.CellsU["Prop.TextUpper2"].FormulaU = CreatedBy.WrapInDblQuotes();
                shape.CellsU["Prop.TextUpper1"].FormulaU = CreatedDate.WrapInDblQuotes();

                shape.CellsU["Prop.TextHeader2"].FormulaU = TeamProject.WrapInDblQuotes();

                shape.CellsU["Prop.WorkItemType"].FormulaU = WorkItemType.WrapInDblQuotes();

                //shape.CellsU["Prop.TextFooter2"].FormulaU = state.ToString().WrapInDblQuotes();
                shape.CellsU["Prop.TextFooter1"].FormulaU = State.WrapInDblQuotes();

                shape.CellsU["Prop.TextLower1"].FormulaU = ChangedBy.WrapInDblQuotes();
                shape.CellsU["Prop.TextLower2"].FormulaU = ChangedDate.WrapInDblQuotes();

                // Most likely PageName

                shape.CellsU["Prop.PageName"].FormulaU = $"{WorkItemType} {ID}".WrapInDblQuotes();

                shape.CellsU["Prop.RelatedBugs"].FormulaU = RelatedBugs.WrapInDblQuotes();
            }

            // These didn't change

            shape.CellsU["Prop.Organization"].FormulaU = Organization.WrapInDblQuotes();
            shape.CellsU["Prop.ID"].FormulaU           = ID.WrapInDblQuotes();

            shape.CellsU["Prop.Title"].FormulaU = Title.WrapInDblQuotes();

            shape.CellsU["Prop.RelatedLinks"].FormulaU  = RelatedLinkCount.WrapInDblQuotes();
            shape.CellsU["Prop.ExternalLinks"].FormulaU = ExternalLinkCount.WrapInDblQuotes();
            shape.CellsU["Prop.RemoteLinks"].FormulaU   = RemoteLinkCount.WrapInDblQuotes();
            shape.CellsU["Prop.HyperLinks"].FormulaU    = HyperLinkCount.WrapInDblQuotes();

            shape.CellsU["Prop.ExternalLink"].FormulaU =
                $"http://dev.azure.com/{Organization}/{TeamProject}/_workitems/edit/{ID}/".WrapInDblQuotes();

            shape.CellsU["Prop.AreaPath"].FormulaU      = AreaPath.WrapInDblQuotes();
            shape.CellsU["Prop.IterationPath"].FormulaU = IterationPath.WrapInDblQuotes();

            switch (WorkItemType)
            {
            case "Bug":
                shape.CellsU["Prop.FieldIssue"].FormulaU = FieldIssue.WrapInDblQuotes();
                break;

            case "User Story":
                shape.CellsU["Prop.TaskType"].FormulaU = TaskType.WrapInDblQuotes();
                break;

            default:
                break;
            }
        }
Ejemplo n.º 8
0
        public static void triggerChangeDelegate(SimCapiPointArray simCapiPointArray, ChangedBy changedBy)
        {
            if (simCapiPointArray._pointArrayChangedDelegate == null)
            {
                return;
            }

            simCapiPointArray._pointArrayChangedDelegate(simCapiPointArray._pointList.ToArray(), changedBy);
        }
Ejemplo n.º 9
0
        public static void triggerChangeDelegate(SimCapiMathExpression simCapiMathExpression, ChangedBy changedBy)
        {
            if (simCapiMathExpression._mathExpressionChangedDelegate == null)
            {
                return;
            }

            simCapiMathExpression._mathExpressionChangedDelegate(simCapiMathExpression._value, changedBy);
        }
Ejemplo n.º 10
0
 protected abstract void triggerChangeDelegate(ChangedBy changedBy);
Ejemplo n.º 11
0
 public static void triggerChangeDelegate(SimCapiGenericEnum simCapiGenericEnum, ChangedBy changedBy)
 {
     simCapiGenericEnum.triggerChangeDelegate(changedBy);
 }
Ejemplo n.º 12
0
        public static void triggerChangeDelegate(SimCapiStringArray simCapiStringArray, ChangedBy changedBy)
        {
            if (simCapiStringArray._stringArrayChangedDelegate == null)
            {
                return;
            }

            simCapiStringArray._stringArrayChangedDelegate(simCapiStringArray._values.ToArray(), changedBy);
        }