예제 #1
0
 public EntityImpl()
 {
     Key       = new EntityKeyImpl();
     Generator = new EntityGenerator("assigned");
     Cache     = new Cache()
     {
         Include = Cache.IncludeTypes.All,
         Region  = "",
         Usage   = Cache.UsageTypes.None
     };
     Discriminator = new Discriminator();
 }
예제 #2
0
 public EntityImpl()
 {
     Key = new EntityKeyImpl();
     Generator = new EntityGenerator("assigned");
     Cache = new Cache()
     {
         Include = Cache.IncludeTypes.All,
         Region = "",
         Usage = Cache.UsageTypes.None
     };
     Discriminator = new Discriminator();
 }
예제 #3
0
        private void SerialiseGeneratorInternal(EntityGenerator generator, XmlWriter writer)
        {
            writer.WriteStartElement("Generator");
            writer.WriteElementString("ClassName", generator.ClassName);
            writer.WriteStartElement("Parameters");

            foreach (var p in generator.Parameters)
            {
                writer.WriteStartElement("Param");
                writer.WriteAttributeString("Name", p.Name);
                writer.WriteAttributeString("Value", p.Value);
                writer.WriteEndElement();
            }
            writer.WriteEndElement();
            writer.WriteEndElement();
        }
예제 #4
0
        public EntityGenerator DeserialiseGenerator(XmlNode generatorNode)
        {
            var generator = new EntityGenerator(generatorNode.SelectSingleNode("ClassName").InnerText);
            //generator.EventRaisingDisabled = true;

            XmlNodeList nodes = generatorNode.SelectNodes("Parameters/Param");

            if (nodes != null)
            {
                foreach (XmlNode paramNode in nodes)
                {
                    generator.Parameters.Add(new EntityGenerator.Parameter(paramNode.Attributes["Name"].Value, paramNode.Attributes["Value"].Value));
                }
            }
            //generator.EventRaisingDisabled = false;
            return(generator);
        }
예제 #5
0
 public EntityImpl(string name)
     : this()
 {
     Name      = name;
     Generator = new EntityGenerator("assigned");
 }
예제 #6
0
 public EntityImpl(string name)
     : this()
 {
     Name = name;
     Generator = new EntityGenerator("assigned");
 }