public override MarshalSpec CloneInto(IHasMarshalSpec container) { ArrayMarshalSpec spec = new ArrayMarshalSpec(container); spec.m_elemType = m_elemType; spec.m_paramNum = m_paramNum; spec.m_elemMult = m_elemMult; spec.m_numElem = m_numElem; return(spec); }
protected MarshalSpec BuildMarshalDesc(MarshalSig ms, IHasMarshalSpec container) { if (ms.Spec is MarshalSig.Array) { ArrayMarshalSpec amd = new ArrayMarshalSpec(container); MarshalSig.Array ar = (MarshalSig.Array)ms.Spec; amd.ElemType = ar.ArrayElemType; amd.NumElem = ar.NumElem; amd.ParamNum = ar.ParamNum; amd.ElemMult = ar.ElemMult; return(amd); } else if (ms.Spec is MarshalSig.CustomMarshaler) { CustomMarshalerSpec cmd = new CustomMarshalerSpec(container); MarshalSig.CustomMarshaler cmsig = (MarshalSig.CustomMarshaler)ms.Spec; cmd.Guid = cmsig.Guid.Length > 0 ? new Guid(cmsig.Guid) : new Guid(); cmd.UnmanagedType = cmsig.UnmanagedType; cmd.ManagedType = cmsig.ManagedType; cmd.Cookie = cmsig.Cookie; return(cmd); } else if (ms.Spec is MarshalSig.FixedArray) { FixedArraySpec fad = new FixedArraySpec(container); MarshalSig.FixedArray fasig = (MarshalSig.FixedArray)ms.Spec; fad.ElemType = fasig.ArrayElemType; fad.NumElem = fasig.NumElem; return(fad); } else if (ms.Spec is MarshalSig.FixedSysString) { FixedSysStringSpec fssc = new FixedSysStringSpec(container); fssc.Size = ((MarshalSig.FixedSysString)ms.Spec).Size; return(fssc); } else if (ms.Spec is MarshalSig.SafeArray) { SafeArraySpec sad = new SafeArraySpec(container); sad.ElemType = ((MarshalSig.SafeArray)ms.Spec).ArrayElemType; return(sad); } else { return(new MarshalSpec(ms.NativeInstrinsic, container)); } }
protected MarshalSpec BuildMarshalDesc(MarshalSig ms, IHasMarshalSpec container) { if (ms.Spec is MarshalSig.Array) { ArrayMarshalSpec amd = new ArrayMarshalSpec (container); MarshalSig.Array ar = (MarshalSig.Array) ms.Spec; amd.ElemType = ar.ArrayElemType; amd.NumElem = ar.NumElem; amd.ParamNum = ar.ParamNum; amd.ElemMult = ar.ElemMult; return amd; } else if (ms.Spec is MarshalSig.CustomMarshaler) { CustomMarshalerSpec cmd = new CustomMarshalerSpec (container); MarshalSig.CustomMarshaler cmsig = (MarshalSig.CustomMarshaler) ms.Spec; cmd.Guid = cmsig.Guid.Length > 0 ? new Guid (cmsig.Guid) : new Guid (); cmd.UnmanagedType = cmsig.UnmanagedType; cmd.ManagedType = cmsig.ManagedType; cmd.Cookie = cmsig.Cookie; return cmd; } else if (ms.Spec is MarshalSig.FixedArray) { FixedArraySpec fad = new FixedArraySpec (container); MarshalSig.FixedArray fasig = (MarshalSig.FixedArray) ms.Spec; fad.ElemType = fasig.ArrayElemType; fad.NumElem = fasig.NumElem; return fad; } else if (ms.Spec is MarshalSig.FixedSysString) { FixedSysStringSpec fssc = new FixedSysStringSpec (container); fssc.Size = ((MarshalSig.FixedSysString) ms.Spec).Size; return fssc; } else if (ms.Spec is MarshalSig.SafeArray) { SafeArraySpec sad = new SafeArraySpec (container); sad.ElemType = ((MarshalSig.SafeArray) ms.Spec).ArrayElemType; return sad; } else { return new MarshalSpec (ms.NativeInstrinsic, container); } }
public override MarshalSpec CloneInto (IHasMarshalSpec container) { ArrayMarshalSpec spec = new ArrayMarshalSpec (container); spec.m_elemType = m_elemType; spec.m_paramNum = m_paramNum; spec.m_elemMult = m_elemMult; spec.m_numElem = m_numElem; return spec; }