当前位置: 首页>>代码示例>>C#>>正文


C# List.Add方法代码示例

本文整理汇总了C#中GLib.List.Add方法的典型用法代码示例。如果您正苦于以下问题:C# List.Add方法的具体用法?C# List.Add怎么用?C# List.Add使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在GLib.List的用法示例。


在下文中一共展示了List.Add方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: InetAddress

		public InetAddress (byte[] bytes, GLib.SocketFamily family) : base (IntPtr.Zero)
		{
			if (GetType () != typeof (InetAddress)) {
				var vals = new List<GLib.Value> ();
				var names = new List<string> ();
				names.Add ("bytes");
				vals.Add (new GLib.Value (bytes));
				names.Add ("family");
				vals.Add (new GLib.Value (family));
				CreateNativeObject (names.ToArray (), vals.ToArray ());
				return;
			}
			Raw = g_inet_address_new_from_bytes(bytes, (int) family);
		}
开发者ID:akrisiun,项目名称:gtk-sharp,代码行数:14,代码来源:InetAddress.cs

示例2: ZlibCompressor

		public ZlibCompressor (GLib.ZlibCompressorFormat format, int level) : base (IntPtr.Zero)
		{
			if (GetType () != typeof (ZlibCompressor)) {
				var vals = new List<GLib.Value> ();
				var names = new List<string> ();
				names.Add ("format");
				vals.Add (new GLib.Value (format));
				names.Add ("level");
				vals.Add (new GLib.Value (level));
				CreateNativeObject (names.ToArray (), vals.ToArray ());
				return;
			}
			Raw = g_zlib_compressor_new((int) format, level);
		}
开发者ID:akrisiun,项目名称:gtk-sharp,代码行数:14,代码来源:ZlibCompressor.cs

示例3: 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);
		}
开发者ID:akrisiun,项目名称:gtk-sharp,代码行数:16,代码来源:Application.cs

示例4: Emblem

		public Emblem (GLib.IIcon icon, GLib.EmblemOrigin origin) : 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));
				}
				names.Add ("origin");
				vals.Add (new GLib.Value (origin));
				CreateNativeObject (names.ToArray (), vals.ToArray ());
				return;
			}
			Raw = g_emblem_new_with_origin(icon == null ? IntPtr.Zero : ((icon is GLib.Object) ? (icon as GLib.Object).Handle : (icon as GLib.IconAdapter).Handle), (int) origin);
		}
开发者ID:akrisiun,项目名称:gtk-sharp,代码行数:16,代码来源:Emblem.cs

示例5: 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);
		}
开发者ID:akrisiun,项目名称:gtk-sharp,代码行数:16,代码来源:SimpleAction.cs

示例6: 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);
		}
开发者ID:akrisiun,项目名称:gtk-sharp,代码行数:16,代码来源:NetworkAddress.cs

示例7: ListStoreMapping

 public ListStoreMapping()
 {
     store_types = new List<GType>();
     callbacks = new List<GetStoreValueCallback>();
     store_types.Add((GType)typeof(DataRow));
     ColumnsStore = new NodeStore(typeof(ConfigurableColumn));
 }
开发者ID:langpavel,项目名称:LPS-old,代码行数:7,代码来源:ListStoreMapping.cs

示例8: 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);
		}
开发者ID:akrisiun,项目名称:gtk-sharp,代码行数:16,代码来源:InetSocketAddress.cs

示例9: TcpWrapperConnection

		public TcpWrapperConnection (GLib.IOStream base_io_stream, GLib.Socket socket) : base (IntPtr.Zero)
		{
			if (GetType () != typeof (TcpWrapperConnection)) {
				var vals = new List<GLib.Value> ();
				var names = new List<string> ();
				if (base_io_stream != null) {
					names.Add ("base_io_stream");
					vals.Add (new GLib.Value (base_io_stream));
				}
				if (socket != null) {
					names.Add ("socket");
					vals.Add (new GLib.Value (socket));
				}
				CreateNativeObject (names.ToArray (), vals.ToArray ());
				return;
			}
			Raw = g_tcp_wrapper_connection_new(base_io_stream == null ? IntPtr.Zero : base_io_stream.Handle, socket == null ? IntPtr.Zero : socket.Handle);
		}
开发者ID:akrisiun,项目名称:gtk-sharp,代码行数:18,代码来源:TcpWrapperConnection.cs

