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


C# Parcel.WriteString方法代码示例

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


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

示例1: WriteToParcel

 /// <summary>
 /// IParcelable member
 /// </summary>
 /// <param name="dest"></param>
 /// <param name="flags"></param>
 public void WriteToParcel(Parcel dest, [GeneratedEnum] ParcelableWriteFlags flags)
 {
     dest.WriteString(this.DateOfIssue.ToString());
     dest.WriteString(this.Id.ToString());
     dest.WriteString(this.AdditionalInfo);
     dest.WriteString(this.PhoneNumber);
 }
开发者ID:cirk0r,项目名称:PW,代码行数:12,代码来源:ReminderModel.cs

示例2: WriteToParcel

		public void WriteToParcel (Parcel dest, ParcelableWriteFlags flags)
		{
			dest.WriteInt(this.Id_libro);
			dest.WriteString(this.Nombre);
			dest.WriteString(this.Autor);
			dest.WriteInt(this.Total_pag);
			dest.WriteString(this.Descripcion);
		}
开发者ID:DiLRandI,项目名称:Xamarin.android,代码行数:8,代码来源:cls_Libro.cs

示例3: WriteToParcel

		public void WriteToParcel (Parcel dest, ParcelableWriteFlags flags)
		{
			dest.WriteDouble (_User.Height);
			dest.WriteDouble (_User.Weight);
			dest.WriteDouble (_User.CigPerDay);
			dest.WriteDouble (_User.HrsSleep);
			dest.WriteString (_User.Sex.ToString ());
			dest.WriteString (_User.BirthDate.ToString ());
		}
开发者ID:aragorn55,项目名称:ClassSampleCode,代码行数:9,代码来源:CPersonPassable.cs

示例4: WriteToParcel

     public void WriteToParcel(Parcel dest, ParcelableWriteFlags flags)
     {
         if (Metadata != null)
         {
             var metaDataString = JsonConvert.SerializeObject(Metadata);
 
             dest.WriteInt(metaDataString.Length);
             dest.WriteString(metaDataString);
         }
         else
         {
             dest.WriteInt(0);
         }
         
     }
开发者ID:TheJaniceTong,项目名称:Judo-Xamarin,代码行数:15,代码来源:MetaData.cs

示例5: OnTransact

		protected override bool OnTransact(int code, Parcel data, Parcel reply, int flags)
		{
			switch (code)
			{
				case Binder.InterfaceConsts.InterfaceTransaction:
					{
						reply.WriteString(DESCRIPTOR);
						return true;
					}
				case TRANSACTION_checkBilling:
					{
						data.EnforceInterface(DESCRIPTOR);
						Bundle _arg0;
						_arg0 = data.ReadBundle();
						this.SendBillingRequest(_arg0);
						return true;
					}
			}

			return base.OnTransact(code, data, reply, flags);
		}
开发者ID:ddebilt,项目名称:play.billing,代码行数:21,代码来源:IMarketBillingService.cs

示例6: OnTransact

        /// <summary>
        /// The on transact.
        /// </summary>
        /// <param name="code">
        /// The code.
        /// </param>
        /// <param name="data">
        /// The data.
        /// </param>
        /// <param name="reply">
        /// The reply.
        /// </param>
        /// <param name="flags">
        /// The flags.
        /// </param>
        /// <returns>
        /// The on transact.
        /// </returns>
        protected override bool OnTransact(int code, Parcel data, Parcel reply, int flags)
        {
            var handled = false;

            switch (code)
            {
                case BinderConsts.InterfaceTransaction:
                    reply.WriteString(Descriptor);
                    handled = true;
                    break;

                case TransactionVerifyLicense:
                    data.EnforceInterface(Descriptor);
                    var responseCode = data.ReadInt();
                    var signedData = data.ReadString();
                    var signature = data.ReadString();
                    this.VerifyLicense((ServerResponseCode)responseCode, signedData, signature);
                    handled = true;
                    break;
            }

            return handled || base.OnTransact(code, data, reply, flags);
        }
