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);
        }
Exemplo n.º 3
0
        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);
        }
Exemplo n.º 4
0
        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);
 }
Exemplo n.º 7
0
 public override string AliasDefault(IScriptBase table)
 {
     return AliasDefault((Table)table);
 }
Exemplo n.º 8
0
 public override string AliasPluralDefault(IScriptBase scriptBase)
 {
     return(AliasPluralDefault((Filter)scriptBase));
 }
Exemplo n.º 9
0
 public override string AliasPluralDefault(IScriptBase scriptBase)
 {
     return AliasPluralDefault((ScriptObject)scriptBase);
 }
Exemplo n.º 10
0
 public override string AliasPluralDefault(IScriptBase scriptBase)
 {
     return AliasPluralDefault((StoredProcedure)scriptBase);
 }
Exemplo n.º 11
0
 public override bool AliasValidate(IScriptBase scriptBase, out string failReason)
 {
     return(AliasValidate((MapColumn)scriptBase, out failReason));
 }
Exemplo n.º 12
0
 public override string AliasDefault(IScriptBase column)
 {
     return AliasDefault((Column)column);
 }
Exemplo n.º 13
0
 public override bool AliasPluralValidate(IScriptBase scriptBase, out string failReason)
 {
     return AliasPluralValidate((ManyToManyRelationship)scriptBase, out failReason);
 }
Exemplo n.º 14
0
 public override string AliasDefault(IScriptBase manyToManyRelationship)
 {
     return AliasDefault((ManyToManyRelationship)manyToManyRelationship);
 }
Exemplo n.º 15
0
 public override string AliasDefault(IScriptBase mapColumn)
 {
     return AliasDefault((MapColumn)mapColumn);
 }
Exemplo n.º 16
0
 public override bool AliasValidate(IScriptBase restrictedValue, out string failReason)
 {
     return AliasValidate((RestrictedValue)restrictedValue, out failReason);
 }
Exemplo n.º 17
0
 public override string AliasPluralDefault(IScriptBase restrictedValue)
 {
     return AliasPluralDefault((RestrictedValue)restrictedValue);
 }
Exemplo n.º 18
0
 public override string AliasDefault(IScriptBase index)
 {
     return AliasDefault((Index)index);
 }
Exemplo n.º 19
0
 public override bool NameValidate(IScriptBase scriptBase, out string failReason)
 {
     return NameValidate((MapColumn)scriptBase, out failReason);
 }
Exemplo n.º 20
0
 public override string AliasDefault(IScriptBase mapColumn)
 {
     return(AliasDefault((MapColumn)mapColumn));
 }
Exemplo n.º 21
0
            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.");
        }
Exemplo n.º 22
0
 public override bool AliasValidate(IScriptBase scriptBase, out string failReason)
 {
     return(AliasValidate((StoredProcedure)scriptBase, out failReason));
 }
Exemplo n.º 23
0
 public override bool NameValidate(IScriptBase scriptBase, out string failReason)
 {
     return NameValidate((LookupValue)scriptBase, out failReason);
 }
Exemplo n.º 24
0
 public override bool NameValidate(IScriptBase scriptBase, out string failReason)
 {
     return NameValidate((StoredProcedure)scriptBase, out failReason);
 }
Exemplo n.º 25
0
 public override string AliasDefault(IScriptBase key)
 {
     return(AliasDefault((Key)key));
 }
Exemplo n.º 26
0
 public override bool NameValidate(IScriptBase scriptBase, out string failReason)
 {
     return(NameValidate((Filter)scriptBase, out failReason));
 }
Exemplo n.º 27
0
 public override string AliasDefault(IScriptBase view)
 {
     return(AliasDefault((View)view));
 }
Exemplo n.º 28
0
 public override string AliasPluralDefault(IScriptBase scriptBase)
 {
     return AliasPluralDefault((Lookup)scriptBase);
 }
        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);
        }
Exemplo n.º 30
0
 public override string AliasPluralDefault(IScriptBase scriptBase)
 {
     return(AliasPluralDefault((ScriptObject)scriptBase));
 }
Exemplo n.º 31
0
 /// <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;
 }
Exemplo n.º 32
0
 public override string AliasPluralDefault(IScriptBase scriptBase)
 {
     return AliasPluralDefault((OneToManyRelationship)scriptBase);
 }
Exemplo n.º 33
0
 public override string AliasDefault(IScriptBase oneToManyRelationship)
 {
     return(AliasDefault((OneToManyRelationship)oneToManyRelationship));
 }
