コード例 #1
0
            public override IDiscreteBinding GetBinding(ExecutionContext executionContext)
            {
                SmalltalkClass cls = executionContext.Runtime.GetClass(this.ClassName);

                if (cls == null)
                {
                    return(null);
                }
                ClassVariableBinding binding = null;

                cls.ClassVariableBindings.TryGetValue(this.VariableName, out binding);
                return(binding);
            }
コード例 #2
0
        public static string GetMoniker(SmalltalkClass cls, ClassVariableBinding binding)
        {
            if (cls == null)
            {
                throw new ArgumentNullException("cls");
            }
            if (binding == null)
            {
                throw new ArgumentNullException("binding");
            }

            return(DiscreteBindingCallSiteBinderBase.GetMoniker(
                       DiscreteBindingCallSiteBinderBase.ClassVariablePrefix,
                       cls.Name.Value,
                       binding.Name.Value));
        }