Microsoft.PowerShell.GData.Dgc.GoogleAppService.GetDomain C# (CSharp) Method

GetDomain() public method

public GetDomain ( string adminUser ) : string
adminUser string
return string
            public string GetDomain(string adminUser)
            {
                char[] _delimiterChars = { '@' };
                string[] _temp = adminUser.Split(_delimiterChars);
                var _domain = _temp[1];
                return _domain;
            }

Usage Example

Example #1
0
            protected override void ProcessRecord()
            {
                var _DgcGoogleAppsService = new Dgc.GoogleAppService();
                var _Domain = _DgcGoogleAppsService.GetDomain(_AdminUser);

                try
                {
                    var _UserService = new AppsService(_Domain, _AdminUser, _AdminPassword);

                    WriteObject(_UserService);
                }
                catch (AppsException _Exception)
                {
                    WriteObject(_Exception,true);
                }
            }