File tree Expand file tree Collapse file tree 3 files changed +41
-0
lines changed
Expand file tree Collapse file tree 3 files changed +41
-0
lines changed Original file line number Diff line number Diff line change @@ -18,6 +18,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
1818
1919### Added
2020
21+ - [ SIL.LCModel] Add SpecificItemAndFieldName() to ISenseOrEntry
2122- [ SIL.LCModel] Added a parameter to GetBestGuess() and TryGetBestGuess() to do lowercase matching regardless of the occurrence index
2223- [ SIL.LCModel] Add GetCaptionOrHeadword() to CmPicture
2324- [ SIL.LCModel] ` LCModelStrings.NotSure ` to allow clients to know if a grammatical category is the placeholder
Original file line number Diff line number Diff line change @@ -10065,5 +10065,31 @@ public ILcmReferenceSequence<ICmPossibility> DialectLabelsRS
1006510065 return sense . DialectLabelsSenseOrEntry ;
1006610066 }
1006710067 }
10068+
10069+ /// <summary>
10070+ /// There are some special cases where the value of a field cannot be obtained
10071+ /// by getting the value of fieldName on the SenseOrEntry.Item. This method accounts for
10072+ /// those special cases and returns the Item and fieldName that will need to be used to
10073+ /// get the value. If it is not a special case then the default is to return SenseOrEntry.Item
10074+ /// for specificItem and return fieldName for specificFieldName.
10075+ /// </summary>
10076+ /// <param name="fieldName">The general fieldName associated with this SenseOrEntry object.</param>
10077+ /// <param name="specificItem">The specific LexSense or LexEntry item that will contain a
10078+ /// value for specificFieldName.</param>
10079+ /// <param name="specificFieldName">The specific field name that will need to be used to get
10080+ /// the value from the specificItem.</param>
10081+ public void SpecificItemAndFieldName ( string fieldName , out ICmObject specificObject , out string specificFieldName )
10082+ {
10083+ specificObject = Item ;
10084+ specificFieldName = fieldName ;
10085+ if ( fieldName == "HeadWordRef" && Item is ILexSense )
10086+ {
10087+ specificFieldName = "MLOwnerOutlineName" ;
10088+ }
10089+ else if ( fieldName == "EntryRefsOS" && Item is ILexSense sense )
10090+ {
10091+ specificObject = sense . Entry ;
10092+ }
10093+ }
1006810094 }
1006910095}
Original file line number Diff line number Diff line change @@ -5992,5 +5992,19 @@ public interface ISenseOrEntry
59925992 /// Returns the dialect labels for the entry or sense
59935993 /// </summary>
59945994 ILcmReferenceSequence < ICmPossibility > DialectLabelsRS { get ; }
5995+
5996+ /// <summary>
5997+ /// There are some special cases where the value of a field cannot be obtained
5998+ /// by getting the value of fieldName on the SenseOrEntry.Item. This method accounts for
5999+ /// those special cases and returns the Item and fieldName that will need to be used to
6000+ /// get the value. If it is not a special case then the default is to return SenseOrEntry.Item
6001+ /// for specificItem and return fieldName for specificFieldName.
6002+ /// </summary>
6003+ /// <param name="fieldName">The general fieldName associated with this SenseOrEntry object.</param>
6004+ /// <param name="specificItem">The specific LexSense or LexEntry item that will contain a
6005+ /// value for specificFieldName.</param>
6006+ /// <param name="specificFieldName">The specific field name that will need to be used to get
6007+ /// the value from the specificItem.</param>
6008+ void SpecificItemAndFieldName ( string fieldName , out ICmObject specificItem , out string specificFieldName ) ;
59956009 }
59966010}
You can’t perform that action at this time.
0 commit comments