internal static void MarshalPropSpec(ManagedPropSpec propSpec, ref PROPSPEC native)
        {
            native.propType = (uint)propSpec.PropType;
            PropSpecType propType = propSpec.PropType;

            if (propType == PropSpecType.Name)
            {
                native.union.name = Marshal.StringToCoTaskMemUni(propSpec.PropName);
                return;
            }
            if (propType == PropSpecType.Id)
            {
                native.union.propId = propSpec.PropId;
                return;
            }
            Invariant.Assert(false);
        }
        /// <summary>
        /// Marshal Managed to Native PROPSPEC
        /// </summary>
        /// <param name="propSpec"></param>
        /// <param name="native"></param>
        internal static void MarshalPropSpec(ManagedPropSpec propSpec, ref PROPSPEC native)
        {
            native.propType = (uint)propSpec.PropType;
            switch (propSpec.PropType)
            {
            case PropSpecType.Id:
                native.union.propId = (uint)propSpec.PropId;
                break;

            case PropSpecType.Name:
                native.union.name = Marshal.StringToCoTaskMemUni(propSpec.PropName);
                break;

            default:
                Invariant.Assert(false);     // propSpec.PropType is set by internal code in the filter logic.
                break;
            }
        }
예제 #3
0
 /// <summary>
 /// Handles native FULLPROPSPEC and does marshaling
 /// </summary>
 /// <param name="nativePropSpec"></param>
 internal ManagedFullPropSpec(FULLPROPSPEC nativePropSpec)
 {
     _guid     = nativePropSpec.guid;
     _property = new ManagedPropSpec(nativePropSpec.property);
 }
예제 #4
0
// If the following is not used once metadata filtering is implemented, remove completely from the code.
#if false
        /// <summary>
        /// Helper constructor
        /// </summary>
        /// <param name="guid">property guid</param>
        /// <param name="propName"></param>
        internal ManagedFullPropSpec(Guid guid, string propName)
        {
            _guid     = guid;
            _property = new ManagedPropSpec(propName);
        }
예제 #5
0
 /// <summary>
 /// constructor
 /// </summary>
 /// <param name="guid"></param>
 /// <param name="propId"></param>
 internal ManagedFullPropSpec(Guid guid, uint propId)
 {
     _guid     = guid;
     _property = new ManagedPropSpec(propId);
 }
예제 #6
0
        internal static void MarshalPropSpec(ManagedPropSpec propSpec, ref PROPSPEC native)
        {
            native.propType = (uint)propSpec.PropType;
            switch (propSpec.PropType)
            {
                case PropSpecType.Id:
                    native.union.propId = (uint)propSpec.PropId;
                    break;

                case PropSpecType.Name:
                    native.union.name = Marshal.StringToCoTaskMemUni(propSpec.PropName);
                    break;

                default:
                    Invariant.Assert(false); // propSpec.PropType is set by internal code in the filter logic.
                    break;
            }
        }
예제 #7
0
 /// <summary>
 /// Handles native FULLPROPSPEC and does marshaling 
 /// </summary> 
 /// <param name="nativePropSpec"></param>
 internal ManagedFullPropSpec(FULLPROPSPEC nativePropSpec) 
 {
     _guid = nativePropSpec.guid;
     _property = new ManagedPropSpec(nativePropSpec.property);
 } 
예제 #8
0
// If the following is not used once metadata filtering is implemented, remove completely from the code. 
#if false
        /// <summary>
        /// Helper constructor
        /// </summary> 
        /// <param name="guid">property guid</param>
        /// <param name="propName"></param> 
        internal ManagedFullPropSpec(Guid guid, string propName) 
        {
            _guid = guid; 
            _property = new ManagedPropSpec(propName);
        }
예제 #9
0
 /// <summary> 
 /// constructor
 /// </summary> 
 /// <param name="guid"></param>
 /// <param name="propId"></param>
 internal ManagedFullPropSpec(Guid guid, uint propId)
 { 
     _guid = guid;
     _property = new ManagedPropSpec(propId); 
 }