Exemplo n.º 1
0
 public static Address Address(this Attach attach)
 {
     if (attach.IsReceiver())
     {
         return(((Source)attach.Source).Address);
     }
     return(((Target)attach.Target).Address);
 }
Exemplo n.º 2
0
 public static bool Dynamic(this Attach attach)
 {
     if (attach.IsReceiver())
     {
         return(((Source)attach.Source).Dynamic());
     }
     return(((Target)attach.Target).Dynamic());
 }
Exemplo n.º 3
0
 public static bool Dynamic(this Attach attach)
 {
     if (attach.IsReceiver())
     {
         Fx.Assert(attach.Source != null && attach.Source is Source, "Source is not valid.");
         return(((Source)attach.Source).Dynamic());
     }
     else
     {
         Fx.Assert(attach.Target != null && attach.Target is Target, "Target is not valid.");
         return(((Target)attach.Target).Dynamic());
     }
 }
Exemplo n.º 4
0
 public static Terminus Terminus(this Attach attach)
 {
     if (attach.IsReceiver())
     {
         Source source = attach.Source as Source;
         return(source == null ? null : new Terminus(source));
     }
     else
     {
         Target target = attach.Target as Target;
         return(target == null ? null : new Terminus(target));
     }
 }
Exemplo n.º 5
0
        public static Terminus Terminus(this Attach attach)
        {
            if (attach.IsReceiver())
            {
                Source source = attach.Source as Source;
                if (source == null)
                {
                    return(null);
                }
                return(new Terminus(source));
            }
            Target target = attach.Target as Target;

            if (target == null)
            {
                return(null);
            }
            return(new Terminus(target));
        }
Exemplo n.º 6
0
 public static Address Address(this Attach attach)
 {
     return(Address(attach, attach.IsReceiver()));
 }