예제 #1
0
 private static void TestValueNonEmpty(ExolutioObject component)
 {
     if (component == null)
     {
         throw new ExolutioModelException("Component must not be empty. ");
     }
 }
예제 #2
0
 public TResult ProcessComponentOrSchema(ExolutioObject @object)
 {
     if (@object is Component)
     {
         return(ProcessComponent((Component)@object));
     }
     if (@object is Schema)
     {
         return(ProcessSchema((Schema)@object));
     }
     throw new ArgumentOutOfRangeException("object", "Unknown component type.");
 }
예제 #3
0
파일: Project.cs 프로젝트: mff-uk/exolutio
 public bool TryTranslateObject(Guid componentId, out ExolutioObject exolutioObject)
 {
     return(mappingDictionary.TryGetValue(componentId, out exolutioObject));
 }
예제 #4
0
 /// <summary>
 /// Gets the value associated with the specified key.
 /// </summary>
 /// <returns>
 /// true if the <see cref="T:System.Collections.Generic.Dictionary`2"/> contains an element with the specified key; otherwise, false.
 /// </returns>
 /// <param name="key">The key of the value to get.</param><param name="value">When this method returns, contains the value associated with the specified key, if the key is found; otherwise, the default value for the type of the <paramref name="value"/> parameter. This parameter is passed uninitialized.</param><exception cref="T:System.ArgumentNullException"><paramref name="key"/> is null.</exception>
 public bool TryGetValue(Guid key, out ExolutioObject value)
 {
     TestGuidNonEmpty(key);
     return(internalDictionary.TryGetValue(key, out value));
 }
예제 #5
0
 /// <summary>
 /// Adds the specified key and value to the dictionary.
 /// </summary>
 /// <param name="key">The key of the element to add.</param><param name="value">The value of the element to add. The value can be null for reference types.</param><exception cref="T:System.ArgumentNullException"><paramref name="key"/> is null.</exception><exception cref="T:System.ArgumentException">An element with the same key already exists in the <see cref="T:System.Collections.Generic.Dictionary`2"/>.</exception>
 public void Add(Guid key, ExolutioObject value)
 {
     TestGuidNonEmpty(key);
     TestValueNonEmpty(value);
     internalDictionary.Add(key, value);
 }