private static void CreateStringPoints(StringCache sc, int count,bool deleteClone) { Repository.Utility.WriteLog("CreateStringPoints started", System.Diagnostics.EventLogEntryType.Information); var sp1 = sc.Elements<StringPoint>().ElementAt(0); for (int i = sc.Elements<StringPoint>().Count() - 1; i > 0; i--) { sc.Elements<StringPoint>().ElementAt(i).Remove(); } for (int i = 0; i < count; i++) { var spref = sc.Elements<StringPoint>().ElementAt(i); var sp = (StringPoint)sp1.Clone(); sp.Index = (UInt32)i + 1; sc.InsertAfter(sp, spref); } sp1.Remove(); Repository.Utility.WriteLog("CreateStringPoints completed successfully", System.Diagnostics.EventLogEntryType.Information); }
private static void CreateStringPoints(StringCache sc, int count) { var sp1 = sc.Elements<StringPoint>().ElementAt(0); for (int i = 0; i < count; i++) { var spref = sc.Elements<StringPoint>().ElementAt(i); var sp = (StringPoint)sp1.Clone(); sp.Index = (UInt32)i + 1; sc.InsertAfter(sp, spref); } }