/** * Retrieves OID created by model Web Service from the returned list of ObjectDeltaOperations. * * @param operationListType result of the model web service executeChanges call * @param originalDelta original request used to find corresponding ObjectDeltaOperationType instance. Must be of ADD type. * @return OID if found * * PRELIMINARY IMPLEMENTATION. Currently the first returned ADD delta with the same object type as original delta is returned. */ public static string getOidFromDeltaOperationList(ObjectDeltaOperationType[] operations, ObjectDeltaType originalDelta) { if (originalDelta.changeType != ChangeTypeType.add) { throw new ArgumentException("Original delta is not of ADD type"); } if (originalDelta.objectToAdd == null) { throw new ArgumentException("Original delta contains no object-to-be-added"); } foreach (ObjectDeltaOperationType operationType in operations) { ObjectDeltaType objectDeltaType = operationType.objectDelta; if (objectDeltaType.changeType == ChangeTypeType.add && objectDeltaType.objectToAdd != null) { ObjectType1 objectAdded = (ObjectType1)objectDeltaType.objectToAdd; if (objectAdded.GetType().Equals(originalDelta.objectToAdd.GetType())) { return(objectAdded.oid); } } } return(null); }
private static string GetObjectTypeName(ObjectType1 type1) { switch (type1) { case ObjectType1.Rule: return "RULE"; case ObjectType1.Trigger: return "TRIGGER"; case ObjectType1.View: return "VIEW"; case ObjectType1.Function: return "FUNCTION"; case ObjectType1.StoreProcedure: return "PROCEDURE"; case ObjectType1.ClrStoreProcedure: return "PROCEDURE"; case ObjectType1.ClrTrigger: return "TRIGGER"; case ObjectType1.ClrFunction: return "FUNCTION"; case ObjectType1.Assembly: return "ASSEMBLY"; default: return ""; } }
protected Code(ObjectType1 type1, ScripActionType addAction, ScripActionType dropAction) : base(type1) { DependenciesIn = new List<String>(); DependenciesOut = new List<String>(); TypeName = GetObjectTypeName(ObjectType1); /*Por el momento, solo los Assemblys manejan deep de dependencias*/ if (ObjectType1 == ObjectType1.Assembly) { deepMin = 500; } }
public ObjectDependency(string name, string Column, ObjectType1 type1) { this.name = name; this.columnName = Column; this.type1 = type1; }
public ObjectType1 action(ObjectType1 objectType1) { Console.WriteLine("1"); return(objectType1); }
public CompositeObj(ObjectType1 obj1, ObjectType2 obj2) { this.obj1 = obj1; this.obj2 = obj2; }
private static string dump(ObjectType1[] objects) { if (objects == null) { return "No objects."; } StringBuilder sb = new StringBuilder(); sb.Append("Objects returned: ").Append(objects.Length).Append("\n"); foreach (ObjectType1 obj in objects) { sb.Append(" - ").Append(getOrig(obj.name)).Append("\n"); } return sb.ToString(); }
public SqlOptionFilterItem(ObjectType1 type1, string value) { Filter = value; Type1 = type1; }
protected ClrCode(ObjectType1 type1, ScripActionType addAction, ScripActionType dropAction) : base(type1, addAction, dropAction) { }
protected MsSqlSchemaBase(ISchema schema, ObjectType1 index) : base(ObjectType1.Undefined) { throw new NotSupportedException(); }
protected MsSqlSchemaBase(ObjectType1 objectType1) : base(objectType1) { ExtendedProperties = new SchemaList<ExtendedProperty, SchemaBase>(); }
protected SchemaBase(ObjectType1 objectType1) { Guid = System.Guid.NewGuid().ToString(); ObjectType1 = objectType1; status = ObjectStatus.OriginalStatus; }