コード例 #1
0
ファイル: ImportRef.cs プロジェクト: jibrel/leaf
 public ImportRef(string identifier)
 {
     if (Guid.TryParse(identifier, out var guid))
     {
         Id = guid;
     }
     else if (ImportUrn.TryParse(identifier, out var urn))
     {
         UniversalId = urn;
     }
     else
     {
         throw new FormatException($"Import identifier {identifier} is not a valid Guid or Urn");
     }
 }
コード例 #2
0
ファイル: ImportRef.cs プロジェクト: jibrel/leaf
 public ImportRef(Guid?id, ImportUrn urn)
 {
     Id          = id;
     UniversalId = urn;
 }
コード例 #3
0
ファイル: ImportRef.cs プロジェクト: jibrel/leaf
 public ImportRef(ImportUrn urn)
 {
     UniversalId = urn;
 }