示例#1
0
        public static Value SendSuperMessage(Class super, string messageName, Arguments arguments)
        {
            var reference = State.GetInvokeable(Object.InvokeableName(super.Name, true, messageName));

            RejectNull(reference, LOCATION, $"reference for super.{Unmangle(messageName)} couldn't be found");
            using (var popper = new RegionPopper(new Region(), "super"))
            {
                if (super.SuperName.IsNotEmpty())
                {
                    var newSuper = Regions[super.SuperName];
                    popper.Push();
                    Regions.SetParameter("super", newSuper);
                }
                else
                {
                    popper.Push();
                    Regions.SetParameter("super", "");
                }
                var value = reference.Invoke(arguments);
                return(value);
            }
        }
示例#2
0
 public ObjectRegion(Object obj, Hash <string, IInvokable> invariants)
 {
     this.obj        = obj;
     this.invariants = invariants;
 }
示例#3
0
 public ObjectRegion(Object obj)
 {
     this.obj   = obj;
     invariants = new Hash <string, IInvokable>();
 }
示例#4
0
 public Contract(Object obj, string name, Bits32 <ContractType> types)
     : this(obj, name)
 {
     this.types = types;
 }
示例#5
0
 public Contract(Object obj, string name)
 {
     this.obj  = obj;
     this.name = name;
     types     = ContractType.None;
 }