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); }
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); }