コード例 #1
0
ファイル: Helper.cs プロジェクト: Sage/SData-Contracts
 public static SyncState GetSyncState(CorrelatedResSyncInfo corelation)
 {
     SyncState result = new SyncState();
     result.Endpoint = corelation.ResSyncInfo.Endpoint;
     result.Stamp = corelation.ResSyncInfo.ModifiedStamp;
     result.Tick = corelation.ResSyncInfo.Tick;
     return result;
 }
コード例 #2
0
ファイル: Helper.cs プロジェクト: Sage/SData-Contracts
 public static SyncState GetSyncState(SyncFeedDigest digest, string endpoint)
 {
     foreach (SyncFeedDigestEntry entry in digest.Entries)
     {
         if ((entry.Endpoint != null) && (entry.Endpoint.Equals(endpoint, StringComparison.InvariantCultureIgnoreCase)))
         {
             SyncState result = new SyncState();
             result.Endpoint = entry.Endpoint;
             result.Stamp = entry.Stamp;
             result.Tick = entry.Tick;
             return result;
         }
     }
     return null;
 }
コード例 #3
0
ファイル: Helper.cs プロジェクト: Sage/SData-Contracts
 public static SyncState GetSyncState(SyncDigestInfo digest, string EndPoint)
 {
     foreach (SyncDigestEntryInfo entry in digest)
     {
         if ((entry.EndPoint != null) && (entry.EndPoint.Equals(EndPoint, StringComparison.InvariantCultureIgnoreCase)))
         {
             SyncState result = new SyncState();
             result.EndPoint = entry.EndPoint;
             //result.Stamp = entry.Stamp;
             result.Tick = (entry.Tick>0)?entry.Tick:1;
             return result;
         }
     }
     return null;
 }