//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#: //ORIGINAL LINE: public CoreSnapshot unmarshal0(org.neo4j.storageengine.api.ReadableChannel channel) throws java.io.IOException, org.neo4j.causalclustering.messaging.EndOfStreamException public override CoreSnapshot Unmarshal0(ReadableChannel channel) { long prevIndex = channel.Long; long prevTerm = channel.Long; CoreSnapshot coreSnapshot = new CoreSnapshot(prevIndex, prevTerm); int snapshotCount = channel.Int; for (int i = 0; i < snapshotCount; i++) { int typeOrdinal = channel.Int; CoreStateType type = CoreStateType.values()[typeOrdinal]; object state = type.marshal.unmarshal(channel); coreSnapshot.Add(type, state); } return(coreSnapshot); }
public virtual T Get <T>(CoreStateType type) { return(( T )_snapshotCollection[type]); }
public virtual void Add(CoreStateType type, object state) { _snapshotCollection[type] = state; }