Example #1
0
        public Scope Push(ScopeLevel level)
        {
            Scope s = new Scope(level);

            scopes.Push(s);
            return(s);
        }
Example #2
0
 internal HotSwapServiceConfiguration(
     IServiceCollection services,
     ScopeLevel level)
 {
     this.services = services;
     this.config   = new HotSwapInternalConfiguration <TInterface>(services, level);
 }
        public override long GetScopeId(ScopeLevel scopeLevel) {
            if ((scopeLevel < 0) || ((int)scopeLevel >= zoneIndices.Length)) {
                throw new ArgumentOutOfRangeException("scopeLevel");
            }

            return zoneIndices[(int)scopeLevel];
        }
Example #4
0
        public override long GetScopeId(ScopeLevel scopeLevel)
        {
            if ((scopeLevel < 0) || ((int)scopeLevel >= _zoneIndices.Length))
            {
                throw new ArgumentOutOfRangeException(nameof(scopeLevel));
            }

            return(_zoneIndices[(int)scopeLevel]);
        }
Example #5
0
        public override long GetScopeId(ScopeLevel scopeLevel)
        {
            if (scopeLevel == ScopeLevel.None || scopeLevel == ScopeLevel.Interface ||
                scopeLevel == ScopeLevel.Link || scopeLevel == ScopeLevel.Subnet)
            {
                return(_linuxNetworkInterface.Index);
            }

            return(0);
        }
Example #6
0
        public Variable FindVariable(string name, ScopeLevel level)
        {
            Scope s = scopes.FirstOrDefault(x => x.Level == level);

            if (s != null)
            {
                return(s.GetVariable(name));
            }
            return(null);
        }
Example #7
0
            public void AssignIdentifierValue(string name, Value value)
            {
                ScopeLevel scope = this;

                while (scope != null && !scope._values.ContainsKey(name))
                {
                    scope = scope.Parent;
                }

                if (scope == null)
                {
                    throw new UndefinedIdentifierException(name);
                }

                //if (_values[name].Type != value.Type)
                //    throw new InvalidCastException();

                scope._values[name] = new Identifier(value, scope._values[name].Type);
            }
Example #8
0
 public Scope()
 {
     _scope = new ScopeLevel();
 }
 public override long GetScopeId(ScopeLevel scopeLevel)
 {
     throw new PlatformNotSupportedException();
 }
 public override long GetScopeId(ScopeLevel scopeLevel)
 {
     throw new PlatformNotSupportedException(SR.net_InformationUnavailableOnPlatform);
 }
Example #11
0
 public Scope(ScopeLevel level)
 {
     Level = level;
 }
 public virtual long GetScopeId(ScopeLevel scopeLevel)
 {
     throw NotImplemented.ByDesignWithMessage(SR.net_MethodNotImplementedException);
 }
Example #13
0
 public ScopeLevel(ScopeLevel parent)
 {
     _values = new Dictionary <string, Identifier>();
     _parent = parent;
 }
 /// Returns IPv6 scope identifiers.
 public virtual long GetScopeId(ScopeLevel scopeLevel)
 {
     throw new NotImplementedException();
 }
 /// <inheritdoc />
 public long GetScopeId(ScopeLevel scopeLevel)
 {
     return(_props.GetScopeId(scopeLevel));
 }
Example #16
0
 public IDisposable PushScope()
 {
     _scope = new ScopeLevel(_scope);
     return new ScopePopper(this);
 }
Example #17
0
 public HotSwapInternalConfiguration(IServiceCollection services, ScopeLevel level)
 {
     Level         = level;
     InterfaceType = typeof(TInterface);
     services.AddSingleton <HotSwapServiceFactory <TInterface> >();
 }
 /// <summary>
 /// Returns IPv6 scope identifiers.
 /// </summary>
 /// <param name="scopeLevel">The scope level.</param>
 /// <returns>The IPv6 scope identifier.</returns>
 public virtual long GetScopeId(ScopeLevel scopeLevel)
 {
     throw NotImplemented.ByDesignWithMessage(SR.net_MethodNotImplementedException);
 }
Example #19
0
 public IDisposable PushScope()
 {
     _scope = new ScopeLevel(_scope);
     return(new ScopePopper(this));
 }
Example #20
0
 public void PopScope()
 {
     _scope = _scope.Parent;
 }
Example #21
0
 public void PopScope()
 {
     _scope = _scope.Parent;
 }
Example #22
0
 public Scope()
 {
     _scope = new ScopeLevel();
 }
 public override long GetScopeId(ScopeLevel scopeLevel)
 {
     throw new PlatformNotSupportedException(SR.net_InformationUnavailableOnPlatform);
 }
 /// <inheritdoc />
 public long GetScopeId(ScopeLevel scopeLevel)
 {
     return(Implementation.GetScopeId(scopeLevel));
 }
 /// Returns IPv6 scope identifiers.
 public virtual long GetScopeId(ScopeLevel scopeLevel)
 {
     throw new NotImplementedException();
 }
 public virtual long GetScopeId(ScopeLevel scopeLevel);
Example #27
0
 public override long GetScopeId(ScopeLevel scopeLevel)
 {
     throw new PlatformNotSupportedException();
 }
Example #28
0
 public ScopeLevel(ScopeLevel parent)
 {
     _values = new Dictionary<string, Identifier>();
     _parent = parent;
 }