Example #1
0
 internal static DataContract?As(this DataContract dataContract, DataContractType dcType)
 {
     if (dataContract.GetContractType() == dcType)
     {
         return(dataContract);
     }
     return(null);
 }
 private static void addDataModelProvider(DataContractType dataContract, Document doc)
 {
     var dataValues = getTechSemanticStrArray(dataContract.Property);
     foreach (var dataValue in dataValues)
     {
         string hashValue = CalculateHexThumbprintSha256(dataValue);
         doc.Add(getField("DataModelFieldString", dataValue));
         doc.Add(getField("DataModelFieldHASH", hashValue));
     }
 }
Example #3
0
 internal static bool Is(this DataContract dataContract, DataContractType dcType)
 {
     return(dataContract.GetContractType() == dcType);
 }
 private static string GetCombinedSemanticHashValue(DataContractType dataContract)
 {
     string propertyString = getTechSemanticConcatenation(dataContract.Property);
     string hashSource = string.Format("MODEL{0}-PROPERTIES{1}",
                                       dataContract.semanticTypeName, propertyString);
     return hashSource;
 }