コード例 #1
0
 /**
  * Build up this attribution with a contributor.
  *
  * @param agent The contributor.
  * @return this.
  */
 public Attribution SetContributor(Gx.Agent.Agent agent)
 {
     if (agent.Id == null)
     {
         throw new ArgumentException("Can't reference agent as a contributor: no id.");
     }
     return(SetContributor(new ResourceReference("#" + agent.Id)));
 }
コード例 #2
0
ファイル: Gedcomx.cs プロジェクト: xocrus/gedcomx-csharp
 /// <summary>
 /// Add a agent to the data set.
 /// </summary>
 /// <param name="agent">The agent to be added.</param>
 public void AddAgent(Gx.Agent.Agent agent)
 {
     if (agent != null)
     {
         if (Agents == null)
         {
             Agents = new List <Gx.Agent.Agent>();
         }
         Agents.Add(agent);
     }
 }
コード例 #3
0
 /**
  * Build out this source description with a repository.
  *
  * @param repository The repository.
  * @return this.
  */
 public SourceDescription SetRepository(Gx.Agent.Agent repository)
 {
     return(SetRepository(new ResourceReference("#" + repository.Id)));
 }
コード例 #4
0
ファイル: Gedcomx.cs プロジェクト: xocrus/gedcomx-csharp
 /**
  * Build this out with a agent.
  * @param agent The agent.
  * @return this.
  */
 public Gedcomx SetAgent(Gx.Agent.Agent agent)
 {
     AddAgent(agent);
     return(this);
 }
 public override void VisitAgent(Gx.Agent.Agent agent)
 {
     BindIfNeeded(agent);
     base.VisitAgent(agent);
 }