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


C# Parcel.ReadInt方法代码示例

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


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

示例1: cls_Libro

			Java.Lang.Object IParcelableCreator.CreateFromParcel(Parcel source)
			{
				int id = source.ReadInt ();
				string nombre = source.ReadString();
				string autor = source.ReadString();
				int total_pag = source.ReadInt ();
				string descripcion = source.ReadString();
				return new cls_Libro(id,nombre,autor,total_pag,descripcion);
			}
开发者ID:DiLRandI,项目名称:Xamarin.android,代码行数:9,代码来源:cls_Libro.cs

示例2: Player

		protected Player (Parcel inObj)
		{
			FirstName = inObj.ReadString ();
			LastInitial = inObj.ReadString ();
			// TODO: something strange
			Avatar = (Avatar)Enum.GetValues (typeof(Avatar)).GetValue (inObj.ReadInt ());
		}
开发者ID:Appercode,项目名称:monodroid-samples,代码行数:7,代码来源:Player.cs

示例3: CardToken

 public CardToken(Parcel parcel)
 {
     CardLastFour = parcel.ReadString();
     ExpiryDate = parcel.ReadString();
     Token = parcel.ReadString();
     CardType = (CardBase.CardType)parcel.ReadInt();
     ConsumerToken = parcel.ReadString();
 }
开发者ID:TheJaniceTong,项目名称:Judo-Xamarin,代码行数:8,代码来源:CardToken.cs

示例4: MetaData

 public MetaData(Parcel inParcel)
 {
     //There is a string in the parcel
     if (inParcel.ReadInt() > 0)
     {
         Metadata = JsonConvert.DeserializeObject<Dictionary<string, string>>(inParcel.ReadString());
     }
 }
开发者ID:TheJaniceTong,项目名称:Judo-Xamarin,代码行数:8,代码来源:MetaData.cs

示例5: ObservableListSavedState

		/**
		 * Called by CREATOR.
		 */
		private ObservableListSavedState(Parcel input)
			: base(input)
		{

			PrevFirstVisiblePosition = input.ReadInt();
			PrevFirstVisibleChildHeight = input.ReadInt();
			PrevScrolledChildrenHeight = input.ReadInt();
			PrevScrollY = input.ReadInt();
			ScrollY = input.ReadInt();
			ChildrenHeights = new SparseIntArray();
			int numOfChildren = input.ReadInt();
			if (0 < numOfChildren)
			{
				for (int i = 0; i < numOfChildren; i++)
				{
					int key = input.ReadInt();
					int value = input.ReadInt();
					ChildrenHeights.Put(key, value);
				}
			}
		}
开发者ID:Julien-Mialon,项目名称:MaterialViewPager.Xamarin,代码行数:24,代码来源:ObservableListSavedState.cs

示例6: SavedState

 public SavedState(Parcel parcel)
     : base(parcel)
 {
     Item = parcel.ReadInt();
 }
开发者ID:kobynet,项目名称:SlidingMenuSharp,代码行数:5,代码来源:SlidingMenu.cs

示例7: Category

		protected Category(Parcel inObj) {
			name = inObj.ReadString();
			id = inObj.ReadString();
			theme = (Theme)(System.Enum.GetValues(typeof(Theme)).GetValue(inObj.ReadInt()));
			quizzes = new List<Quiz>();
			inObj.ReadTypedList(quizzes, Quiz.InitializeCreator());
			scores = inObj.CreateIntArray();
			solved = ParcelableHelper.ReadBoolean(inObj);
		}
开发者ID:raulma,项目名称:monodroid-samples,代码行数:9,代码来源:Category.cs

示例8: SavedState

            private SavedState(Parcel pin)

                : base(pin)
            {

                currentPage = pin.ReadInt();
            }
开发者ID:skywolf888,项目名称:ViewPagerIndicator.Net,代码行数:7,代码来源:UnderlinePageIndicator.cs

示例9: SavedState

			public SavedState(Parcel source) : base(source) {
				currentColor = source.ReadInt(); 
			}
开发者ID:jeedey93,项目名称:xamarin-android-samples,代码行数:3,代码来源:ColorPickerPreference.cs

示例10: SavedState

            private SavedState(Parcel pin)
                : base(pin)
            {

                mItem = pin.ReadInt();
            }
开发者ID:skywolf888,项目名称:SlidingMenu.Net,代码行数:6,代码来源:SlidingMenu.cs

示例11: Item

 public Item(Parcel parcel)
 {
     Name = parcel.ReadString ();
     Count = parcel.ReadInt ();
 }
开发者ID:dylansturg,项目名称:XamarinUniversitySamples,代码行数:5,代码来源:Item.cs

示例12: PagerSlidingTabStripState

			public PagerSlidingTabStripState(Parcel source)
				: base(source)
			{
				CurrentPosition = source.ReadInt();
			}
开发者ID:slewis74,项目名称:PagerSlidingTabStrip.Net,代码行数:5,代码来源:PagerSlidingTabStrip.cs

示例13: SavedState

 public SavedState(Parcel parcel)
     : base(parcel)
 {
     try
     {
         State = (SlideState) parcel.ReadInt();
     }
     catch
     {
         State = SlideState.Collapsed;
     }
 }
开发者ID:maxgrig,项目名称:SlidingUpPanel,代码行数:12,代码来源:SlidingUpPanelLayout.cs

示例14: SavedState

			private SavedState(Parcel source)
				: base(source)
			{
				CurrentPosition = source.ReadInt();
			}
开发者ID:hugoterelle,项目名称:PagerSlidingTabStrip.Net,代码行数:5,代码来源:PagerSlidingTabStrip.cs

示例15: 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


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