public object Instance(CmlContext context, CmlEntity entity) { List <CmlParameter> parameters = entity.GetTopicalChildren <CmlEntityInfo>() .Convert(i => i.CreateParameter(context)) .ToList(); object representation = InstanceInternal( context .NewUnitSpace() .NewFragmentSpace(parameters) ); context.AddDeferredProcess(delegate() { parameters.Narrow(p => p.IsUnused()).Process(p => p.PushToRepresentation(context, representation)); }); return(representation); }
public object Instance(CmlContext context, CmlEntity entity) { CmlRepresentationSpace representation_space; object representation = Instance(context); if (entity.HasId()) { context.GetUnitSpace().AddRepresentation(entity.GetId(), representation); } context = context.NewRepresentationSpace(representation, out representation_space); context.AddDeferredProcess(delegate() { context.GetEngine().AssertApplyGeneralModifiers(context, representation); entity.GetTopicalChildren <CmlEntityInfo>().Process(i => i.PushToRepresentation(context, representation)); representation_space.SolidifyInstance(context); }); return(representation); }
static public AttemptResult AttemptReadCmlEntity(this StreamSystem item, string path, out CmlEntity entity, long milliseconds = StreamSystem.DEFAULT_WAIT) { return(item.AttemptReadText <CmlEntity>(path, delegate(string text) { return CmlEntity.DOMify(text); }, out entity, milliseconds)); }
static public void AddFragment(this FragmentLibrary item, string name, string text) { item.AddFragment( new CmlFragment_Entity(name, CmlEntity.DOMify(text)) ); }
static public void AddClass(this ClassLibrary item, Type type, string layout, string text) { item.AddClass( new CmlClass_Entity(type, layout, CmlEntity.DOMify(text)) ); }
public CmlClass GetCmlClass(Type t) { return(new CmlClass_Entity(t, layout, CmlEntity.DOMify(cml))); }
public CmlClass_Entity(Type t, string l, CmlEntity e) : base(t, l) { entity = e; }
public CmlValue_Link_WithEntity(CmlValue_Link l, CmlEntity e) { link = l; entity = e; }
public EffigyClassInfo_Static(CmlEntity e) { entity = e; }
public CmlFragment_Entity(string n, CmlEntity e) { name = n; entity = e; }
public object AssertInstance(CmlContext context, string tag, CmlEntity entity) { return(GetInstancer(tag).IfNotNull(i => i.Instance(context, entity)) .AssertNotNull(() => new CmlRuntimeError_InvalidIdException("entity", tag))); }
static public AttemptResult AttemptReadCmlEntity(this StreamSystemStream item, out CmlEntity entity, long milliseconds = StreamSystem.DEFAULT_WAIT) { return(item.GetStreamSystem().AttemptReadCmlEntity(item.GetPath(), out entity, milliseconds)); }