Exemplo n.º 34
0
 public override bool AliasValidate(IScriptBase scriptBase, out string failReason)
 {
     return(AliasValidate((OneToManyRelationship)scriptBase, out failReason));
 }
Exemplo n.º 35
0
 public override string AliasPluralDefault(IScriptBase scriptBase)
 {
     return AliasPluralDefault((MapColumn)scriptBase);
 }
Exemplo n.º 36
0
 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));
            }
        }
Exemplo n.º 38
0
 public override string AliasPluralDefault(IScriptBase scriptBase)
 {
     return(AliasPluralDefault((OneToManyRelationship)scriptBase));
 }
Exemplo n.º 39
0
 public override string AliasDefault(IScriptBase manyToManyRelationship)
 {
     return(AliasDefault((ManyToManyRelationship)manyToManyRelationship));
 }
Exemplo n.º 40
0
 public override string AliasDefault(IScriptBase table)
 {
     return(AliasDefault((Table)table));
 }
Exemplo n.º 41
0
 public override bool NameValidate(IScriptBase scriptBase, out string failReason)
 {
     return(NameValidate((Relationship)scriptBase, out failReason));
 }
Exemplo n.º 42
0
 public override string AliasPluralDefault(IScriptBase scriptBase)
 {
     return(AliasPluralDefault((MapColumn)scriptBase));
 }
Exemplo n.º 43
0
 public override string AliasDefault(IScriptBase relationship)
 {
     return(AliasDefault((Relationship)relationship));
 }
Exemplo n.º 44
0
 public override string AliasPluralDefault(IScriptBase scriptBase)
 {
     return(AliasPluralDefault((StoredProcedure)scriptBase));
 }
Exemplo n.º 45
0
 public override bool AliasValidate(IScriptBase scriptBase, out string failReason)
 {
     return AliasValidate((OneToOneRelationship)scriptBase, out failReason);
 }
Exemplo n.º 46
0
 public override string AliasDefault(IScriptBase parameter)
 {
     return(AliasDefault((Parameter)parameter));
 }
Exemplo n.º 47
0
 public override bool NameValidate(IScriptBase scriptBase, out string failReason)
 {
     return(NameValidate((RestrictedValue)scriptBase, out failReason));
 }
Exemplo n.º 48
0
 public override bool AliasPluralValidate(IScriptBase scriptBase, out string failReason)
 {
     return AliasPluralValidate((StoredProcedure)scriptBase, out failReason);
 }
Exemplo n.º 49
0
 public override string AliasPluralDefault(IScriptBase restrictedValue)
 {
     return(AliasPluralDefault((RestrictedValue)restrictedValue));
 }
Exemplo n.º 50
0
 public override string AliasDefault(IScriptBase parameter)
 {
     return AliasDefault((Parameter)parameter);
 }
Exemplo n.º 51
0
 public override bool AliasValidate(IScriptBase restrictedValue, out string failReason)
 {
     return(AliasValidate((RestrictedValue)restrictedValue, out failReason));
 }
Exemplo n.º 52
0
 public override bool NameValidate(IScriptBase scriptBase, out string failReason)
 {
     return NameValidate((ScriptObject)scriptBase, out failReason);
 }
Exemplo n.º 53
0
 public override string AliasDefault(IScriptBase view)
 {
     return AliasDefault((View)view);
 }
Exemplo n.º 54
0
 public override string AliasDefault(IScriptBase filter)
 {
     return(AliasDefault((Filter)filter));
 }
Exemplo n.º 55
0
 public override bool AliasValidate(IScriptBase scriptBase, out string failReason)
 {
     return AliasValidate((View)scriptBase, out failReason);
 }
Exemplo n.º 56
0
 public override bool AliasPluralValidate(IScriptBase scriptBase, out string failReason)
 {
     return(AliasPluralValidate((Filter)scriptBase, out failReason));
 }
Exemplo n.º 57
0
 public override bool Validate(IScriptBase scriptBase, out string failReason)
 {
     return(Validate((ScriptObject)scriptBase, out failReason));
 }
Exemplo n.º 58
0
 public override bool AliasPluralValidate(IScriptBase scriptBase, out string failReason)
 {
     return AliasPluralValidate((Lookup)scriptBase, out failReason);
 }
Exemplo n.º 59
0
 public override string AliasDefault(IScriptBase relationship)
 {
     return AliasDefault((Relationship)relationship);
 }