Example #1
0
        internal AppOptionsInternal ConvertToInternal()
        {
            AppOptionsInternal appOptionsInternal = new AppOptionsInternal();

            appOptionsInternal.DatabaseUrl = this.DatabaseUrl;
            if (!string.IsNullOrEmpty(this.AppId))
            {
                appOptionsInternal.AppId = this.AppId;
            }
            if (!string.IsNullOrEmpty(this.ApiKey))
            {
                appOptionsInternal.ApiKey = this.ApiKey;
            }
            if (!string.IsNullOrEmpty(this.MessageSenderId))
            {
                appOptionsInternal.MessageSenderId = this.MessageSenderId;
            }
            if (!string.IsNullOrEmpty(this.StorageBucket))
            {
                appOptionsInternal.StorageBucket = this.StorageBucket;
            }
            if (!string.IsNullOrEmpty(this.ProjectId))
            {
                appOptionsInternal.ProjectId = this.ProjectId;
            }
            if (!string.IsNullOrEmpty(this.PackageName))
            {
                appOptionsInternal.PackageName = this.PackageName;
            }
            return(appOptionsInternal);
        }
Example #2
0
        internal AppOptionsInternal options()
        {
            AppOptionsInternal result = new AppOptionsInternal(AppUtilPINVOKE.FirebaseApp_options(this.swigCPtr), false);

            if (AppUtilPINVOKE.SWIGPendingException.Pending)
            {
                throw AppUtilPINVOKE.SWIGPendingException.Retrieve();
            }
            return(result);
        }
Example #3
0
        public static AppOptions LoadFromJsonConfig(string jsonConfigFilename)
        {
            AppOptionsInternal appOptionsInternal = AppUtil.AppOptionsLoadFromJsonConfig(jsonConfigFilename);

            if (appOptionsInternal == null)
            {
                return(null);
            }
            return(new AppOptions(appOptionsInternal));
        }
Example #4
0
 internal AppOptions(AppOptionsInternal other)
 {
     this.DatabaseUrl     = other.DatabaseUrl;
     this.AppId           = other.AppId;
     this.ApiKey          = other.ApiKey;
     this.MessageSenderId = other.MessageSenderId;
     this.StorageBucket   = other.StorageBucket;
     this.ProjectId       = other.ProjectId;
     this.PackageName     = other.PackageName;
 }
Example #5
0
        internal static FirebaseApp CreateInternal(AppOptionsInternal options, string name)
        {
            IntPtr      intPtr = AppUtilPINVOKE.FirebaseApp_CreateInternal__SWIG_2(AppOptionsInternal.getCPtr(options), name);
            FirebaseApp result = (!(intPtr == IntPtr.Zero)) ? new FirebaseApp(intPtr, false) : null;

            if (AppUtilPINVOKE.SWIGPendingException.Pending)
            {
                throw AppUtilPINVOKE.SWIGPendingException.Retrieve();
            }
            return(result);
        }
Example #6
0
        internal static AppOptionsInternal LoadFromJsonConfig(string config)
        {
            IntPtr             intPtr = AppUtilPINVOKE.AppOptionsInternal_LoadFromJsonConfig__SWIG_1(config);
            AppOptionsInternal result = (!(intPtr == IntPtr.Zero)) ? new AppOptionsInternal(intPtr, false) : null;

            if (AppUtilPINVOKE.SWIGPendingException.Pending)
            {
                throw AppUtilPINVOKE.SWIGPendingException.Retrieve();
            }
            return(result);
        }
Example #7
0
 internal static HandleRef getCPtr(AppOptionsInternal obj)
 {
     return((obj != null) ? obj.swigCPtr : new HandleRef(null, IntPtr.Zero));
 }