示例10: Settings

		public Settings (string schema, GLib.SettingsBackend backend) : 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));
				if (backend != null) {
					names.Add ("backend");
					vals.Add (new GLib.Value (backend));
				}
				CreateNativeObject (names.ToArray (), vals.ToArray ());
				return;
			}
			IntPtr native_schema = GLib.Marshaller.StringToPtrGStrdup (schema);
			Raw = g_settings_new_with_backend(native_schema, backend == null ? IntPtr.Zero : backend.Handle);
			GLib.Marshaller.Free (native_schema);
		}
开发者ID:akrisiun,项目名称:gtk-sharp,代码行数:18,代码来源:Settings.cs

示例11: ConverterOutputStream

		public ConverterOutputStream (GLib.OutputStream base_stream, GLib.IConverter converter) : base (IntPtr.Zero)
		{
			if (GetType () != typeof (ConverterOutputStream)) {
				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));
				}
				if (converter != null) {
					names.Add ("converter");
					vals.Add (new GLib.Value (converter));
				}
				CreateNativeObject (names.ToArray (), vals.ToArray ());
				return;
			}
			Raw = g_converter_output_stream_new(base_stream == null ? IntPtr.Zero : base_stream.Handle, converter == null ? IntPtr.Zero : ((converter is GLib.Object) ? (converter as GLib.Object).Handle : (converter as GLib.ConverterAdapter).Handle));
		}
开发者ID:akrisiun,项目名称:gtk-sharp,代码行数:18,代码来源:ConverterOutputStream.cs

示例12: MemoryOutputStream

		public MemoryOutputStream (IntPtr data, ulong size, GLib.ReallocFunc realloc_function, GLib.DestroyNotify destroy_function) : base (IntPtr.Zero)
		{
			if (GetType () != typeof (MemoryOutputStream)) {
				var vals = new List<GLib.Value> ();
				var names = new List<string> ();
				names.Add ("data");
				vals.Add (new GLib.Value (data));
				names.Add ("size");
				vals.Add (new GLib.Value (size));
				names.Add ("realloc_function");
				vals.Add (new GLib.Value (realloc_function));
				names.Add ("destroy_function");
				vals.Add (new GLib.Value (destroy_function));
				CreateNativeObject (names.ToArray (), vals.ToArray ());
				return;
			}
			GLibSharp.ReallocFuncWrapper realloc_function_wrapper = new GLibSharp.ReallocFuncWrapper (realloc_function);
			Raw = g_memory_output_stream_new(data, new UIntPtr (size), realloc_function_wrapper.NativeDelegate, destroy_function);
		}
开发者ID:akrisiun,项目名称:gtk-sharp,代码行数:19,代码来源:MemoryOutputStream.cs

示例13: 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);
		}
开发者ID:akrisiun,项目名称:gtk-sharp,代码行数:12,代码来源:ThreadedSocketService.cs

示例14: 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);
		}
开发者ID:akrisiun,项目名称:gtk-sharp,代码行数:12,代码来源:SimplePermission.cs

示例15: NetworkService

		public NetworkService (string service, string protocol, string domain) : base (IntPtr.Zero)
		{
			if (GetType () != typeof (NetworkService)) {
				var vals = new List<GLib.Value> ();
				var names = new List<string> ();
				names.Add ("service");
				vals.Add (new GLib.Value (service));
				names.Add ("protocol");
				vals.Add (new GLib.Value (protocol));
				names.Add ("domain");
				vals.Add (new GLib.Value (domain));
				CreateNativeObject (names.ToArray (), vals.ToArray ());
				return;
			}
			IntPtr native_service = GLib.Marshaller.StringToPtrGStrdup (service);
			IntPtr native_protocol = GLib.Marshaller.StringToPtrGStrdup (protocol);
			IntPtr native_domain = GLib.Marshaller.StringToPtrGStrdup (domain);
			Raw = g_network_service_new(native_service, native_protocol, native_domain);
			GLib.Marshaller.Free (native_service);
			GLib.Marshaller.Free (native_protocol);
			GLib.Marshaller.Free (native_domain);
		}
开发者ID:akrisiun,项目名称:gtk-sharp,代码行数:22,代码来源:NetworkService.cs


注:本文中的GLib.List.Add方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。