Beispiel #1
0
        private void GenerateObservable(Type type, string label)
        {
            var implementation = CodeGenerator.MakeDataEntity(type, label);

            DependencyResolverAdapter.AddEntity(type, implementation);
            //Resolver.GetConfigurator().Bind(type).To(implementation).SetTransientScope();
            GraphJsonConverter.AddPair(type, implementation);
        }
Beispiel #2
0
        private T Create <T>()
        {
            var t = ActivatorUtilities.CreateInstance(_resolver, GraphJsonConverter.GetImplementationType(typeof(T)));

            if (t != null)
            {
                return((T)t);
            }
            return(default(T));
        }
        protected void GenerateObservable(Type type, string label)
        {
            Type implementation;

            implementation = typeof(IVertex).IsAssignableFrom(type) ?
                             CodeGenerator.MakeDataEntity(type, label) :
                             CodeGenerator.MakeEdgeDataEntity(type, label);
            DependencyResolverAdapter.AddEntity(type, implementation);
            GraphJsonConverter.AddPair(type, implementation);
        }