@@ -1604,30 +1604,46 @@ internal partial class CmTranslationFactory
16041604 /// Create a well-formed ICmTranslation which has the owner and Type property set.
16051605 /// </summary>
16061606 public ICmTranslation Create ( IStTxtPara owner , ICmPossibility translationType )
1607+ {
1608+ return Create ( owner , translationType , Guid . NewGuid ( ) ) ;
1609+ }
1610+ /// <summary>
1611+ /// Create a well-formed ICmTranslation which has the owner and Type property set.
1612+ /// </summary>
1613+ public ICmTranslation Create ( IStTxtPara owner , ICmPossibility translationType , Guid guid )
16071614 {
16081615 if ( owner == null ) throw new ArgumentNullException ( "owner" ) ;
16091616 if ( translationType == null ) throw new ArgumentNullException ( "translationType" ) ;
16101617
1611- return Create ( owner . TranslationsOC , translationType ) ;
1618+ return Create ( owner . TranslationsOC , translationType , guid ) ;
16121619 }
16131620
16141621 /// <summary>
16151622 /// Create a well-formed ICmTranslation which has the owner and Type property set.
16161623 /// </summary>
16171624 public ICmTranslation Create ( ILexExampleSentence owner , ICmPossibility translationType )
1625+ {
1626+ return Create ( owner , translationType , Guid . NewGuid ( ) ) ;
1627+ }
1628+
1629+ /// <summary>
1630+ /// Create a well-formed ICmTranslation which has the owner and Type property set.
1631+ /// </summary>
1632+ public ICmTranslation Create ( ILexExampleSentence owner , ICmPossibility translationType , Guid guid )
16181633 {
16191634 if ( owner == null ) throw new ArgumentNullException ( "owner" ) ;
16201635 if ( translationType == null ) throw new ArgumentNullException ( "translationType" ) ;
16211636
1622- return Create ( owner . TranslationsOC , translationType ) ;
1637+ return Create ( owner . TranslationsOC , translationType , guid ) ;
16231638 }
16241639
16251640 /// <summary>
16261641 /// Do the real work for both smart Create methods.
16271642 /// </summary>
1628- private ICmTranslation Create ( ICollection < ICmTranslation > owningVector , ICmPossibility translationType )
1643+ private ICmTranslation Create ( ICollection < ICmTranslation > owningVector , ICmPossibility translationType , Guid guid )
16291644 {
1630- var newbie = new CmTranslation ( ) ;
1645+ if ( guid == Guid . Empty ) guid = Guid . NewGuid ( ) ;
1646+ var newbie = new CmTranslation ( m_cache , m_cache . InternalServices . DataReader . GetNextRealHvo ( ) , guid ) ;
16311647 owningVector . Add ( newbie ) ;
16321648 newbie . TypeRA = translationType ;
16331649 return newbie ;
0 commit comments