SIL.FieldWorks.XWorks.InterestingTextList.MakeIdList C# (CSharp) Method

MakeIdList() public static method

Make a string that corresponds to a list of guids.
public static MakeIdList ( IEnumerable objects ) : string
objects IEnumerable
return string
		public static string MakeIdList(IEnumerable<Guid> objects)
		{
			return objects.ToString(",", guid => Convert.ToBase64String(guid.ToByteArray()));
		}

Same methods

InterestingTextList::MakeIdList ( IEnumerable objects ) : string

Usage Example

Ejemplo n.º 1
0
        public void PropertyTableHasInvalidObjects()
        {
            MockTextRepository mockTextRep = MakeMockTextRepoWithTwoMockTexts();

            MakeMockScriptureSection();
            m_propertyTable.SetProperty(InterestingTextList.PersistPropertyName, InterestingTextList.MakeIdList(
                                            new ICmObject[] { m_sections[0].ContentOA, m_sections[0].HeadingOA }) + "," + Convert.ToBase64String(Guid.NewGuid().ToByteArray()) + ",$%^#@+");
            var testObj = new InterestingTextList(m_propertyTable, mockTextRep, m_mockStTextRepo, true);

            testObj.InterestingTextsChanged += TextsChangedHandler;
            var expectedScripture = new List <IStText>();

            expectedScripture.Add(m_sections[0].ContentOA);
            expectedScripture.Add(m_sections[0].HeadingOA);
            VerifyList(expectedScripture, testObj.ScriptureTexts, "Just two valid Guids");
        }
All Usage Examples Of SIL.FieldWorks.XWorks.InterestingTextList::MakeIdList