public DynamicGrainMethodInvoker(IParameterBinder parameterBinder, IOcelotLoggerFactory factory,
                                  JsonSerializer jsonSerializer)
 {
     this._parameterBinder = parameterBinder;
     this._logger          = factory.CreateLogger <DynamicGrainMethodInvoker>();
     this._jsonSerializer  = jsonSerializer;
 }
        public bool Initialize(List <Framework.Parameter> parameters, BindingContext context, UnityEngine.Object target)
        {
            Parameters   = parameters;
            Provider     = context.Provider;
            Binder       = context.Binder;
            EditorTarget = target;

            var isOk = IsValid();

            if (isOk && ListDrawer == null)
            {
                ListDrawer = new UnityEditorInternal.ReorderableList
                             (
                    Parameters,
                    typeof(Framework.Parameter),
                    false,
                    true,
                    false,
                    false
                             );

                ListDrawer.drawHeaderCallback += rect =>
                {
                    var oldColor = GUI.color;
                    GUI.color = Color.white;
                    GUI.Label(rect, "Parameter Bindings", EditorStyles.whiteLabel);
                    GUI.color = oldColor;
                };

                ListDrawer.drawElementBackgroundCallback += (rect, index, active, focused) => { };
                ListDrawer.elementHeight         = BIND_ENTRY_HEIGHT;
                ListDrawer.showDefaultBackground = false;
                ListDrawer.drawElementCallback  += OnDrawBinding;
            }

            return(isOk);
        }
示例#3
0
 public void BindWriter(TModel model, IParameterBinder storedProcedure)
 {
     writerAction(storedProcedure, model);
 }
示例#4
0
 public MethodBasedCommandFactory(IParameterBinder binder, params Type[] types)
 {
     _types  = types;
     _binder = binder;
 }
 public DynamicGrainMethodInvoker(IParameterBinder parameterBinder)
 {
     _parameterBinder = parameterBinder;
 }
示例#6
0
 public CommandProcessor(CommandRouter router, ITypeInstantiationStrategy instantiationStrategy, IParameterBinder parameterBinder)
 {
     _router = router;
     _parameterBinder = parameterBinder;
     _instantiationStrategy = instantiationStrategy;
 }
示例#7
0
 public BindingContext([NotNull] IParameterBinder binder, [NotNull] IDataSetProvider provider)
 {
     Provider = provider;
     Binder   = binder;
 }
 public ParameterBinderWrapper(IParameterBinder <T> inner)
 {
     _inner = inner;
 }
 public MethodBasedCommandFactory(IParameterBinder binder, params Type[] types)
 {
     _types = types;
     _binder = binder;
 }
 void OnChangeBindingType(ParamBinding binding, IParameterBinder binder, BindingType type)
 {
     binding.SetBindingType(type, Provider);
 }