Bike.Interpreter.Interpreter.PerformAssign C# (CSharp) Метод

PerformAssign() приватный Метод

private PerformAssign ( object target, Node suffix, object value, bool staticDotNetAssign ) : object
target object
suffix Node
value object
staticDotNetAssign bool
Результат object
        private object PerformAssign(object target, Node suffix, object value,
                                            bool staticDotNetAssign)
        {
            if (staticDotNetAssign)
            {
                SetStaticProperty((Type)target, suffix.SuffixValue(this), value);
            }
            else
            {
                var scope = target as IScope;
                if (scope != null)
                {
                    scope.Assign(suffix.SuffixValue(this), value);
                }
                else if (suffix is IndexSuffix)
                {
                    SetInstanceIndexer(target, suffix.Arguments(this), value);
                }
                else
                {
                    SetInstanceProperty(target, suffix.SuffixValue(this), value);
                }
            }
            return value;
        }