Example #1
0
 public bool AddChild(RenderContent renderContent)
 {
   IntPtr pThis = NonConstPointer();
   IntPtr pChild = null == renderContent ? IntPtr.Zero : renderContent.NonConstPointer();
   bool success = UnsafeNativeMethods.Rdk_RenderContent_AddChild(pThis, pChild);
   // If successfully added to the child content list then make sure the newContent
   // pointer does not get deleted when the managed object is disposed of since the
   // content is now included in this objects child content list
   if (success && null != renderContent)
     renderContent.m_bAutoDelete = false;
   return success;
 }
Example #2
0
 public bool ChangeChild(RenderContent oldContent, RenderContent newContent)
 {
   if (null == oldContent)
     return false;
   IntPtr pThis = NonConstPointer();
   IntPtr pOld = oldContent.ConstPointer();
   IntPtr pNew = null == newContent ? IntPtr.Zero : oldContent.NonConstPointer();
   bool success = UnsafeNativeMethods.Rdk_RenderContent_ChangeChild(pThis, pOld, pNew);
   // If successfully added to the child content list then make sure the newContent
   // pointer does not get deleted when the managed object is disposed of since the
   // content is now included in this objects child content list
   if (success && null != newContent)
     newContent.m_bAutoDelete = false;
   return success;
 }
Example #3
0
    /// <summary>
    /// Changes the type of a content. This deletes the content and creates a replacement
	  /// of the specified type allowing the caller to decide about harvesting.
    /// </summary>
    /// <param name="oldContent">oldContent is the old content which is deleted.</param>
    /// <param name="newType">The type of content to replace pOldContent with.</param>
    /// <param name="harvestParameters">Determines whether or not parameter harvesting will be performed.</param>
    /// <returns>A new persistent render content.</returns>
    public static RenderContent ChangeContentType(RenderContent oldContent, Guid newType, bool harvestParameters)
    {
      IntPtr pContent = UnsafeNativeMethods.Rdk_Globals_ChangeContentType(oldContent.NonConstPointer(), newType, harvestParameters);
      return IntPtr.Zero==pContent ? null : RenderContent.FromPointer(pContent);
    }