internal ContentReference <T> GetContentReference <T>(int index) where T : class { if (index == ChunkReference.NullIdentifier) { return(null); } var chunkReference = GetChunkReference(index); var contentReference = new ContentReference <T>(chunkReference.Location); ContentReferences.Add(contentReference); return(contentReference); }
internal int AddContentReference(ContentReference reference) { if (reference == null) { return(ChunkReference.NullIdentifier); } // TODO: This behavior should be controllable if (reference.State != ContentReferenceState.NeverLoad && reference.ObjectValue != null) { // Auto-generate URL if necessary BuildUrl(reference); //Executor.ProcessObject(this, reference.Type, reference); ContentReferences.Add(reference); } return(AddChunkReference(reference.Location, reference.Type)); }
public int AddContentReference(ContentReference contentReference) { if (contentReference == null) { return(ChunkReference.NullIdentifier); } // TODO: This behavior should be controllable if (contentReference.State != ContentReferenceState.NeverLoad && contentReference.ObjectValue != null) { // Auto-generate URL if necessary var serializer = AssetManager.Serializer.GetSerializer(null, contentReference.ObjectValue.GetType()); BuildUrl(contentReference, serializer.ActualType); //Executor.ProcessObject(this, contentReference.Type, contentReference); ContentReferences.Add(contentReference); } return(AddChunkReference(contentReference.Location, contentReference.Type)); }