/// <summary> /// Sets the name to the specified value for the current context. /// /// The name is an arbitrary object. /// </summary> public void SetObjectName(ContextId context, object name, object value, ScopeMemberAttributes attributes) { int id = context.Id; if (id == 0) { if (_attrs != null) { _attrs.CheckWritable(name); } _dict.AddObjectKey(name, value); if (attributes != ScopeMemberAttributes.None) { if (_attrs == null) { _attrs = new ScopeAttributeDictionary(); } _attrs.Set(name, attributes); } } else { if (_contextScopes == null) { _contextScopes = new ContextSensitiveScope(); } _contextScopes.SetObjectName(context, name, value, attributes); } }
public void Set(object name, ScopeMemberAttributes value) { if (_objectAttrs == null) { _objectAttrs = new Dictionary <object, ScopeMemberAttributes>(); } _objectAttrs[name] = value; }
public void Set(SymbolId name, ScopeMemberAttributes value) { if (_attrs == null) { _attrs = new Dictionary <SymbolId, ScopeMemberAttributes>(); } _attrs[name] = value; }
/// <summary> /// Sets the name to the specified value for the current context. /// /// Provides the ScopeMemberAttributes which should be set on the provided object. /// </summary> /// <exception cref="MemberAccessException">The name has already been published and marked as ReadOnly</exception> public void SetName(SymbolId name, object value, ScopeMemberAttributes attributes) { if (_attrs != null) { _attrs.CheckWritable(name); } if (_attrs == null) { _attrs = new ScopeAttributeDictionary(); } _attrs.Set(name, attributes); _dict[name] = value; }
public void SetName(ContextId context, SymbolId name, object value, ScopeMemberAttributes attrs) { int id = context.Id; EnsureDictionary(id); EnsureAttrDict(id); if (_attrs != null && id < _attrs.Count) { _attrs[id].CheckWritable(name); } _dicts[id][name] = value; _attrs[id].Set(name, attrs); }
/// <summary> /// Sets a name that is only available in the specified context. /// /// Provides the ScopeMemberAttributes which should be set on the provided object. /// </summary> /// <exception cref="MemberAccessException">The name has already been published and marked as ReadOnly</exception> public void SetName(ContextId context, SymbolId name, object value, ScopeMemberAttributes attributes) { if (_attrs != null) { _attrs.CheckWritable(name); } if (context == ContextId.Empty) { SetName(name, value); } else { if (_contextScopes == null) { _contextScopes = new ContextSensitiveScope(); } _contextScopes.SetName(context, name, value, attributes); } }
public void SetObjectName(ContextId context, object name, object value, ScopeMemberAttributes attrs) { int id = context.Id; EnsureDictionary(id); if (attrs != ScopeMemberAttributes.None) { EnsureAttrDict(id); } if (_attrs != null && id < _attrs.Count) { _attrs[id].CheckWritable(name); } _dicts[id].AddObjectKey(name, value); if (attrs != ScopeMemberAttributes.None) { _attrs[id].Set(name, attrs); } }
public void Set(object name, ScopeMemberAttributes value) { if (_objectAttrs == null) _objectAttrs = new Dictionary<object, ScopeMemberAttributes>(); _objectAttrs[name] = value; }
public void Set(SymbolId name, ScopeMemberAttributes value) { if (_attrs == null) _attrs = new Dictionary<SymbolId, ScopeMemberAttributes>(); _attrs[name] = value; }
public void SetObjectName(ContextId context, object name, object value, ScopeMemberAttributes attrs) { int id = context.Id; EnsureDictionary(id); if (attrs != ScopeMemberAttributes.None) EnsureAttrDict(id); if (_attrs != null && id < _attrs.Count) _attrs[id].CheckWritable(name); _dicts[id].AddObjectKey(name, value); if (attrs != ScopeMemberAttributes.None) _attrs[id].Set(name, attrs); }
public void SetName(ContextId context, SymbolId name, object value, ScopeMemberAttributes attrs) { int id = context.Id; EnsureDictionary(id); EnsureAttrDict(id); if (_attrs != null && id < _attrs.Count) _attrs[id].CheckWritable(name); _dicts[id][name] = value; _attrs[id].Set(name, attrs); }
/// <summary> /// Sets the name to the specified value for the current context. /// /// The name is an arbitrary object. /// </summary> public void SetObjectName(ContextId context, object name, object value, ScopeMemberAttributes attributes) { //int id = context.Id; //if (id == 0) { // if (_attrs != null) _attrs.CheckWritable(name); _dict.AddObjectKey(name, value); // if (attributes != ScopeMemberAttributes.None) { // if (_attrs == null) _attrs = new ScopeAttributeDictionary(); // _attrs.Set(name, attributes); // } //} else { // if (_contextScopes == null) _contextScopes = new ContextSensitiveScope(); // _contextScopes.SetObjectName(context, name, value, attributes); //} }
/// <summary> /// Sets a name that is only available in the specified context. /// /// Provides the ScopeMemberAttributes which should be set on the provided object. /// </summary> /// <exception cref="MemberAccessException">The name has already been published and marked as ReadOnly</exception> public void SetName(ContextId context, SymbolId name, object value, ScopeMemberAttributes attributes) { if (_attrs != null) _attrs.CheckWritable(name); if (context == ContextId.Empty) { SetName(name, value); } else { if (_contextScopes == null) _contextScopes = new ContextSensitiveScope(); _contextScopes.SetName(context, name, value, attributes); } }
/// <summary> /// Sets the name to the specified value for the current context. /// /// Provides the ScopeMemberAttributes which should be set on the provided object. /// </summary> /// <exception cref="MemberAccessException">The name has already been published and marked as ReadOnly</exception> public void SetName(SymbolId name, object value, ScopeMemberAttributes attributes) { #if FULL if (_attrs != null) _attrs.CheckWritable(name); if (_attrs == null) { _attrs = new ScopeAttributeDictionary(); } _attrs.Set(name, attributes); #endif _dict[name] = value; }
/// <summary> /// Sets the name to the specified value for the current context. /// /// Provides the ScopeMemberAttributes which should be set on the provided object. /// </summary> /// <exception cref="MemberAccessException">The name has already been published and marked as ReadOnly</exception> public void SetName(SymbolId name, object value, ScopeMemberAttributes attributes) { _dict[name] = value; }