public static Repository Metamodel() { Tower t = new Fame.Tower(); MetaRepository metaRepo = t.metamodel; metaRepo.RegisterType(typeof(Entity)); metaRepo.RegisterType(typeof(SourcedEntity)); metaRepo.RegisterType(typeof(ContainerEntity)); metaRepo.RegisterType(typeof(NamedEntity)); metaRepo.RegisterType(typeof(Attribute)); metaRepo.RegisterType(typeof(Net.Event)); metaRepo.RegisterType(typeof(BehaviouralEntity)); metaRepo.RegisterType(typeof(Class)); metaRepo.RegisterType(typeof(Method)); metaRepo.RegisterType(typeof(Type)); metaRepo.RegisterType(typeof(Net.Property)); metaRepo.RegisterType(typeof(Net.PropertyAccessor)); metaRepo.RegisterType(typeof(Net.Delegate)); metaRepo.RegisterType(typeof(AnnotationType)); metaRepo.RegisterType(typeof(AnnotationTypeAttribute)); metaRepo.RegisterType(typeof(AnnotationInstance)); metaRepo.RegisterType(typeof(AnnotationInstanceAttribute)); metaRepo.RegisterType(typeof(Exception)); metaRepo.RegisterType(typeof(CaughtException)); metaRepo.RegisterType(typeof(ThrownException)); metaRepo.RegisterType(typeof(Net.Delegate)); metaRepo.RegisterType(typeof(Net.Struct)); metaRepo.RegisterType(typeof(ParameterizableClass)); metaRepo.RegisterType(typeof(ArgumentType)); metaRepo.RegisterType(typeof(ParameterType)); metaRepo.RegisterType(typeof(Enum)); metaRepo.RegisterType(typeof(SourceAnchor)); metaRepo.RegisterType(typeof(MultipleFileAnchor)); metaRepo.RegisterType(typeof(AbstractFileAnchor)); metaRepo.RegisterType(typeof(FileAnchor)); metaRepo.RegisterType(typeof(Namespace)); metaRepo.RegisterType(typeof(ParameterizableMethod)); metaRepo.RegisterType(typeof(TypeBoundary)); metaRepo.RegisterType(typeof(Implements)); metaRepo.RegisterType(typeof(ControlFlowStructure)); metaRepo.RegisterType(typeof(ScopingEntity)); return(t.model); }
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"); }
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); }