예제 #1
0
        /// <inheritdoc />
        public ThingContext Create(Thing thing, ThingOption option)
        {
            var thingType = thing.GetType();

            _response
            .SetThing(thing)
            .SetThingOption(option);

            _event
            .SetThing(thing)
            .SetThingOption(option)
            .SetThingType(thingType);

            _property
            .SetThing(thing)
            .SetThingOption(option);

            _action
            .SetThing(thing)
            .SetThingOption(option)
            .SetThingType(thingType);

            VisitEvent(thingType);
            VisitProperty(thingType);
            VisitAction(thingType);

            return(new ThingContext(
                       _response.Build(),
                       _event.Build(),
                       _action.Build(),
                       _property.Build()));
        }