public override MarshalSpec CloneInto(IHasMarshalSpec container) { FixedSysStringSpec spec = new FixedSysStringSpec(container); spec.m_size = m_size; 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) { FixedSysStringSpec spec = new FixedSysStringSpec (container); spec.m_size = m_size; return spec; }