예제 #1
0
 public static void SetDataType(this IDataDocument document)
 {
     if (document is DataElement && (document as DataElement).DataType.IsNullOrEmpty())
     {
         if (document.Id.StartsWith("party:"))
         {
             var idList = document.Id.Split(':');
             (document as DataElement).DataType = $"{idList[0]}:{idList[1]}";
         }
         else
         {
             (document as DataElement).DataType = document.Id.Substring(0, document.Id.IndexOf(':'));
         }
     }
 }
예제 #2
0
 public static void SetPartitionId(this IDataDocument document)
 {
     document.PartitionId = IdToPartitionId(document.Id);
 }