Exemple #1
0
 protected override void CompilerImplementation(TEntity Entity)
 {
     foreach (DBTableField Field in Manager.Cache.GetFields <TEntity>())
     {
         FieldValueMap.Add(Field.Name, null);
     }
 }
Exemple #2
0
        protected override void CompilerImplementation(TEntity Entity)
        {
            foreach (DBTableField Field in Manager.Cache.GetFields <TEntity>())
            {
                if (Field.IsPrimaryKey)
                {
                    SingleCondition = (Field.Name, new MySqlParameter
                    {
                        ParameterName = "@0",
                        Value = Field.Property.GetValue(Entity)
                    });
                    continue;
                }

                if (Field.IsAutoIncrement)
                {
                    continue;
                }

                FieldValueMap.Add(Field.Name, new MySqlParameter
                {
                    ParameterName = "@" + ++ParameterIdentifier,
                    Value         = Field.Property.GetValue(Entity)
                });
            }
        }
Exemple #3
0
        public void TestCreateIssue()
        {
            string constantValue = string.Format("{0} at {1} UTC", DateTime.UtcNow.ToLongDateString(), DateTime.UtcNow.ToLongTimeString());

            //This is to list fields and their values for bug creation
            IEnumerable <JsonPatchItem> bugItemValues = FieldValueMap.CreateInstance(Maps.TFSEnumToJsonMap)
                                                        .Append(FieldName.Title, string.Format("Test Issue Created via API on '{0}'", constantValue))
                                                        .Append(FieldName.AssignedTo, "Bankey Sharma")
                                                        .Append(FieldName.AreaPath, "area-path-value")
                                                        .Append(FieldName.IterationPath, "iteration-value")
                                                        .Append(FieldName.Tags, "available-tags")
                                                        .Append(FieldName.Description, string.Format("Sample description steps.\r\n{0}", constantValue))
                                                        .Append(FieldName.Priority, "1")
                                                        .Append(FieldName.Severity, "2 - High")
                                                        .Build();

            azureContext.CreateIssue(bugItemValues);
        }