Esempio n. 1
0
 public virtual void VisitMarshalSpec(MarshalDesc marshalSpec)
 {
 }
Esempio n. 2
0
        public MarshalSig GetMarshalSig(MarshalDesc mSpec)
        {
            MarshalSig ms = new MarshalSig (mSpec.NativeIntrinsic);

            if (mSpec is ArrayMarshalDesc) {
                ArrayMarshalDesc amd = mSpec as ArrayMarshalDesc;
                MarshalSig.Array ar = new MarshalSig.Array ();
                ar.ArrayElemType = amd.ElemType;
                ar.NumElem = amd.NumElem;
                ar.ParamNum = amd.ParamNum;
                ar.ElemMult = amd.ElemMult;
                ms.Spec = ar;
            } else if (mSpec is CustomMarshalerDesc) {
                CustomMarshalerDesc cmd = mSpec as CustomMarshalerDesc;
                MarshalSig.CustomMarshaler cm = new MarshalSig.CustomMarshaler ();
                cm.Guid = cmd.Guid.ToString ();
                cm.UnmanagedType = cmd.UnmanagedType;
                cm.ManagedType = cmd.ManagedType;
                cm.Cookie = cmd.Cookie;
                ms.Spec = cm;
            } else if (mSpec is FixedArrayDesc) {
                FixedArrayDesc fad = mSpec as FixedArrayDesc;
                MarshalSig.FixedArray fa = new MarshalSig.FixedArray ();
                fa.ArrayElemType  = fad.ElemType;
                fa.NumElem = fad.NumElem;
                ms.Spec = fa;
            } else if (mSpec is FixedSysStringDesc) {
                MarshalSig.FixedSysString fss = new MarshalSig.FixedSysString ();
                fss.Size = (mSpec as FixedSysStringDesc).Size;
                ms.Spec = fss;
            } else if (mSpec is SafeArrayDesc) {
                MarshalSig.SafeArray sa = new MarshalSig.SafeArray ();
                sa.ArrayElemType = (mSpec as SafeArrayDesc).ElemType;
                ms.Spec = sa;
            }

            return ms;
        }
Esempio n. 3
0
        public override void VisitMarshalSpec(MarshalDesc marshalSpec)
        {
            FieldMarshalTable fmTable = m_tableWriter.GetFieldMarshalTable ();
            FieldMarshalRow fmRow = m_rowWriter.CreateFieldMarshalRow (
                marshalSpec.Container.MetadataToken,
                m_sigWriter.AddMarshalSig (GetMarshalSig (marshalSpec)));

            fmTable.Rows.Add (fmRow);
        }
Esempio n. 4
0
		public virtual void VisitMarshalSpec (MarshalDesc marshalSpec)
		{
		}