public void ProcessScriptBase(IScriptBase scriptBase, XmlNode scriptBaseNode) { /* * <Name>Table1</Name> * <Description /> * <Enabled>False</Enabled> * <IsUserDefined>False</IsUserDefined> * <UID>00000000-0000-0000-0000-000000000000</UID> */ NodeProcessor proc = new NodeProcessor(scriptBaseNode); scriptBase.Name = proc.GetString("Name"); scriptBase.Schema = proc.GetString("Schema"); scriptBase.Description = proc.GetString("Description"); scriptBase.Enabled = proc.GetBool("Enabled"); scriptBase.IsUserDefined = proc.GetBool("IsUserDefined"); if (proc.Exists(VirtualPropertyDeserialiser.VirtualPropertiesNodeName)) { var deserialiser = new VirtualPropertyDeserialiser(); scriptBase.Ex = deserialiser.DeserialiseVirtualProperties( scriptBaseNode.SelectSingleNode(VirtualPropertyDeserialiser.VirtualPropertiesNodeName)); } }
private void SerialiseScriptBaseInternal(IScriptBase scriptBase, XmlWriter writer) { writer.WriteElementString("Description", scriptBase.Description); writer.WriteElementString("Enabled", scriptBase.Enabled.ToString()); writer.WriteElementString("IsUserDefined", scriptBase.IsUserDefined.ToString()); writer.WriteElementString("Name", scriptBase.Name); writer.WriteElementString("Schema", scriptBase.Schema); ProcessScriptBase(scriptBase, writer); }
public bool Equals(IScriptBase obj) { if (ReferenceEquals(null, obj)) { return(false); } if (ReferenceEquals(this, obj)) { return(true); } return(Equals(obj.Name, Name)); //return Equals(obj.UID, UID); }
private bool GetSelectedDatabase(out IDatabase database, object tag) { database = null; if (tag is IDatabase) { database = tag as IDatabase; return(true); } if (tag is IScriptBase) { IScriptBase entity = tag as IScriptBase; database = entity.Database; return(true); } return(false); }
public override bool NameValidate(IScriptBase scriptBase, out string failReason) { return NameValidate((OneToManyRelationship)scriptBase, out failReason); }
public override string AliasDefault(IScriptBase oneToManyRelationship) { return AliasDefault((OneToManyRelationship)oneToManyRelationship); }
public override string AliasDefault(IScriptBase table) { return AliasDefault((Table)table); }
public override string AliasPluralDefault(IScriptBase scriptBase) { return(AliasPluralDefault((Filter)scriptBase)); }
public override string AliasPluralDefault(IScriptBase scriptBase) { return AliasPluralDefault((ScriptObject)scriptBase); }
public override string AliasPluralDefault(IScriptBase scriptBase) { return AliasPluralDefault((StoredProcedure)scriptBase); }
public override bool AliasValidate(IScriptBase scriptBase, out string failReason) { return(AliasValidate((MapColumn)scriptBase, out failReason)); }
public override string AliasDefault(IScriptBase column) { return AliasDefault((Column)column); }
public override bool AliasPluralValidate(IScriptBase scriptBase, out string failReason) { return AliasPluralValidate((ManyToManyRelationship)scriptBase, out failReason); }
public override string AliasDefault(IScriptBase manyToManyRelationship) { return AliasDefault((ManyToManyRelationship)manyToManyRelationship); }
public override string AliasDefault(IScriptBase mapColumn) { return AliasDefault((MapColumn)mapColumn); }
public override bool AliasValidate(IScriptBase restrictedValue, out string failReason) { return AliasValidate((RestrictedValue)restrictedValue, out failReason); }
public override string AliasPluralDefault(IScriptBase restrictedValue) { return AliasPluralDefault((RestrictedValue)restrictedValue); }
public override string AliasDefault(IScriptBase index) { return AliasDefault((Index)index); }
public override bool NameValidate(IScriptBase scriptBase, out string failReason) { return NameValidate((MapColumn)scriptBase, out failReason); }
public override string AliasDefault(IScriptBase mapColumn) { return(AliasDefault((MapColumn)mapColumn)); }
private static Filter GetNewScriptBase(ScriptObject newScriptObject, IScriptBase oldImmediateParent, Filter oldFilter) { Filter newFilter = null; try { newFilter = Search.GetFilter(newScriptObject.Filters, oldFilter.Name, false); if (newFilter == null) { newFilter = Search.GetFilter(newScriptObject.Filters, oldFilter); } if (newFilter == null) { // Filters should never just disappear. instead of throwing an exception we'll // add it back in. newFilter = new Filter(); newFilter.Parent = newScriptObject; SyncFilterProperties(new StringBuilder(), newFilter, oldFilter); //string errorMessage = string.Format("{0} [{2}.{1}] references missing filter [{2}.{3}].\n Select another filter or create a new one.", // oldImmediateParent.GetType().Name, // oldImmediateParent.Alias, // oldFilter.Parent.Alias, // oldFilter.Alias); //throw new Exception(errorMessage); } Assembly CurrentDomain_TypeResolve(object sender, ResolveEventArgs args) { throw new Exception("The method or operation is not implemented."); }
public override bool AliasValidate(IScriptBase scriptBase, out string failReason) { return(AliasValidate((StoredProcedure)scriptBase, out failReason)); }
public override bool NameValidate(IScriptBase scriptBase, out string failReason) { return NameValidate((LookupValue)scriptBase, out failReason); }
public override bool NameValidate(IScriptBase scriptBase, out string failReason) { return NameValidate((StoredProcedure)scriptBase, out failReason); }
public override string AliasDefault(IScriptBase key) { return(AliasDefault((Key)key)); }
public override bool NameValidate(IScriptBase scriptBase, out string failReason) { return(NameValidate((Filter)scriptBase, out failReason)); }
public override string AliasDefault(IScriptBase view) { return(AliasDefault((View)view)); }
public override string AliasPluralDefault(IScriptBase scriptBase) { return AliasPluralDefault((Lookup)scriptBase); }
public override string AliasPluralDefault(IScriptBase scriptBase) { return(AliasPluralDefault((ScriptObject)scriptBase)); }
/// <summary> /// Performs a shallow clone of this object's properties. /// Does not inclue virtual properties, columns, relationships, /// or parent objects. /// </summary> /// <param name="obj"></param> public virtual void CopyInto(IScriptBase obj) { obj.Name = Name; //obj.UID = UID; }
public override string AliasPluralDefault(IScriptBase scriptBase) { return AliasPluralDefault((OneToManyRelationship)scriptBase); }
public override string AliasDefault(IScriptBase oneToManyRelationship) { return(AliasDefault((OneToManyRelationship)oneToManyRelationship)); }
public override bool AliasValidate(IScriptBase scriptBase, out string failReason) { return(AliasValidate((OneToManyRelationship)scriptBase, out failReason)); }
public override string AliasPluralDefault(IScriptBase scriptBase) { return AliasPluralDefault((MapColumn)scriptBase); }
public bool HasChanges(IScriptBase value) { return(false); }
public void ProcessScriptBase(IScriptBase scriptBase, XmlNode scriptBaseNode) { /* <Name>Table1</Name> <Description /> <Enabled>False</Enabled> <IsUserDefined>False</IsUserDefined> <UID>00000000-0000-0000-0000-000000000000</UID> */ NodeProcessor proc = new NodeProcessor(scriptBaseNode); scriptBase.Name = proc.GetString("Name"); scriptBase.Schema = proc.GetString("Schema"); scriptBase.Description = proc.GetString("Description"); scriptBase.Enabled = proc.GetBool("Enabled"); scriptBase.IsUserDefined = proc.GetBool("IsUserDefined"); if (proc.Exists(VirtualPropertyDeserialiser.VirtualPropertiesNodeName)) { var deserialiser = new VirtualPropertyDeserialiser(); scriptBase.Ex = deserialiser.DeserialiseVirtualProperties( scriptBaseNode.SelectSingleNode(VirtualPropertyDeserialiser.VirtualPropertiesNodeName)); } }
public override string AliasPluralDefault(IScriptBase scriptBase) { return(AliasPluralDefault((OneToManyRelationship)scriptBase)); }
public override string AliasDefault(IScriptBase manyToManyRelationship) { return(AliasDefault((ManyToManyRelationship)manyToManyRelationship)); }
public override string AliasDefault(IScriptBase table) { return(AliasDefault((Table)table)); }
public override bool NameValidate(IScriptBase scriptBase, out string failReason) { return(NameValidate((Relationship)scriptBase, out failReason)); }
public override string AliasPluralDefault(IScriptBase scriptBase) { return(AliasPluralDefault((MapColumn)scriptBase)); }
public override string AliasDefault(IScriptBase relationship) { return(AliasDefault((Relationship)relationship)); }
public override string AliasPluralDefault(IScriptBase scriptBase) { return(AliasPluralDefault((StoredProcedure)scriptBase)); }
public override bool AliasValidate(IScriptBase scriptBase, out string failReason) { return AliasValidate((OneToOneRelationship)scriptBase, out failReason); }
public override string AliasDefault(IScriptBase parameter) { return(AliasDefault((Parameter)parameter)); }
public override bool NameValidate(IScriptBase scriptBase, out string failReason) { return(NameValidate((RestrictedValue)scriptBase, out failReason)); }
public override bool AliasPluralValidate(IScriptBase scriptBase, out string failReason) { return AliasPluralValidate((StoredProcedure)scriptBase, out failReason); }
public override string AliasPluralDefault(IScriptBase restrictedValue) { return(AliasPluralDefault((RestrictedValue)restrictedValue)); }
public override string AliasDefault(IScriptBase parameter) { return AliasDefault((Parameter)parameter); }
public override bool AliasValidate(IScriptBase restrictedValue, out string failReason) { return(AliasValidate((RestrictedValue)restrictedValue, out failReason)); }
public override bool NameValidate(IScriptBase scriptBase, out string failReason) { return NameValidate((ScriptObject)scriptBase, out failReason); }
public override string AliasDefault(IScriptBase view) { return AliasDefault((View)view); }
public override string AliasDefault(IScriptBase filter) { return(AliasDefault((Filter)filter)); }
public override bool AliasValidate(IScriptBase scriptBase, out string failReason) { return AliasValidate((View)scriptBase, out failReason); }
public override bool AliasPluralValidate(IScriptBase scriptBase, out string failReason) { return(AliasPluralValidate((Filter)scriptBase, out failReason)); }
public override bool Validate(IScriptBase scriptBase, out string failReason) { return(Validate((ScriptObject)scriptBase, out failReason)); }
public override bool AliasPluralValidate(IScriptBase scriptBase, out string failReason) { return AliasPluralValidate((Lookup)scriptBase, out failReason); }
public override string AliasDefault(IScriptBase relationship) { return AliasDefault((Relationship)relationship); }