Example #1
0
                public PpsViewJoinExpression(PrivateUserDataContext context, string expression, bool throwException)
                {
                    this.context        = context ?? throw new ArgumentNullException(nameof(context));
                    this.throwException = throwException;

                    Parse(expression);
                }                 // ctor
Example #2
0
            }             // func GetOrCreatePooledConnection

            #endregion

            #region -- AuthentUser, CreateContext -------------------------------------

            private PrivateUserDataContext CreateContextIntern(IIdentity currentIdentity)
            {
                lock (currentContexts)
                {
                    RemoveContext(null);

                    var t = new PrivateUserDataContext(this, currentIdentity);
                    currentContexts.Add(new WeakReference <PrivateUserDataContext>(t));
                    return(t);
                }
            }             // func CreateContextIntern
Example #3
0
            }             // func CreateContextIntern

            internal void RemoveContext(PrivateUserDataContext context)
            {
                lock (currentContexts)
                {
                    for (var i = currentContexts.Count - 1; i >= 0; i--)
                    {
                        if (!currentContexts[i].TryGetTarget(out var t) ||
                            t.IsDisposed ||
                            t == context)
                        {
                            currentContexts.RemoveAt(i);
                        }
                    }
                }
            }             // proc RemoveContext