public override void Init(DObject owner, string name, uint id, object ctx, BackingType backing) { base.Init(owner, name, id, ctx, backing); var dictionaryType = typeof(Dictionary <TKey, TValue>); _dictionaryIdWireType = Encoder.EncodeIdWireType(id, dictionaryType); _dictionaryWriter = Encoder.GetValueWriter(dictionaryType); _dictionaryReader = Decoder.GetValueReader(dictionaryType); var keyType = typeof(TKey); _keyIdWireType = Encoder.EncodeIdWireType(id, keyType); _keyWriter = Encoder.GetValueWriter(keyType); _keyReader = Decoder.GetValueReader(keyType); var valueType = typeof(TValue); _keyValueIdWireTypes = Encoder.EncodeIdWireTypes(id, keyType, valueType); _valueWriter = Encoder.GetValueWriter(valueType); _valueReader = Decoder.GetValueReader(valueType); _converterToFirestore = TypeUtil.GetConverterToFirestore(valueType); _converterFromFirestore = TypeUtil.GetConverterFromFirestore(valueType); }
/// <summary> /// Initializes the field after creation. /// </summary> public virtual void Init(DObject owner, string name, uint id, object ctx, BackingType backing) { _owner = owner; _id = id; _ctx = ctx; firestoreField = $"{name}${id}"; }
public override void Init(DObject owner, string name, uint id, object ctx, BackingType backing) { base.Init(owner, name, id, ctx, backing); var setType = typeof(HashSet <T>); _setIdWireType = Encoder.EncodeIdWireType(id, setType); _setWriter = Encoder.GetValueWriter(setType); _setReader = Decoder.GetValueReader(setType); var valueType = typeof(T); _valueIdWireType = Encoder.EncodeIdWireType(id, valueType); _valueWriter = Encoder.GetValueWriter(valueType); _valueReader = Decoder.GetValueReader(valueType); }
public IAccountProvider Create(BackingType type) { if(type== BackingType.Charcoal) return new CharcoalAccountProvider(); return new PTAuthenticationProvider(); }
public IStoryProvider Create(BackingType type, string token) { if (type == BackingType.Charcoal) return new CharcoalStoryProvider(); return new PTStoryProvider(token); }
public Backing(BackingType type) { this.type = type; }
public IProjectProvider Create(BackingType type, string token) { if (type == BackingType.Charcoal) return new CharcoalProjectProvider(token); return new PTProjectProvider(token); }
public ProjectsContainerViewModel(List<Project> projects, BackingType backingType) { Projects = projects; BackingType = backingType; }
public override void Init(DObject owner, string name, uint id, object ctx, BackingType backing) { base.Init(owner, name, id, ctx, backing); _backing = backing; }