|
| 1 | +#region License |
| 2 | +// Copyright (c) 2007 James Newton-King |
| 3 | +// |
| 4 | +// Permission is hereby granted, free of charge, to any person |
| 5 | +// obtaining a copy of this software and associated documentation |
| 6 | +// files (the "Software"), to deal in the Software without |
| 7 | +// restriction, including without limitation the rights to use, |
| 8 | +// copy, modify, merge, publish, distribute, sublicense, and/or sell |
| 9 | +// copies of the Software, and to permit persons to whom the |
| 10 | +// Software is furnished to do so, subject to the following |
| 11 | +// conditions: |
| 12 | +// |
| 13 | +// The above copyright notice and this permission notice shall be |
| 14 | +// included in all copies or substantial portions of the Software. |
| 15 | +// |
| 16 | +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, |
| 17 | +// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES |
| 18 | +// OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND |
| 19 | +// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT |
| 20 | +// HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, |
| 21 | +// WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING |
| 22 | +// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR |
| 23 | +// OTHER DEALINGS IN THE SOFTWARE. |
| 24 | +#endregion |
| 25 | + |
| 26 | +using System.Collections.Generic; |
| 27 | +using System.Dynamic; |
| 28 | + |
| 29 | +namespace Gameloop.Vdf.Utilities |
| 30 | +{ |
| 31 | + internal class DynamicProxy<T> |
| 32 | + { |
| 33 | + public virtual IEnumerable<string> GetDynamicMemberNames(T instance) |
| 34 | + { |
| 35 | + return CollectionUtils.ArrayEmpty<string>(); |
| 36 | + } |
| 37 | + |
| 38 | + public virtual bool TryBinaryOperation(T instance, BinaryOperationBinder binder, object arg, out object result) |
| 39 | + { |
| 40 | + result = null; |
| 41 | + return false; |
| 42 | + } |
| 43 | + |
| 44 | + public virtual bool TryConvert(T instance, ConvertBinder binder, out object result) |
| 45 | + { |
| 46 | + result = null; |
| 47 | + return false; |
| 48 | + } |
| 49 | + |
| 50 | + public virtual bool TryCreateInstance(T instance, CreateInstanceBinder binder, object[] args, out object result) |
| 51 | + { |
| 52 | + result = null; |
| 53 | + return false; |
| 54 | + } |
| 55 | + |
| 56 | + public virtual bool TryDeleteIndex(T instance, DeleteIndexBinder binder, object[] indexes) |
| 57 | + { |
| 58 | + return false; |
| 59 | + } |
| 60 | + |
| 61 | + public virtual bool TryDeleteMember(T instance, DeleteMemberBinder binder) |
| 62 | + { |
| 63 | + return false; |
| 64 | + } |
| 65 | + |
| 66 | + public virtual bool TryGetIndex(T instance, GetIndexBinder binder, object[] indexes, out object result) |
| 67 | + { |
| 68 | + result = null; |
| 69 | + return false; |
| 70 | + } |
| 71 | + |
| 72 | + public virtual bool TryGetMember(T instance, GetMemberBinder binder, out object result) |
| 73 | + { |
| 74 | + result = null; |
| 75 | + return false; |
| 76 | + } |
| 77 | + |
| 78 | + public virtual bool TryInvoke(T instance, InvokeBinder binder, object[] args, out object result) |
| 79 | + { |
| 80 | + result = null; |
| 81 | + return false; |
| 82 | + } |
| 83 | + |
| 84 | + public virtual bool TryInvokeMember(T instance, InvokeMemberBinder binder, object[] args, out object result) |
| 85 | + { |
| 86 | + result = null; |
| 87 | + return false; |
| 88 | + } |
| 89 | + |
| 90 | + public virtual bool TrySetIndex(T instance, SetIndexBinder binder, object[] indexes, object value) |
| 91 | + { |
| 92 | + return false; |
| 93 | + } |
| 94 | + |
| 95 | + public virtual bool TrySetMember(T instance, SetMemberBinder binder, object value) |
| 96 | + { |
| 97 | + return false; |
| 98 | + } |
| 99 | + |
| 100 | + public virtual bool TryUnaryOperation(T instance, UnaryOperationBinder binder, out object result) |
| 101 | + { |
| 102 | + result = null; |
| 103 | + return false; |
| 104 | + } |
| 105 | + } |
| 106 | +} |
0 commit comments