///Returns a cached EditorObjectWrapepr of type T for target object
        public static T GetEditor <T>(object target) where T : EditorObjectWrapper
        {
            EditorObjectWrapper wrapper = null;

            if (cachedEditors.TryGetValue(target, out wrapper))
            {
                return((T)wrapper);
            }
            wrapper = (T)(typeof(T).CreateObject());
            wrapper.Init(target);
            return((T)(cachedEditors[target] = wrapper));
        }
Ejemplo n.º 2
0
 public void Init(EditorObjectWrapper editor, MethodInfo method)
 {
     this.editor = editor;
     this.method = method;
 }
Ejemplo n.º 3
0
 public void Init(EditorObjectWrapper editor, FieldInfo field)
 {
     this.editor = editor;
     this.field  = field;
 }