NDesk.DBus.MessageWriter.WriteObject C# (CSharp) Method

WriteObject() public method

public WriteObject ( Type type, object val ) : void
type System.Type
val object
return void
        public void WriteObject(Type type, object val)
        {
            ObjectPath path;

            BusObject bobj = val as BusObject;

            if (bobj == null && val is MarshalByRefObject) {
                bobj = ((MarshalByRefObject)val).GetLifetimeService () as BusObject;
            }

            if (bobj == null)
                throw new Exception ("No object reference to write");

            path = bobj.Path;

            Write (path);
        }