Пример #1
0
        public static void CopyDetails(this ICloningContext cloningContext, ParameterDefinition target, ParameterDefinition source)
        {
            target.ParameterType   = cloningContext.RootImport(source.ParameterType);
            target.Constant        = source.Constant;
            target.HasConstant     = source.HasConstant;
            target.HasDefault      = source.HasDefault;
            target.HasFieldMarshal = source.HasFieldMarshal;
            target.IsIn            = source.IsIn;
            target.IsLcid          = source.IsLcid;
            target.IsOptional      = source.IsOptional;
            target.IsOut           = source.IsOut;
            target.IsReturnValue   = source.IsReturnValue;

            // TODO research correct usage
            if (source.MarshalInfo != null)
            {
                target.MarshalInfo = new MarshalInfo(source.MarshalInfo.NativeType);
            }
        }