コード例 #1
0
 /// <summary>
 /// Helper function used by subclasses to validate that the type
 /// of the storage medium passed to them matches their type
 /// </summary>
 /// <param name="type">type of STGMEDIUM</param>
 protected void ValidateType(TYMED type)
 {
     if (m_stg.tymed != type)
     {
         const string msg = "Invalid TYMED passed to OleStgMedium";
         Debug.Assert(false, msg);
         throw new InvalidOperationException(msg);
     }
 }
コード例 #2
0
 /// <summary>
 /// Helper function used by subclasses to validate that the type
 /// of the storage medium passed to them matches their type
 /// </summary>
 /// <param name="type">type of STGMEDIUM</param>
 protected void ValidateType(TYMED type)
 {
     if (m_stg.tymed != type)
     {
         const string msg = "Invalid TYMED passed to OleStgMedium";
         Debug.Assert(false, msg);
         throw new InvalidOperationException(msg);
     }
 }