开发者ID:Anomalous-Software,项目名称:Android.Play.ExpansionLibrary,代码行数:41,代码来源:LicenseResultListenerStub.cs

示例7: WriteToParcel

		public void WriteToParcel (Parcel dest, ParcelableWriteFlags flags)
		{
			dest.WriteString (FirstName);
			dest.WriteString (LastInitial);
			dest.WriteInt (Avatar.Ordinal ());
		}
开发者ID:Appercode,项目名称:monodroid-samples,代码行数:6,代码来源:Player.cs

示例8: WriteToParcel

 public void WriteToParcel(Parcel dest, ParcelableWriteFlags flags)
 {
     dest.WriteString(Artist);
     dest.WriteString(Title);
     dest.WriteString(URL);
 }
开发者ID:Sanych6666,项目名称:MusicFromVK,代码行数:6,代码来源:AudioFile.cs

示例9: WriteToParcel

		public void WriteToParcel (Parcel dest, ParcelableWriteFlags flags)
		{
			dest.WriteString(name);
			dest.WriteString(id);
			dest.WriteInt(Theme.Ordinal());
			dest.WriteTypedList(Quizzes);
			dest.WriteIntArray(scores);
			ParcelableHelper.WriteBoolean(dest, solved);
		}
开发者ID:raulma,项目名称:monodroid-samples,代码行数:9,代码来源:Category.cs

示例10: WriteToParcel

 public void WriteToParcel(Parcel dest, ParcelableWriteFlags flags)
 {
     dest.WriteString (Name);
     dest.WriteInt (Count);
 }
开发者ID:dylansturg,项目名称:XamarinUniversitySamples,代码行数:5,代码来源:Item.cs

示例11: WriteToParcel

 public void WriteToParcel(Parcel dest, ParcelableWriteFlags flags)
 {
     dest.WriteString(CardLastFour);
     dest.WriteString(ExpiryDate);
     dest.WriteString(Token);
     dest.WriteInt((int)CardType);
     dest.WriteString(ConsumerToken);
 }
开发者ID:TheJaniceTong,项目名称:Judo-Xamarin,代码行数:8,代码来源:CardToken.cs

示例12: WriteToParcel

 public void WriteToParcel(Parcel dest, ParcelableWriteFlags flags)
 {
     var receiptType = receipt.GetType();
     dest.WriteString(JsonConvert.SerializeObject(receiptType));
     dest.WriteString(JsonConvert.SerializeObject(receipt));
 }
开发者ID:TheJaniceTong,项目名称:Judo-Xamarin,代码行数:6,代码来源:Receipt.cs

