public static Query GetQueryIsCurrent() { if (_cacheQueryIsCurrent == null) { _cacheQueryIsCurrent = new Query() .JoinSuccessors(Individual__name.GetRolePrior()) ; } return(_cacheQueryIsCurrent); }
public static Query GetQueryName() { if (_cacheQueryName == null) { _cacheQueryName = new Query() .JoinSuccessors(Individual__name.GetRoleIndividual(), Condition.WhereIsEmpty(Individual__name.GetQueryIsCurrent()) ) ; } return(_cacheQueryName); }
public CorrespondenceFact CreateFact(FactMemento memento) { Individual__name newFact = new Individual__name(memento); // Create a memory stream from the memento data. using (MemoryStream data = new MemoryStream(memento.Data)) { using (BinaryReader output = new BinaryReader(data)) { newFact._value = (string)_fieldSerializerByType[typeof(string)].ReadData(output); } } return(newFact); }
public Individual__name Ensure() { if (_loadedTask != null) { ManualResetEvent loaded = new ManualResetEvent(false); Individual__name fact = null; _loadedTask.ContinueWith(delegate(Task <CorrespondenceFact> t) { fact = (Individual__name)t.Result; loaded.Set(); }); loaded.WaitOne(); return(fact); } else { return(this); } }
public void RegisterAllFactTypes(Community community, IDictionary <Type, IFieldSerializer> fieldSerializerByType) { community.AddType( Individual._correspondenceFactType, new Individual.CorrespondenceFactFactory(fieldSerializerByType), new FactMetadata(new List <CorrespondenceFactType> { Individual._correspondenceFactType })); community.AddQuery( Individual._correspondenceFactType, Individual.GetQueryName().QueryDefinition); community.AddQuery( Individual._correspondenceFactType, Individual.GetQueryTunes().QueryDefinition); community.AddType( Individual__name._correspondenceFactType, new Individual__name.CorrespondenceFactFactory(fieldSerializerByType), new FactMetadata(new List <CorrespondenceFactType> { Individual__name._correspondenceFactType })); community.AddQuery( Individual__name._correspondenceFactType, Individual__name.GetQueryIsCurrent().QueryDefinition); community.AddType( Tune._correspondenceFactType, new Tune.CorrespondenceFactFactory(fieldSerializerByType), new FactMetadata(new List <CorrespondenceFactType> { Tune._correspondenceFactType })); community.AddQuery( Tune._correspondenceFactType, Tune.GetQueryIndividuals().QueryDefinition); community.AddType( Like._correspondenceFactType, new Like.CorrespondenceFactFactory(fieldSerializerByType), new FactMetadata(new List <CorrespondenceFactType> { Like._correspondenceFactType })); }
public CorrespondenceFact GetNullInstance() { return(Individual__name.GetNullInstance()); }
public CorrespondenceFact GetUnloadedInstance() { return(Individual__name.GetUnloadedInstance()); }
public void WriteFactData(CorrespondenceFact obj, BinaryWriter output) { Individual__name fact = (Individual__name)obj; _fieldSerializerByType[typeof(string)].WriteData(output, fact._value); }