Ejemplo n.º 1
0
        private void InitializeType()
        {
            repository.With(access.GetElementType());
            MetaDescription type = repository.GetDescription(access.GetElementType());

            instance.Type = type;
        }
Ejemplo n.º 2
0
        public void LeDragonTest()
        {
            Tower          t        = new Fame.Tower();
            MetaRepository metaRepo = t.metamodel;

            metaRepo.With(typeof(Dragon));
            metaRepo.With(typeof(Treasure));
            Assert.IsNotNull(metaRepo.Get("RPG.Dragon"));
            Assert.IsNotNull(metaRepo.Get("RPG.Treasure"));
            Dragon   leDragon   = t.model.New <Dragon>("RPG.Dragon");
            Treasure deltaHoard = t.model.New <Treasure>("RPG.Treasure");

            leDragon.AddHoard(deltaHoard);

            Assert.IsNotNull(leDragon);
            Assert.IsNotNull(deltaHoard);

            t.model.ExportMSEFile("C:/Users/george/out.mse");
        }
Ejemplo n.º 3
0
 private void InitializeSuperclass()
 {
     if (type.BaseType != null)
     {
         repository.With(type.BaseType);
         MetaDescription superclass = repository.GetDescription(type.BaseType);
         if (superclass != null)
         {
             instance.SuperClass = superclass;
         }
     }
 }
Ejemplo n.º 4
0
        public static Repository Metamodel()
        {
            Tower          t        = new Fame.Tower();
            MetaRepository metaRepo = t.metamodel;

            metaRepo.With(typeof(Entity));
            metaRepo.With(typeof(SourcedEntity));
            metaRepo.With(typeof(ContainerEntity));
            metaRepo.With(typeof(NamedEntity));
            metaRepo.With(typeof(Attribute));
            metaRepo.With(typeof(CSharp.CSharpEvent));
            metaRepo.With(typeof(BehaviouralEntity));
            metaRepo.With(typeof(Class));
            metaRepo.With(typeof(Method));
            metaRepo.With(typeof(Type));
            metaRepo.With(typeof(CSharp.CSharpProperty));
            metaRepo.With(typeof(CSharp.CSharpPropertyAccessor));
            metaRepo.With(typeof(AnnotationType));
            metaRepo.With(typeof(AnnotationTypeAttribute));
            metaRepo.With(typeof(AnnotationInstance));
            metaRepo.With(typeof(AnnotationInstanceAttribute));
            metaRepo.With(typeof(Exception));
            metaRepo.With(typeof(CaughtException));
            metaRepo.With(typeof(ThrownException));
            metaRepo.With(typeof(CSharp.Delegate));
            metaRepo.With(typeof(CSharp.CSharpStruct));
            metaRepo.With(typeof(ParameterizableClass));
            metaRepo.With(typeof(ParameterizedType));
            metaRepo.With(typeof(ParameterType));
            metaRepo.With(typeof(Enum));
            metaRepo.With(typeof(SourceAnchor));
            metaRepo.With(typeof(MultipleFileAnchor));
            metaRepo.With(typeof(AbstractFileAnchor));
            metaRepo.With(typeof(FileAnchor));
            metaRepo.With(typeof(Namespace));
            return(t.model);
        }