コード例 #1
0
        public void StubParcelable(Parcelable type)
        {
            string csNS = name_cache.GetCSharpNamespace(type.Name);

            if (csNS.Length > 0)
            {
                w.WriteLine("namespace {0} {{", csNS);
            }
            string name = type.Name.Identifiers.Last();

            w.WriteLine(@"
	public class {0} : global::Java.Lang.Object, global::Android.OS.IParcelable
	{{
		public static global::Android.OS.IParcelableCreator Creator; // FIXME: implement

		public virtual int DescribeContents ()
		{{
			throw new NotImplementedException ();
		}}

		// LAMESPEC: Android IParcelable interface is bogus by design. It does not expose
		// this method, while aidl tool explicitly expects this method and generates such
		// code that invokes it(!)
		// Seealso: http://code.google.com/p/android/issues/detail?id=21777
		public virtual void ReadFromParcel (global::Android.OS.Parcel parcel)
		{{
			throw new NotImplementedException ();
		}}

		public virtual void WriteToParcel (global::Android.OS.Parcel parcel, global::Android.OS.ParcelableWriteFlags flags)
		{{
			throw new NotImplementedException ();
		}}
	}}"    , name);
            if (csNS.Length > 0)
            {
                w.WriteLine("}");
            }
        }
コード例 #2
0
        public void StubParcelable(Parcelable type)
        {
            string csNS = name_cache.GetCSharpNamespace (type.Name);
            if (csNS.Length > 0)
                w.WriteLine ("namespace {0} {{", csNS);
            string name = type.Name.Identifiers.Last ();
            w.WriteLine (@"
            public class {0} : global::Java.Lang.Object, global::Android.OS.IParcelable
            {{
            public static global::Android.OS.IParcelableCreator Creator; // FIXME: implement

            public virtual int DescribeContents ()
            {{
            throw new NotImplementedException ();
            }}

            // LAMESPEC: Android IParcelable interface is bogus by design. It does not expose
            // this method, while aidl tool explicitly expects this method and generates such
            // code that invokes it(!)
            // Seealso: http://code.google.com/p/android/issues/detail?id=21777
            public virtual void ReadFromParcel (global::Android.OS.Parcel parcel)
            {{
            throw new NotImplementedException ();
            }}

            public virtual void WriteToParcel (global::Android.OS.Parcel parcel, global::Android.OS.ParcelableWriteFlags flags)
            {{
            throw new NotImplementedException ();
            }}
            }}", name);
            if (csNS.Length > 0)
                w.WriteLine ("}");
        }