Exemple #1
0
        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);
        }
Exemple #2
0
        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);
        }