本文整理汇总了C#中GLib.List.ToArray方法的典型用法代码示例。如果您正苦于以下问题:C# List.ToArray方法的具体用法?C# List.ToArray怎么用?C# List.ToArray使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类GLib.List
的用法示例。
在下文中一共展示了List.ToArray方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: ZlibDecompressor
public ZlibDecompressor (GLib.ZlibCompressorFormat format) : base (IntPtr.Zero)
{
if (GetType () != typeof (ZlibDecompressor)) {
var vals = new List<GLib.Value> ();
var names = new List<string> ();
names.Add ("format");
vals.Add (new GLib.Value (format));
CreateNativeObject (names.ToArray (), vals.ToArray ());
return;
}
Raw = g_zlib_decompressor_new((int) format);
}
示例2: ThreadedSocketService
public ThreadedSocketService (int max_threads) : base (IntPtr.Zero)
{
if (GetType () != typeof (ThreadedSocketService)) {
var vals = new List<GLib.Value> ();
var names = new List<string> ();
names.Add ("max_threads");
vals.Add (new GLib.Value (max_threads));
CreateNativeObject (names.ToArray (), vals.ToArray ());
return;
}
Raw = g_threaded_socket_service_new(max_threads);
}
示例3: InetAddress
public InetAddress (GLib.SocketFamily family) : base (IntPtr.Zero)
{
if (GetType () != typeof (InetAddress)) {
var vals = new List<GLib.Value> ();
var names = new List<string> ();
names.Add ("family");
vals.Add (new GLib.Value (family));
CreateNativeObject (names.ToArray (), vals.ToArray ());
return;
}
Raw = g_inet_address_new_any((int) family);
}
示例4: SimplePermission
public SimplePermission (bool allowed) : base (IntPtr.Zero)
{
if (GetType () != typeof (SimplePermission)) {
var vals = new List<GLib.Value> ();
var names = new List<string> ();
names.Add ("allowed");
vals.Add (new GLib.Value (allowed));
CreateNativeObject (names.ToArray (), vals.ToArray ());
return;
}
Raw = g_simple_permission_new(allowed);
}
示例5: UnixCredentialsMessage
public UnixCredentialsMessage (GLib.Credentials credentials) : base (IntPtr.Zero)
{
if (GetType () != typeof (UnixCredentialsMessage)) {
var vals = new List<GLib.Value> ();
var names = new List<string> ();
if (credentials != null) {
names.Add ("credentials");
vals.Add (new GLib.Value (credentials));
}
CreateNativeObject (names.ToArray (), vals.ToArray ());
return;
}
Raw = g_unix_credentials_message_new_with_credentials(credentials == null ? IntPtr.Zero : credentials.Handle);
}
示例6: Emblem
public Emblem (GLib.IIcon icon) : base (IntPtr.Zero)
{
if (GetType () != typeof (Emblem)) {
var vals = new List<GLib.Value> ();
var names = new List<string> ();
if (icon != null) {
names.Add ("icon");
vals.Add (new GLib.Value (icon));
}
CreateNativeObject (names.ToArray (), vals.ToArray ());
return;
}
Raw = g_emblem_new(icon == null ? IntPtr.Zero : ((icon is GLib.Object) ? (icon as GLib.Object).Handle : (icon as GLib.IconAdapter).Handle));
}
示例7: UnixFDMessage
public UnixFDMessage (GLib.UnixFDList fd_list) : base (IntPtr.Zero)
{
if (GetType () != typeof (UnixFDMessage)) {
var vals = new List<GLib.Value> ();
var names = new List<string> ();
if (fd_list != null) {
names.Add ("fd_list");
vals.Add (new GLib.Value (fd_list));
}
CreateNativeObject (names.ToArray (), vals.ToArray ());
return;
}
Raw = g_unix_fd_message_new_with_fd_list(fd_list == null ? IntPtr.Zero : fd_list.Handle);
}
示例8: FileIcon
public FileIcon (GLib.IFile file) : base (IntPtr.Zero)
{
if (GetType () != typeof (FileIcon)) {
var vals = new List<GLib.Value> ();
var names = new List<string> ();
if (file != null) {
names.Add ("file");
vals.Add (new GLib.Value (file));
}
CreateNativeObject (names.ToArray (), vals.ToArray ());
return;
}
Raw = g_file_icon_new(file == null ? IntPtr.Zero : ((file is GLib.Object) ? (file as GLib.Object).Handle : (file as GLib.FileAdapter).Handle));
}
示例9: Settings
public Settings (string schema) : base (IntPtr.Zero)
{
if (GetType () != typeof (Settings)) {
var vals = new List<GLib.Value> ();
var names = new List<string> ();
names.Add ("schema");
vals.Add (new GLib.Value (schema));
CreateNativeObject (names.ToArray (), vals.ToArray ());
return;
}
IntPtr native_schema = GLib.Marshaller.StringToPtrGStrdup (schema);
Raw = g_settings_new(native_schema);
GLib.Marshaller.Free (native_schema);
}
示例10: BufferedOutputStream
public BufferedOutputStream (GLib.OutputStream base_stream) : base (IntPtr.Zero)
{
if (GetType () != typeof (BufferedOutputStream)) {
var vals = new List<GLib.Value> ();
var names = new List<string> ();
if (base_stream != null) {
names.Add ("base_stream");
vals.Add (new GLib.Value (base_stream));
}
CreateNativeObject (names.ToArray (), vals.ToArray ());
return;
}
Raw = g_buffered_output_stream_new(base_stream == null ? IntPtr.Zero : base_stream.Handle);
}
示例11: UnixSocketAddress
public UnixSocketAddress (string path) : base (IntPtr.Zero)
{
if (GetType () != typeof (UnixSocketAddress)) {
var vals = new List<GLib.Value> ();
var names = new List<string> ();
names.Add ("path");
vals.Add (new GLib.Value (path));
CreateNativeObject (names.ToArray (), vals.ToArray ());
return;
}
IntPtr native_path = GLib.Marshaller.StringToPtrGStrdup (path);
Raw = g_unix_socket_address_new(native_path);
GLib.Marshaller.Free (native_path);
}
示例12: Application
public Application (string application_id, GLib.ApplicationFlags flags) : base (IntPtr.Zero)
{
if (GetType () != typeof (Application)) {
var vals = new List<GLib.Value> ();
var names = new List<string> ();
names.Add ("application_id");
vals.Add (new GLib.Value (application_id));
names.Add ("flags");
vals.Add (new GLib.Value (flags));
CreateNativeObject (names.ToArray (), vals.ToArray ());
return;
}
IntPtr native_application_id = GLib.Marshaller.StringToPtrGStrdup (application_id);
Raw = g_application_new(native_application_id, (int) flags);
GLib.Marshaller.Free (native_application_id);
}
示例13: NetworkAddress
public NetworkAddress (string hostname, ushort port) : base (IntPtr.Zero)
{
if (GetType () != typeof (NetworkAddress)) {
var vals = new List<GLib.Value> ();
var names = new List<string> ();
names.Add ("hostname");
vals.Add (new GLib.Value (hostname));
names.Add ("port");
vals.Add (new GLib.Value (port));
CreateNativeObject (names.ToArray (), vals.ToArray ());
return;
}
IntPtr native_hostname = GLib.Marshaller.StringToPtrGStrdup (hostname);
Raw = g_network_address_new(native_hostname, port);
GLib.Marshaller.Free (native_hostname);
}
示例14: SimpleAction
public SimpleAction (string name, GLib.VariantType parameter_type) : base (IntPtr.Zero)
{
if (GetType () != typeof (SimpleAction)) {
var vals = new List<GLib.Value> ();
var names = new List<string> ();
names.Add ("name");
vals.Add (new GLib.Value (name));
names.Add ("parameter_type");
vals.Add (new GLib.Value (parameter_type));
CreateNativeObject (names.ToArray (), vals.ToArray ());
return;
}
IntPtr native_name = GLib.Marshaller.StringToPtrGStrdup (name);
Raw = g_simple_action_new(native_name, parameter_type == null ? IntPtr.Zero : parameter_type.Handle);
GLib.Marshaller.Free (native_name);
}
示例15: InetSocketAddress
public InetSocketAddress (GLib.InetAddress address, ushort port) : base (IntPtr.Zero)
{
if (GetType () != typeof (InetSocketAddress)) {
var vals = new List<GLib.Value> ();
var names = new List<string> ();
if (address != null) {
names.Add ("address");
vals.Add (new GLib.Value (address));
}
names.Add ("port");
vals.Add (new GLib.Value (port));
CreateNativeObject (names.ToArray (), vals.ToArray ());
return;
}
Raw = g_inet_socket_address_new(address == null ? IntPtr.Zero : address.Handle, port);
}