namespace Xilium.CefGlue { using System; using System.Collections.Generic; using System.Diagnostics; using System.Runtime.InteropServices; using Xilium.CefGlue.Interop; /// /// Class representing a message. Can be used on any process and thread. /// public sealed unsafe partial class CefProcessMessage { /// /// Create a new CefProcessMessage object with the specified name. /// public static CefProcessMessage Create(string name) { fixed (char* name_str = name) { var n_name = new cef_string_t(name_str, name != null ? name.Length : 0); return CefProcessMessage.FromNative( cef_process_message_t.create(&n_name) ); } } /// /// Returns true if this object is valid. Do not call any other methods if this /// function returns false. /// public bool IsValid { get { return cef_process_message_t.is_valid(_self) != 0; } } /// /// Returns true if the values of this object are read-only. Some APIs may /// expose read-only objects. /// public bool IsReadOnly { get { return cef_process_message_t.is_read_only(_self) != 0; } } /// /// Returns a writable copy of this object. /// public CefProcessMessage Copy() { return CefProcessMessage.FromNative( cef_process_message_t.copy(_self) ); } /// /// Returns the message name. /// public string Name { get { var n_result = cef_process_message_t.get_name(_self); return cef_string_userfree.ToString(n_result); // FIXME: caching ? } } /// /// Returns the list of arguments. /// public CefListValue Arguments { get { return CefListValue.FromNative( cef_process_message_t.get_argument_list(_self) ); // FIXME: caching ? } } } }