/// <summary> /// Gets the path of the object file for a given entity key. /// </summary> /// <param name="key">Key</param> /// <returns>The path where the object with this key should be stored.</returns> private string GetFilePath( EntityKey key ) { return Path.Combine( directory, string.Format( objectFileMask, key ) ); }
/// <summary> /// Gets an entity from the <see cref="Storage"/>. /// </summary> /// <param name="key">BaseEntity key.</param> /// <returns>The entity, or <b>null</b> if it was not found.</returns> internal BaseEntity GetEntity( EntityKey key ) { return this.InternalGet( key ); }
/// <summary> /// Makes a new (and unique) <see cref="Framework.EntityKey"/>. /// </summary> /// <returns>A new <see cref="Framework.EntityKey"/>.</returns> internal static EntityKey MakeEntityKey() { EntityKey entityKey = new EntityKey( Guid.NewGuid().ToString() ); return entityKey; }
/// <summary> /// Gets an entity from the <see cref="Storage"/>. /// </summary> /// <param name="key">BaseEntity key.</param> /// <returns>The entity, or <b>null</b> if it was not found.</returns> internal BaseEntity GetEntity(EntityKey key) { return(this.InternalGet(key)); }
/// <summary> /// Gets the path of the object file for a given entity key. /// </summary> /// <param name="key">Key</param> /// <returns>The path where the object with this key should be stored.</returns> private string GetFilePath(EntityKey key) { return(Path.Combine(directory, string.Format(objectFileMask, key))); }
/// <summary> /// Makes a new (and unique) <see cref="Framework.EntityKey"/>. /// </summary> /// <returns>A new <see cref="Framework.EntityKey"/>.</returns> internal static EntityKey MakeEntityKey() { EntityKey entityKey = new EntityKey(Guid.NewGuid().ToString()); return(entityKey); }
/// <summary> /// Initializes a new <see cref="EntityRef"/> from an <see cref="EntityKey"/>. /// </summary> /// <param name="entityKey">An <see cref="EntityKey"/> (eventually null).</param> public EntityRef(EntityKey entityKey) { this.entityKey = entityKey; this.target = null; }