示例13: OnTransact

        protected override bool OnTransact(int code, Parcel data, Parcel reply, int flags)
        {
            int num3;
            string str3;
            string str4;
            switch (code)
            {
                case 1:
                {
                    data.EnforceInterface("com.android.vending.billing.IInAppBillingService");
                    int apiVersion = 0;
                    apiVersion = data.ReadInt();
                    string packageName = null;
                    packageName = data.ReadString();
                    string type = null;
                    type = data.ReadString();
                    int num2 = this.IsBillingSupported(apiVersion, packageName, type);
                    reply.WriteNoException();
                    reply.WriteInt(num2);
                    data.WriteInt(apiVersion);
                    data.WriteString(packageName);
                    data.WriteString(type);
                    return true;
                }
                case 2:
                {
                    data.EnforceInterface("com.android.vending.billing.IInAppBillingService");
                    num3 = 0;
                    num3 = data.ReadInt();
                    str3 = null;
                    str3 = data.ReadString();
                    str4 = null;
                    str4 = data.ReadString();
                    Bundle skusBundle = null;
                    skusBundle = (data.ReadInt() == 0) ? null : ((Bundle) Bundle.Creator.CreateFromParcel(data));
                    Bundle bundle2 = this.GetSkuDetails(num3, str3, str4, skusBundle);
                    reply.WriteNoException();
                    if (bundle2 == null)
                    {
                        reply.WriteInt(0);
                        break;
                    }
                    reply.WriteInt(1);
                    bundle2.WriteToParcel(reply, ParcelableWriteFlags.ReturnValue);
                    break;
                }
                case 3:
                {
                    data.EnforceInterface("com.android.vending.billing.IInAppBillingService");
                    int num4 = 0;
                    num4 = data.ReadInt();
                    string str5 = null;
                    str5 = data.ReadString();
                    string sku = null;
                    sku = data.ReadString();
                    string str7 = null;
                    str7 = data.ReadString();
                    string developerPayload = null;
                    developerPayload = data.ReadString();
                    Bundle bundle3 = this.GetBuyIntent(num4, str5, sku, str7, developerPayload);
                    reply.WriteNoException();
                    if (bundle3 == null)
                    {
                        reply.WriteInt(0);
                    }
                    else
                    {
                        reply.WriteInt(1);
                        bundle3.WriteToParcel(reply, ParcelableWriteFlags.ReturnValue);
                    }
                    data.WriteInt(num4);
                    data.WriteString(str5);
                    data.WriteString(sku);
                    data.WriteString(str7);
                    data.WriteString(developerPayload);
                    return true;
                }
                case 4:
                {
                    data.EnforceInterface("com.android.vending.billing.IInAppBillingService");
                    int num5 = 0;
                    num5 = data.ReadInt();
                    string str9 = null;
                    str9 = data.ReadString();
                    string str10 = null;
                    str10 = data.ReadString();
                    string continuationToken = null;
                    continuationToken = data.ReadString();
                    Bundle bundle4 = this.GetPurchases(num5, str9, str10, continuationToken);
                    reply.WriteNoException();
                    if (bundle4 == null)
                    {
                        reply.WriteInt(0);
                    }
                    else
                    {
                        reply.WriteInt(1);
                        bundle4.WriteToParcel(reply, ParcelableWriteFlags.ReturnValue);
                    }
                    data.WriteInt(num5);
//.........这里部分代码省略.........
开发者ID:hamishebahar,项目名称:Xamarin.InAppBilling,代码行数:101,代码来源:IInAppBillingServiceStub.cs

示例14: WriteToParcel

		public void WriteToParcel (Parcel dest, ParcelableWriteFlags flags)
		{
			Console.WriteLine ("MyParcelable.WriteToParcel");
			dest.WriteString (Value);
		}
开发者ID:89sos98,项目名称:monodroid-samples,代码行数:5,代码来源:MainActivity.cs

示例15: OnTransact

        /// <summary>
        /// The on transact.
        /// </summary>
        /// <param name="code">
        /// The code.
        /// </param>
        /// <param name="data">
        /// The data.
        /// </param>
        /// <param name="reply">
        /// The reply.
        /// </param>
        /// <param name="flags">
        /// The flags.
        /// </param>
        /// <returns>
        /// The on transact.
        /// </returns>
        protected override bool OnTransact(int code, Parcel data, Parcel reply, int flags)
        {
            bool handled = false;

            switch (code)
            {
                case BinderConsts.InterfaceTransaction:
                    reply.WriteString(Descriptor);
                    handled = true;
                    break;
                case TransactionCheckLicense:
                    data.EnforceInterface(Descriptor);
                    var nonce = data.ReadLong();
                    var packageName = data.ReadString();
                    var resultListener = LicenseResultListenerStub.AsInterface(data.ReadStrongBinder());

                    this.CheckLicense(nonce, packageName, resultListener);
                    handled = true;
                    break;
            }

            return handled || base.OnTransact(code, data, reply, flags);
        }
开发者ID:Anomalous-Software,项目名称:Android.Play.ExpansionLibrary,代码行数:41,代码来源:LicensingServiceStub.cs


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