コード例 #1
0
ファイル: DictionaryInfo.cs プロジェクト: OpenTaal/enchant
		internal DictionaryInfo(string language_tag, ProviderInfo provider_info)
		{
			if (language_tag == null)
			{
				throw new ArgumentNullException("language_tag");
			}
			if (provider_info == null)
			{
				throw new ArgumentNullException("provider_info");
			}
			_language_tag = language_tag;
			_provider_info = provider_info;
		}
コード例 #2
0
ファイル: Bindings.cs プロジェクト: Thor1Khan/enchant
        public static void enchant_broker_describe(SafeBrokerHandle broker,
																							 EnchantBrokerDescribeDelegate describe)
        {
            enchant_broker_describe(broker,
                                                            delegate(IntPtr provider_name,
                                                                             IntPtr provider_desc,
                                                                             IntPtr provider_dll_file,
                                                                             IntPtr user_data)
                                                                {
                                                                    ProviderInfo provider =
                                                                        new ProviderInfo(
                                                                            Utf8Marshaller.MarshalFromUtf8(provider_name),
                                                                            Utf8Marshaller.MarshalFromUtf8(provider_desc),
                                                                            Utf8Marshaller.MarshalFromUtf8(
                                                                                provider_dll_file));
                                                                    describe(provider);
                                                                },
                                                            IntPtr.Zero);
        }
コード例 #3
0
ファイル: Bindings.cs プロジェクト: Thor1Khan/enchant
        public static void enchant_dict_describe(SafeDictionaryHandle dict,
																						 EnchantDictDescribeDelegate describe)
        {
            enchant_dict_describe(dict,
                                                        delegate(IntPtr lang_tag,
                                                                         IntPtr provider_name,
                                                                         IntPtr provider_desc,
                                                                         IntPtr provider_dll_file,
                                                                         IntPtr user_data)
                                                            {
                                                                ProviderInfo provider =
                                                                    new ProviderInfo(
                                                                        Utf8Marshaller.MarshalFromUtf8(provider_name),
                                                                        Utf8Marshaller.MarshalFromUtf8(provider_desc),
                                                                        Utf8Marshaller.MarshalFromUtf8(provider_dll_file));
                                                                DictionaryInfo dictionary =
                                                                    new DictionaryInfo(
                                                                        Utf8Marshaller.MarshalFromUtf8(lang_tag),
                                                                        provider);
                                                                describe(dictionary);
                                                            },
                                                        IntPtr.Zero);
        }